<?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: Parse json without knowing his schema in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2488072#M141423</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I believe I found a solution to your issue.&lt;/P&gt;
&lt;P&gt;My solution executes the follow logic steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;it reads Json file and loads in globalMap object the columns and rows objects;&lt;/LI&gt;
&lt;LI&gt;it reads columns object and produces csv header file and Dynamic Schema file with name and type;&lt;/LI&gt;
&lt;LI&gt;it read rows objects and appends in csv file the data;&lt;/LI&gt;
&lt;LI&gt;it loads Dynamic Schema produced in step 3;&lt;/LI&gt;
&lt;LI&gt;it reads csv data file with dynamic schema and writes into databases.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I attach the job and subjob sample.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 20 Oct 2024 21:48:11 GMT</pubDate>
    <dc:creator>fcolagiacomo</dc:creator>
    <dc:date>2024-10-20T21:48:11Z</dc:date>
    <item>
      <title>Parse json without knowing his schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2487970#M141420</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I'm wondering if there is a way o simplfy the way I'm imaging i need to do a job.&lt;/P&gt;
&lt;P&gt;I will have lots of json, all made with a similar form, that is something like this:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
	"columns": [
		{
			"name": "user",
			"type": "string"
		},
		{
			"name": "organization",
			"type": "string"
		},
		{
			"name": "site",
			"type": "string"
		},
	],
	"rows": [
		{
			"user": {
				"value": "username1"
			},
			"organization": {
				"value": "org1"
			},
			"site": {
				"value": "site1"
			},
		},
		{
			"user": {
				"value": "username2"
			},
			"organization": {
				"value": "org2"
			},
			"site": {
				"value": "site2"
			}
		}
	]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So there would be a section with the schema (rows) and a section of the plain data (columns)....&lt;/P&gt;
&lt;P&gt;I would like to have a job that parse one of these json file, and write the data on a DB table automatically, without the need to create a job for every JSON with the need to write manually the schemas, the mappings between the schema and the fields and so on... Any ideas from you, talend experts? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 16:35:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2487970#M141420</guid>
      <dc:creator>lucaL</dc:creator>
      <dc:date>2024-10-18T16:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Parse json without knowing his schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2488072#M141423</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I believe I found a solution to your issue.&lt;/P&gt;
&lt;P&gt;My solution executes the follow logic steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;it reads Json file and loads in globalMap object the columns and rows objects;&lt;/LI&gt;
&lt;LI&gt;it reads columns object and produces csv header file and Dynamic Schema file with name and type;&lt;/LI&gt;
&lt;LI&gt;it read rows objects and appends in csv file the data;&lt;/LI&gt;
&lt;LI&gt;it loads Dynamic Schema produced in step 3;&lt;/LI&gt;
&lt;LI&gt;it reads csv data file with dynamic schema and writes into databases.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I attach the job and subjob sample.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2024 21:48:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2488072#M141423</guid>
      <dc:creator>fcolagiacomo</dc:creator>
      <dc:date>2024-10-20T21:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Parse json without knowing his schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2488136#M141426</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;thanks for your effort... During the weekend I was thinking on a similar solution, but was not able to implement it... I guss the road is correct, actually, trying your project have some problems that "columns" in the json file are switched on the output table on a more complex example as the one below, where username is written on the dateAccess col and the others are switche of one....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
	"columns": [
		{
			"name": "user",
			"type": "string"
		},
		{
			"name": "organization",
			"type": "string"
		},
		{
			"name": "site",
			"type": "string"
		},
		{
			"name": "role",
			"type": "string"
		},
		{
			"name": "dateAccess",
			"type": "date"
		}
	],
	"rows": [
		{
			"user": {
				"value": "username1"
			},
			"organization": {
				"value": "org1"
			},
			"site": {
				"value": "site1"
			},
			"role": {
				"value": "role1"
			},
			"dateAccess": {
				"value": "12/05/2024 12:15:32"
			}
		},
		{
			"user": {
				"value": "username2"
			},
			"organization": {
				"value": "org2"
			},
			"site": {
				"value": "site2"
			},
			"role": {
				"value": "role2"
			},
			"dateAccess": {
				"value": "15/05/2024 15:12:45"
			}
		}
	]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the relative data csv:&lt;BR /&gt;user;organization;site;role;dateAccess&lt;BR /&gt;site1;role1;org1;12/05/2024 12:15:32;username1&lt;BR /&gt;site2;role2;org2;15/05/2024 15:12:45;username2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could also ask developers to slightly change the json, but not sure if that helps... Like this maybe:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
	"columns": [
		{
			"name": "user",
			"type": "string"
		},
		{
			"name": "organization",
			"type": "string"
		},
		{
			"name": "site",
			"type": "string"
		},
		{
			"name": "role",
			"type": "string"
		},
		{
			"name": "dateAccess",
			"type": "date"
		}
	],
	"rows": [
		{
			"user": "username1",
			"organization": "org1",
			"site": "site1",
			"role": "role1",
			"dateAccess": "12/05/2024 12:15:32"
		},
		{
			"user": "username2",
			"organization": "org2",
			"site": "site2",
			"role": "role2",
			"dateAccess": "15/05/2024 15:12:45"
		}
	]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 09:36:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2488136#M141426</guid>
      <dc:creator>lucaL</dc:creator>
      <dc:date>2024-10-21T09:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Parse json without knowing his schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2488334#M141432</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I fixed the job. I left you to improve date converting to send to database; you can use the same strategy of "columnTypes" or you can create more complex data structure.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 07:31:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2488334#M141432</guid>
      <dc:creator>fcolagiacomo</dc:creator>
      <dc:date>2024-10-22T07:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Parse json without knowing his schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2488346#M141434</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;thanks for your update, I will look into it! Yesterday I've elaborated also on your solution and ended up wit hthis, by sligtly modifying the input json as attached...&lt;/P&gt;
&lt;P&gt;Now I'm looking also to see if there's a way to save a dynamic schema on a file by making it auto contructing from a db table, that would be another solution to this automatism.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Luca&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 07:54:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parse-json-without-knowing-his-schema/m-p/2488346#M141434</guid>
      <dc:creator>lucaL</dc:creator>
      <dc:date>2024-10-22T07:54:52Z</dc:date>
    </item>
  </channel>
</rss>

