<?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 Re: How to load all the tables into CSV files dynamically? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284191#M57937</link>
    <description>Hi,
&lt;BR /&gt;There is 
&lt;FONT size="2"&gt;dynamic schema feature&amp;nbsp; which is only available in Talend Subscription Solution. It allows you to design schema with an unknown column structure (unknown name and number of columns).&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;Here is a related KB article about:&lt;A href="https://help.talend.com/pages/viewpage.action?pageId=190513179" target="_blank" rel="nofollow noopener noreferrer"&gt;TalendHelpCenter: How to process changing data structure?&lt;/A&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;&lt;BR /&gt;Talend provides cmmunity user with a free trail of Talend Data Integration. &lt;BR /&gt;You can download it freely from:&lt;A href="https://info.talend.com/prodevaltedi.html?_ga=1.40458978.1751069238.1426242863" target="_blank" rel="nofollow noopener noreferrer"&gt;https://info.talend.com/prodevaltedi.html?_ga=1.40458978.1751069238.1426242863&lt;/A&gt;&lt;BR /&gt;Best regards&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;Sabrina&lt;BR /&gt;&lt;/FONT&gt;</description>
    <pubDate>Fri, 20 Nov 2015 07:57:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-11-20T07:57:23Z</dc:date>
    <item>
      <title>How to load all the tables into CSV files dynamically?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284190#M57936</link>
      <description>Hi Experts,
&lt;BR /&gt;I am using TOS 6.1 and MSSQL 2008 r2.
&lt;BR /&gt;I would like to implements the following scenario :
&lt;BR /&gt;Load all the tables in to CSV file(s) dynamically from MSSQL.
&lt;BR /&gt;&amp;nbsp;I read one by one table name from .txt file and Prepare a query like "Select * from context.CurrentTableName".
&lt;BR /&gt;If i have 100 tables , i will generate&amp;nbsp; 100 queries dynamically, and fetch the 100 table data into csv file(s).
&lt;BR /&gt;i have verified but no luck.
&lt;BR /&gt;could any one help me on this, how to achieve ,load the table information with out schema being mentioned ?
&lt;BR /&gt;Note: i don't have a option to select Dynamic Type.
&lt;BR /&gt;Thanks you.</description>
      <pubDate>Sat, 16 Nov 2024 10:56:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284190#M57936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T10:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the tables into CSV files dynamically?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284191#M57937</link>
      <description>Hi,
&lt;BR /&gt;There is 
&lt;FONT size="2"&gt;dynamic schema feature&amp;nbsp; which is only available in Talend Subscription Solution. It allows you to design schema with an unknown column structure (unknown name and number of columns).&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;Here is a related KB article about:&lt;A href="https://help.talend.com/pages/viewpage.action?pageId=190513179" target="_blank" rel="nofollow noopener noreferrer"&gt;TalendHelpCenter: How to process changing data structure?&lt;/A&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;&lt;BR /&gt;Talend provides cmmunity user with a free trail of Talend Data Integration. &lt;BR /&gt;You can download it freely from:&lt;A href="https://info.talend.com/prodevaltedi.html?_ga=1.40458978.1751069238.1426242863" target="_blank" rel="nofollow noopener noreferrer"&gt;https://info.talend.com/prodevaltedi.html?_ga=1.40458978.1751069238.1426242863&lt;/A&gt;&lt;BR /&gt;Best regards&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;Sabrina&lt;BR /&gt;&lt;/FONT&gt;</description>
      <pubDate>Fri, 20 Nov 2015 07:57:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284191#M57937</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-20T07:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the tables into CSV files dynamically?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284192#M57938</link>
      <description>You can do this without the dynamic schema so long as you know the max number of columns you will have to work with. You can use the query...... 
&lt;BR /&gt; 
&lt;PRE&gt;"Select * from " + context.tablename&lt;/PRE&gt; 
&lt;BR /&gt;.... and configure your db component with 100 String columns (for example, assuming no more than 100 columns). This will mean that all of your columns are of type String, but then that doesn't matter if you are dumping the data to a CSV.</description>
      <pubDate>Fri, 20 Nov 2015 09:30:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284192#M57938</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-20T09:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the tables into CSV files dynamically?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284193#M57939</link>
      <description>Hi,&lt;BR /&gt;Thanks for quick reply.&lt;BR /&gt;Actually i am looking for a solution without using Dynamic.&lt;BR /&gt;How can i achieve it?</description>
      <pubDate>Sat, 21 Nov 2015 08:53:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284193#M57939</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-21T08:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the tables into CSV files dynamically?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284194#M57940</link>
      <description>Hi Thiru.gdm, 
