<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SQL DDL File execution in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/SQL-DDL-File-execution/m-p/2232677#M22565</link>
    <description>Hi, 
&lt;BR /&gt;I am new to Talend and maybe I have missed something (I Hope) that will allow me to execute SQL statements stored in a file. Specifically I have a DDL script that I want to run to create all of the data structures -- Types, Tables, Indexes, Constraints, FK, etc prior to doing the data load steps. Is there a simple way to do this? I am currently trying to do this against a DB2 database but will want this to be database agnostic. I would prefer to do this all within Talend as part of a job rather than use a separate tool to do the ddl and then talend for the dataload. 
&lt;BR /&gt;The data in the flat file generated by ER/Studio I want to load looks something like this (times hundreds of tables): 
&lt;BR /&gt; 
&lt;BR /&gt;CREATE DISTINCT TYPE ADDRESSGENERAL AS VARCHAR(40) WITH COMPARISONS 
&lt;BR /&gt;; 
&lt;BR /&gt;CREATE DISTINCT TYPE BITMAP AS CHAR(128) WITH COMPARISONS 
&lt;BR /&gt;; 
&lt;BR /&gt;We are using TOS2.2.1 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks in advance for any direction you can give me on this.</description>
    <pubDate>Sat, 16 Nov 2024 14:31:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T14:31:23Z</dc:date>
    <item>
      <title>SQL DDL File execution</title>
      <link>https://community.qlik.com/t5/Talend-Studio/SQL-DDL-File-execution/m-p/2232677#M22565</link>
      <description>Hi, 
&lt;BR /&gt;I am new to Talend and maybe I have missed something (I Hope) that will allow me to execute SQL statements stored in a file. Specifically I have a DDL script that I want to run to create all of the data structures -- Types, Tables, Indexes, Constraints, FK, etc prior to doing the data load steps. Is there a simple way to do this? I am currently trying to do this against a DB2 database but will want this to be database agnostic. I would prefer to do this all within Talend as part of a job rather than use a separate tool to do the ddl and then talend for the dataload. 
&lt;BR /&gt;The data in the flat file generated by ER/Studio I want to load looks something like this (times hundreds of tables): 
&lt;BR /&gt; 
&lt;BR /&gt;CREATE DISTINCT TYPE ADDRESSGENERAL AS VARCHAR(40) WITH COMPARISONS 
&lt;BR /&gt;; 
&lt;BR /&gt;CREATE DISTINCT TYPE BITMAP AS CHAR(128) WITH COMPARISONS 
&lt;BR /&gt;; 
&lt;BR /&gt;We are using TOS2.2.1 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks in advance for any direction you can give me on this.</description>
      <pubDate>Sat, 16 Nov 2024 14:31:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/SQL-DDL-File-execution/m-p/2232677#M22565</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: SQL DDL File execution</title>
      <link>https://community.qlik.com/t5/Talend-Studio/SQL-DDL-File-execution/m-p/2232678#M22566</link>
      <description>Hi,
&lt;BR /&gt;If you have a fileInput with one Query per line like that : 
&lt;BR /&gt;UPDATE SAMPLE SET GROUP_ID = 'TEST1'
&lt;BR /&gt;UPDATE SAMPLE SET GROUP_ID = 'TEST2'
&lt;BR /&gt;UPDATE SAMPLE SET GROUP_ID = 'TEST3'
&lt;BR /&gt;You can specify this file input into MetadataSchema fileDelimited : 
&lt;BR /&gt;1 column named Query for example.
&lt;BR /&gt;Then, you are designing a Job like the following screenshot.
&lt;BR /&gt;In the tDB2Row component, the Query specified is a Dynamic query provides by the FileInputDelimited.
&lt;BR /&gt;For each row, you will have a run of your selected query.
&lt;BR /&gt;In the query field, specify this dynamic query like that : ""+row1.Query+"" =&amp;gt; row1 is the name of your Link between your components, Query is the name of your Column in the Schema.
&lt;BR /&gt;IMPORTANT : your query must have no ";" character in end of line, keep just the SQL query.
&lt;BR /&gt;Regards.</description>
      <pubDate>Mon, 05 Nov 2007 10:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/SQL-DDL-File-execution/m-p/2232678#M22566</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-11-05T10:36:20Z</dc:date>
    </item>
  </channel>
</rss>

