<?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: Fill a simple 1-N relation in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367344#M130730</link>
    <description>OK, this looks like an experiment with using Talend since you are using a tRowGenerator to generate users, etc. Therefore, the answer is simple. You need to assign a "key". This should be a number. Each user generated should have a number assigned to it. So if you have 10 users, the numbers could be 1 to 10. Then when you are getting the files from the file list, generate a random number (between 1 to 10) and assign it to the file. This will mean that a user can have several files, but a file can only have 1 user. Then you simply create an inner join in the tMap using the user number</description>
    <pubDate>Mon, 13 Jul 2015 09:32:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-07-13T09:32:36Z</dc:date>
    <item>
      <title>Fill a simple 1-N relation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367341#M130727</link>
      <description>&lt;P&gt;Hello everybody.&lt;BR /&gt;&lt;BR /&gt;I need to fill mainly, two tables: users and files. So, each user has several documents and a file has only one owner (user).&lt;BR /&gt;&lt;BR /&gt;First, I understand I need to generate a sample users. I'm using tRowGenerator with (id, username, firstname, lastname) schema.&lt;BR /&gt;Otherwise, I'm using a tFileList component in order to "generate" a list of files on a (filename field) schema. I'd like to merge this data (users and files).&lt;BR /&gt;&lt;BR /&gt;I'm quite figuring out I need a tMap component, however, I don't know how to relate users and filename...&lt;BR /&gt;I'll appreciate a lot any help.&lt;BR /&gt;Thanks for all.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 07:44:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367341#M130727</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T07:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Fill a simple 1-N relation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367342#M130728</link>
      <description>Hi, 
&lt;BR /&gt;Have you already checked component reference 
&lt;A href="https://help.talend.com/search/all?query=tMap" target="_blank" rel="nofollow noopener noreferrer"&gt;TalendHelpCenter:tMap&lt;/A&gt;&amp;nbsp;with scenarios? 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt;
  I'm quite figuring out I need a tMap component, however, I don't know how to relate users and filename... 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Would you mind setting an example with input and expected output result so that we can design a demo job for you? 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Sabrina</description>
      <pubDate>Mon, 13 Jul 2015 08:27:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367342#M130728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T08:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Fill a simple 1-N relation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367343#M130729</link>
      <description>1. I'd like to fill a simple users collections (id, username, firstname, lastname)
&lt;BR /&gt;2. For each created user, I'd like to assign several filenames assigned to each user.</description>
      <pubDate>Mon, 13 Jul 2015 08:37:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367343#M130729</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T08:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Fill a simple 1-N relation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367344#M130730</link>
      <description>OK, this looks like an experiment with using Talend since you are using a tRowGenerator to generate users, etc. Therefore, the answer is simple. You need to assign a "key". This should be a number. Each user generated should have a number assigned to it. So if you have 10 users, the numbers could be 1 to 10. Then when you are getting the files from the file list, generate a random number (between 1 to 10) and assign it to the file. This will mean that a user can have several files, but a file can only have 1 user. Then you simply create an inner join in the tMap using the user number</description>
      <pubDate>Mon, 13 Jul 2015 09:32:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367344#M130730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T09:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Fill a simple 1-N relation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367345#M130731</link>
      <description>Ok, thanks rhall. I've gone ahead. 
&lt;BR /&gt;However, I'm indexing 1000 rows (users), but I'm inserting 1000 files yet. I'd like to insert every file generated. 
&lt;BR /&gt;As you can see, I'm generating 1000 users and 20000 files. However I'm indexing 1000 users but only 1000 files.</description>
      <pubDate>Mon, 13 Jul 2015 11:43:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367345#M130731</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T11:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Fill a simple 1-N relation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367346#M130732</link>
      <description>If you have added a screenshot, I can't see it I'm afraid.</description>
      <pubDate>Mon, 13 Jul 2015 11:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367346#M130732</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T11:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Fill a simple 1-N relation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367347#M130733</link>
      <description>I've attached it again... 
&lt;BR /&gt; 
&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Jul 2015 12:14:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367347#M130733</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T12:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Fill a simple 1-N relation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367348#M130734</link>
      <description>OK, I think I can see what you are saying. Can you take a screenshot of your tMap component? Also, how are you assigning a user number to the files? Have you assigned a random user number to the files?</description>
      <pubDate>Mon, 13 Jul 2015 12:28:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367348#M130734</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T12:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Fill a simple 1-N relation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367349#M130735</link>
      <description>Yes, I've assigned a random number between 0-1000 to user_id on tIterateFlow component (row3 input on tMap). 
&lt;BR /&gt; 
&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Jul 2015 13:31:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367349#M130735</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T13:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Fill a simple 1-N relation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367350#M130736</link>
      <description>I see. You need to change the files input (row3) to be the "Main" input and the users input (row1) to be the "Lookup". The "Main" input drives the process. So every row received will be processed. The users input is simply a lookup here. 
&lt;BR /&gt; 
&lt;BR /&gt;I should point out that this is not the only way of achieving this. You can leave it as it is and click on the spanner symbol on the row3 input. If you set the "Match Model" to "All Matches" and the "Join Model" to "Inner Join", it should do this as well. 
&lt;BR /&gt; 
&lt;BR /&gt;My first suggestion is based on the fact that this process looks like it is driven by the files and not the users. The dataset that is driving the process should usually be the "Main" input.</description>
      <pubDate>Mon, 13 Jul 2015 13:42:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fill-a-simple-1-N-relation/m-p/2367350#M130736</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T13:42:23Z</dc:date>
    </item>
  </channel>
</rss>