&lt;BR /&gt;The solution you mention in your first post with what I suggested should work. The only difficulties will be ensuring you have enough columns (but I am assuming you can find the total number of columns in your widest table) and column names. For column names (to use as headers in your CSV files) you will have to query your database&amp;nbsp;in a separate query. Something like ..... 
&lt;BR /&gt; 
&lt;PRE&gt;SELECT COLUMN_NAME,* &lt;BR /&gt;FROM INFORMATION_SCHEMA.COLUMNS&lt;BR /&gt;WHERE TABLE_NAME = 'YourTableName' AND TABLE_SCHEMA='YourSchemaName'&lt;/PRE&gt; 
&lt;BR /&gt;But other than that, it should be pretty straight forward.</description>
      <pubDate>Sat, 21 Nov 2015 15:18:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284194#M57940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-21T15:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the tables into CSV files dynamically?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284195#M57941</link>
      <description>Hi,&lt;BR /&gt;I have used same query to get the headers. How can we store that result in to output file?&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Sun, 22 Nov 2015 13:26:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284195#M57941</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-22T13:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the tables into CSV files dynamically?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284196#M57942</link>
      <description>You can use a tUnite component so long as the schema of your headers data match that of the table data. Basically, if you are using the idea of 100 columns for your table data, the header data must also have a schema with 100 columns and the columns must be named the same.&amp;nbsp;</description>
      <pubDate>Sun, 22 Nov 2015 17:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284196#M57942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-22T17:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the tables into CSV files dynamically?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284197#M57943</link>
      <description>&lt;B&gt;Hi,&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;your idea worked for me,&amp;nbsp; took 50 columns and&amp;nbsp; trimmed unwanted columns based on column count.&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;If anyone wants the same kind of scenario please follow the steps below:&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;Need to create 3 context variables: Current_TableName, Column_Count, Column_List&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;1. Get the list of all table(s) name (tMSSQLInput: SELECT dbo.sysobjects.ID, dbo.sysobjects.Name FROM dbo.sysobjects WHERE xtype='U' )&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;2. pass the each table name to child job (context.Current_TableName)&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;3. Receive the table name and get the columns list ( tMSSQLTableList----&amp;gt;tMSSQLColumnList---&amp;gt;tFixedFlowInput)&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;4. capture the list of columns and column count which comes from tFiexedFlowInput. &lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;output_row.ColumnName = input_row.ColumnName;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;5. write the headers to a file (give file name as dynamic like filename=Current_TableName +".csv")&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;6. Get the table data using tMSSQLInput (give schema of table like column1, column2, column3 etc.. upto 50 columns. because we don't know the exact columns as we are getting table name as dynamic) &lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;7. write the data in to file (Current_TableName +".csv")&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;Here our table data looks like following&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;ID,Name,City,email&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;1,nani,MN,testTalend.gdm@gmail.com,,,,,,,,,,,,,,,,,,,,,,,,,, etc separated with 50 columns as we have schema upto 50 columns (we have to remove extra comas)&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;8. Using tFileInputFullRow, read each and every line and pass it to tjavaRow&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;9. Here we have to trim unwanted columns using Column_Count context variable .&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;String val=input_row.line;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;String parts[]=val.split(",");&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;String outputValue=null;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;for(int i=0;i&amp;lt;parts.length;i++)&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;{&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;if(i&amp;lt;context.Column_Count )//context.Column_Count &lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;{&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;//write logic here parts&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;//and assign value&amp;nbsp;&lt;/B&gt; 
&lt;B&gt;output_row.line =outputValue;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;}&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;}&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;output looks like:&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;ID,Name,City,email&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;1,nani,MN,testTalend.gdm@gmail.com&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;likewise it will create all the tables data dynamically.&lt;/B&gt; 
&lt;BR /&gt; 
&lt;B&gt;Thanks,&lt;/B&gt;</description>
      <pubDate>Sat, 28 Nov 2015 09:04:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284197#M57943</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-28T09:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to load all the tables into CSV files dynamically?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284198#M57944</link>
      <description>Glad you got it working Thiru.gdm.&amp;nbsp;</description>
      <pubDate>Sat, 28 Nov 2015 23:48:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-all-the-tables-into-CSV-files-dynamically/m-p/2284198#M57944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-28T23:48:57Z</dc:date>
    </item>
  </channel>
</rss>

