{"id":51,"date":"2011-09-30T13:31:27","date_gmt":"2011-09-30T12:31:27","guid":{"rendered":"http:\/\/www.hman-projects.de\/?p=51"},"modified":"2011-09-30T13:31:27","modified_gmt":"2011-09-30T12:31:27","slug":"talend-open-studio-einbindung-einer-datenquelle","status":"publish","type":"post","link":"https:\/\/www.hman-projects.de\/?p=51","title":{"rendered":"Talend Open Studio  &#8211; Einbindung einer Datenquelle"},"content":{"rendered":"<p>&nbsp;<\/p>\n<div>Datenbankverbindungen sollte man in TOS immer als Meta-Daten im Repository hinterlegen.<\/div>\n<div>In diesem Fall gehe ich davon aus, dass man schon ein Projekt definiert und als Sprache &#8222;JAVA&#8220; gew\u00e4hlt hat.<\/div>\n<div><\/div>\n<div>Schritte:<\/div>\n<div>\n<ul>\n<li>Auf der linken Seite den Ordner \u201eMeta-Daten\u201c \u00f6ffnen<\/li>\n<li>Mit Rechter Maustaste auf DB-Verbindungen klicken und \u201eErstelle Verbindung w\u00e4hlen\u201c<\/li>\n<li>\u201eName\u201c angeben, auf \u201eweiter\u201c klicken, -&gt; Der Name muss den Regeln f\u00fcr einen Klassennamen in Java entsprechen<\/li>\n<li>DB-Type ausw\u00e4hlen<\/li>\n<\/ul>\n<figure id=\"attachment_52\" aria-describedby=\"caption-attachment-52\" style=\"width: 721px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-52\" title=\"Datenbank-Connection in MetaData\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_1.png\" alt=\"\" width=\"721\" height=\"607\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_1.png 721w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_1-300x252.png 300w\" sizes=\"(max-width: 721px) 100vw, 721px\" \/><\/a><figcaption id=\"caption-attachment-52\" class=\"wp-caption-text\">Datenbank-Connection in MetaData<\/figcaption><\/figure>\n<p><!--more-->Nun kann man die Datenverbindung in einem neuen Job testen<\/p>\n<ul>\n<li>Sobald eine Datenbankverbindung besteht, kann man Jobs erstellen<\/li>\n<li>Auf der linken Seite \u201eJob-Design\u201c w\u00e4hlen<\/li>\n<li>Im Kontextmen\u00fc dann &#8222;Erstelle Job&#8220; w\u00e4hlen<\/li>\n<\/ul>\n<figure id=\"attachment_53\" aria-describedby=\"caption-attachment-53\" style=\"width: 438px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_conn_test.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-53\" title=\"DB Connection Test - Job\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_conn_test.png\" alt=\"\" width=\"438\" height=\"446\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_conn_test.png 438w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_conn_test-294x300.png 294w\" sizes=\"(max-width: 438px) 100vw, 438px\" \/><\/a><figcaption id=\"caption-attachment-53\" class=\"wp-caption-text\">DB Connection Test - Job<\/figcaption><\/figure>\n<p>In der Mitte der Benutzungsoberfl\u00e4che kann man nun den Job mit Komponenten f\u00fcllen.<\/p>\n<figure id=\"attachment_54\" aria-describedby=\"caption-attachment-54\" style=\"width: 980px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_conn_test_2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-54\" title=\"Der erste TOS-Job\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_conn_test_2.png\" alt=\"\" width=\"980\" height=\"97\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_conn_test_2.png 980w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_conn_test_2-300x29.png 300w\" sizes=\"(max-width: 980px) 100vw, 980px\" \/><\/a><figcaption id=\"caption-attachment-54\" class=\"wp-caption-text\">Der erste TOS-Job<\/figcaption><\/figure>\n<p>Nun kann man auf der linken Seite im Repository unter Meta-Daten, DB-Verbindungen die zuvor erste DB-Connection ausw\u00e4hlen und auf den Job-Designer (leere Arbeitsfl\u00e4che) ziehen.<\/p>\n<p><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-55\" title=\"db_connection_2\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_2.png\" alt=\"\" width=\"197\" height=\"58\" \/><\/a>Beim Fallenlassen auf der Arbeitsoberfl\u00e4che kann man ausw\u00e4hlen, ob diese Datenquelle als &#8222;tOracleInput&#8220; oder &#8222;tOracleOutput&#8220; verwendet werden soll.<\/p>\n<ul>\n<li>Input &gt; Die Daten werden aus der Datenquelle gelesen und stehen als DAtenstrom im Job zur Verf\u00fcgung<\/li>\n<li>Output &gt; Ein Datenstrom kann in eine Datensenke verschoben werden, mit tOracleOutput w\u00fcrde man den Datenstrom in eine vorhandene oder neu zu erstellende Oracle-Tabelle schreiben.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-56\" title=\"Komponente ausw\u00e4hlen\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_3.png\" alt=\"\" width=\"321\" height=\"329\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_3.png 321w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_3-292x300.png 292w\" sizes=\"(max-width: 321px) 100vw, 321px\" \/><\/a><\/p>\n<p>Der Job sollte nun wie folgt aussehen. In meinem Fall habe ich schon eine Abfrage in die Component-Details eingetragen. Die Abfrage enth\u00e4lt kein sonst \u00fcbliches &#8222;;&#8220; ! und wird in &#8220; eingeschlossen.<\/p>\n<p>Meine Abfrage: &#8222;select * from xdb_werte&#8220;<\/p>\n<p><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57\" title=\"db_connection_4\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_4.png\" alt=\"\" width=\"1000\" height=\"732\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_4.png 1000w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_4-300x219.png 300w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/a>Der Job bzw. die Komponente kenn nun aber noch kein Schema!<\/p>\n<p>Einmal auf &#8222;Guess schema&#8220; klicken ! Hierdurch wird das Spalten_Schema der Tabelle ermittelt!<\/p>\n<p><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-58\" title=\"db_connection_5\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_5.png\" alt=\"\" width=\"550\" height=\"310\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_5.png 550w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_5-300x169.png 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a>Hier kann man das Schema an die eigenen Bed\u00fcrfnisse anpassen und schlie\u00dft mit &#8222;OK&#8220; ab.<\/p>\n<p>Danach zeigt die Komponente bzw. unser Job-Baustein nur noch eine gelbe Warnung an:<\/p>\n<p><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59\" title=\"db_connection_6\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_6.png\" alt=\"\" width=\"397\" height=\"135\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_6.png 397w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_6-300x102.png 300w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/a>Ok, nun folgt die Ausgabe in eine Excel-Datei; &#8211; keine Sorge wir ben\u00f6tigen kein MS-Office auf dem Server auf dem der ETL-Job sp\u00e4ter laufen soll.<\/p>\n<p>Im Suchfeld &#8222;Komponente suchen&#8220; sucht man nun nach einer passenden EXCEL-Output-Komponente und zieht sie auch auf den Job-Designer<\/p>\n<p><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-60\" title=\"db_connection_7\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_7.png\" alt=\"\" width=\"236\" height=\"218\" \/><\/a>Ergebnis:<\/p>\n<p><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-61\" title=\"db_connection_8\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_8.png\" alt=\"\" width=\"349\" height=\"113\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_8.png 349w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_8-300x97.png 300w\" sizes=\"(max-width: 349px) 100vw, 349px\" \/><\/a><\/p>\n<p>In den Component-Details des Bausteins tFileOutputExcel_1 kann man den Excel_Filenamen entsprechend anpassen.<\/p>\n<p>Nun m\u00fcssen die beiden Bausteine nur noch miteinander verbunden werden.<\/p>\n<p>Mit der Maus dazu auf den baustein &#8222;db_conn_test&#8220; klicken und das Kontextmen\u00fc \u00f6ffnen und &#8222;Zeile&#8220; &#8211; &#8222;Main&#8220; w\u00e4hlen und danach direkt auf den Excel-Baustein klicken.<a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-62\" title=\"db_connection_9\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_9.png\" alt=\"\" width=\"394\" height=\"84\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_9.png 394w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_9-300x63.png 300w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/a>Hierdurch wird der Main-Datenstrom des linken Bausteins mit dem Eingang des rechten Bausteins verbunden.<\/p>\n<p><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-63\" title=\"db_connection_10\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_10.png\" alt=\"\" width=\"328\" height=\"104\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_10.png 328w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_10-300x95.png 300w\" sizes=\"(max-width: 328px) 100vw, 328px\" \/><\/a>Die beiden Bausteine haben keine Warnhinweise mehr und wir k\u00f6nnen den Job starten.<\/p>\n<p><a href=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-64\" title=\"db_connection_11\" src=\"http:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_11.png\" alt=\"\" width=\"512\" height=\"374\" srcset=\"https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_11.png 512w, https:\/\/www.hman-projects.de\/wp-content\/uploads\/2011\/09\/db_connection_11-300x219.png 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a>Job ausf\u00fchren und danach kann man sich das Ergebnis als Ecxel-Datei anschauen.<\/p>\n<p>&nbsp;<\/p>\n<p>Viel Spa\u00df!!<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Datenbankverbindungen sollte man in TOS immer als Meta-Daten im Repository hinterlegen. In diesem Fall gehe ich davon aus, dass man schon ein Projekt definiert und als Sprache &#8222;JAVA&#8220; gew\u00e4hlt hat. Schritte: Auf der linken Seite den Ordner \u201eMeta-Daten\u201c \u00f6ffnen Mit Rechter Maustaste auf DB-Verbindungen klicken und \u201eErstelle Verbindung w\u00e4hlen\u201c \u201eName\u201c angeben, auf \u201eweiter\u201c klicken, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-etl-talend-open-studio"],"_links":{"self":[{"href":"https:\/\/www.hman-projects.de\/index.php?rest_route=\/wp\/v2\/posts\/51"}],"collection":[{"href":"https:\/\/www.hman-projects.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hman-projects.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hman-projects.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hman-projects.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=51"}],"version-history":[{"count":1,"href":"https:\/\/www.hman-projects.de\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":65,"href":"https:\/\/www.hman-projects.de\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions\/65"}],"wp:attachment":[{"href":"https:\/\/www.hman-projects.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hman-projects.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hman-projects.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}