<?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: Transpose transformation in DI with dynamic columns number in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944406#M6552</link>
    <description>&lt;P&gt;The help in the link you provided doesn't really cover your scenario/setup. It's more of generic help to initialize metadata via a data driven approach.&lt;/P&gt;
&lt;P&gt;The Transpose transormation is not clever enough to read the metadata and generate the defined output structure.&lt;/P&gt;
&lt;P&gt;This is a Generated Transformation, which means you can make a copy of it and tweak it to meet your needs, which would might feel better than using post-code or User Written Code, especially if this is a repetetive problem. When copying it, make sure you tick "Generate column mapping macros" on the tab Inputs/Outpus. Then you can pick up the output column structure in your code, create an empty output table, and then insert your transpose output and map any non-existent column with MISSING.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2024 13:09:37 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2024-09-18T13:09:37Z</dc:date>
    <item>
      <title>Transpose transformation in DI with dynamic columns number</title>
      <link>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944267#M6548</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i use Data integration Studio 4.905.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the transpose transformation to convert value from a column (nationality_id), to new columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically the number of "nationality_id" by group (=user_id) can vary from 1 to 5, so 5 new&amp;nbsp;nationality_id_x columns will be created for each user_id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i want to create some "spare" columns in case of new set of data bring a user_id with more than 5 differents nationnality_id.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in the mapping window of the transpose transformation, i've created for the target table, 2 new metadata columns named&amp;nbsp;nationality_id_6 and&amp;nbsp;nationality_id_7.&lt;/P&gt;&lt;P&gt;I've put the option&amp;nbsp; "&lt;SPAN class=""&gt;Update the table metadata for the target tables"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;No, acccording the documentation that i fnd there (bullet in the Overview section)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/etlug/4.904/p1lj6ps6h3xv7yn1qfr17lifevwb.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/etlug/4.904/p1lj6ps6h3xv7yn1qfr17lifevwb.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i try to use the (work)output table in a following "extract" transformation, i've got this error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: The following columns were not found in the contributing tables: Nationality_id_6, Nationality_id_7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How i can deal with that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 13:56:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944267#M6548</guid>
      <dc:creator>vcxcv</dc:creator>
      <dc:date>2024-09-17T13:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose transformation in DI with dynamic columns number</title>
      <link>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944281#M6549</link>
      <description>&lt;P&gt;Untested, but maybe if you can add post code to your transformation that creates the output with all your defined columns.&lt;/P&gt;
&lt;P&gt;That being said, it is awkward to work with a metadata tool like DIS and dynamic table layout. It's usually preferred to have long/narrow data structures in your ETL for your bronze and silver layers, and maybe transpose at the last step to a specific data mart.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 09:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944281#M6549</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2024-09-18T09:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose transformation in DI with dynamic columns number</title>
      <link>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944350#M6550</link>
      <description>&lt;P&gt;Hello LinusH,&lt;BR /&gt;&lt;BR /&gt;Thank you very much for your reply.&lt;BR /&gt;&lt;BR /&gt;In fact my table will not be dynamic, the number of columns will remain the same, but some will be empty.&lt;BR /&gt;&lt;BR /&gt;Yes, of course, I can add post-code, and even use a ‘user-written code’ transformation, but&lt;BR /&gt;1° I try to avoid it as much as possible&lt;BR /&gt;2° I've followed the advice in the sas documentation, but it doesn't work, so maybe I haven't understood the documentation properly?&lt;BR /&gt;&lt;BR /&gt;I'm building a dimension for a data warehouse, in a star schema model, so already in the gold layer.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 07:15:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944350#M6550</guid>
      <dc:creator>vcxcv</dc:creator>
      <dc:date>2024-09-18T07:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose transformation in DI with dynamic columns number</title>
      <link>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944386#M6551</link>
      <description>&lt;P&gt;It's quite a long time since I've used DIS but they approach that normally worked for me: Investigate the SAS log and the DIS generated code to understand what causes the error. Once identified "play" with the transformation (change something) and check the change to the generated code until you (eventually) find a way that it creates valid code.&lt;/P&gt;
&lt;P&gt;I personally never liked the transpose transformation in DIS because it doesn't guarantee stable target table structures. I wouldn't hesitate to implement using custom code or if needed more than once a custom transformation.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 12:02:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944386#M6551</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-09-18T12:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose transformation in DI with dynamic columns number</title>
      <link>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944406#M6552</link>
      <description>&lt;P&gt;The help in the link you provided doesn't really cover your scenario/setup. It's more of generic help to initialize metadata via a data driven approach.&lt;/P&gt;
&lt;P&gt;The Transpose transormation is not clever enough to read the metadata and generate the defined output structure.&lt;/P&gt;
&lt;P&gt;This is a Generated Transformation, which means you can make a copy of it and tweak it to meet your needs, which would might feel better than using post-code or User Written Code, especially if this is a repetetive problem. When copying it, make sure you tick "Generate column mapping macros" on the tab Inputs/Outpus. Then you can pick up the output column structure in your code, create an empty output table, and then insert your transpose output and map any non-existent column with MISSING.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 13:09:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Transpose-transformation-in-DI-with-dynamic-columns-number/m-p/944406#M6552</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2024-09-18T13:09:37Z</dc:date>
    </item>
  </channel>
</rss>

