<?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: Dynamic Schema to save different column names in database tables in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343005#M110807</link>
    <description>In the edit schema?  The instructions I gave were for the "Additional columns" option.</description>
    <pubDate>Tue, 30 Jul 2013 06:25:37 GMT</pubDate>
    <dc:creator>alevy</dc:creator>
    <dc:date>2013-07-30T06:25:37Z</dc:date>
    <item>
      <title>Dynamic Schema to save different column names in database tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343000#M110802</link>
      <description>Hi,&lt;BR /&gt;In my mysql database I have 4 tables.&lt;BR /&gt;1. inv_ppl1_flat -- (id, style, color, code, size)&lt;BR /&gt;2. inv_ppl2_flat -- (id, style, color, code, size)&lt;BR /&gt;3. inv_ppl1_lookup -- (id, ppl1_style, ppl1_color, ppl1_code, ppl1_size)&lt;BR /&gt;4. inv_ppl2_lookup -- (id, ppl1_style, ppl2_color, ppl2_code, ppl2_size)&lt;BR /&gt;In TOS, I created context variables with name "people" and values to "ppl1" and "ppl2"&lt;BR /&gt;I want to get data from ppl1/ppl2_flat table and insert to ppl1/ppl2_lookup table.&lt;BR /&gt;In the "tMySqlInput" I given Table name to "inv_"+context.people+"flat" and in "tMySqlOutput" I given the datatabse configurations. But I want to edit the schema. As you can see the column names in 2 lookup tables are different.  the style, color, code and size column is preceded by the appropriate name(context variable value). So I cannot map to correct schema. I want to map &lt;BR /&gt;style to ppl1/ppl2_style&lt;BR /&gt;color to ppl1/ppl2_color&lt;BR /&gt;rest are similar&lt;BR /&gt;&lt;BR /&gt;In the edit schema I cannot add context variables. So How can I perform mapping to different (but follows a naming pattern) column name and extract data from first table and insert to second?&lt;BR /&gt;Thanks</description>
      <pubDate>Sat, 16 Nov 2024 11:57:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343000#M110802</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Schema to save different column names in database tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343001#M110803</link>
      <description>Database names have been modified for simplicity. I'm trying to get some dynamic sql in place to update static copies of some key production tables into another</description>
      <pubDate>Mon, 29 Jul 2013 13:30:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343001#M110803</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-07-29T13:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Schema to save different column names in database tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343002#M110804</link>
      <description>Where I can update the sql query?</description>
      <pubDate>Mon, 29 Jul 2013 13:34:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343002#M110804</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-29T13:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Schema to save different column names in database tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343003#M110805</link>
      <description>I think you can do this by using the "Additional columns" option in tMysqlOutput. 
&lt;BR /&gt;For example, if your tMysqlOutput schema is (id, style, color, code, size), set Name to context.people+"_style", SQL expression to "?", Position to "Replace" and Reference column to "style". Add settings for each column. 
&lt;BR /&gt;Otherwise, the only ways to do this using TOS would be: 
&lt;BR /&gt;1. Have a tMap with a separate output for each lookup table with the correct column names, with a filter expression using your context variable to control to which tMysqlOutput the data goes. 
&lt;BR /&gt;2. Use tMysqlRow to manually create the INSERT INTO statements for your lookup tables. 
&lt;BR /&gt;Using the Enterprise version of Talend, you could use a dynamic schema instead.</description>
      <pubDate>Tue, 30 Jul 2013 03:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343003#M110805</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2013-07-30T03:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Schema to save different column names in database tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343004#M110806</link>
      <description>In the edit schema I cannot add context.people+"_style". I don't want to map each table separately as I may need to add many more tables soon</description>
      <pubDate>Tue, 30 Jul 2013 05:12:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343004#M110806</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-30T05:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Schema to save different column names in database tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343005#M110807</link>
      <description>In the edit schema?  The instructions I gave were for the "Additional columns" option.</description>
      <pubDate>Tue, 30 Jul 2013 06:25:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Schema-to-save-different-column-names-in-database-tables/m-p/2343005#M110807</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2013-07-30T06:25:37Z</dc:date>
    </item>
  </channel>
</rss>

