<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ZappyShell Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/zappyshell/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/zappyshell/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 30 Mar 2023 17:18:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>ZappyShell Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/zappyshell/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Export / Create JSON File in Informatica (from SQL Query / Database Tables)</title>
		<link>https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 30 Mar 2023 17:17:30 +0000</pubDate>
				<category><![CDATA[ZappyShell]]></category>
		<category><![CDATA[command line tools]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10020</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to create simple or complex JSON file in Informatica just in a few clicks. We will use the Powerful Export JSON Command line Builder from ZappyShell. Using this Portable / xCopy style command line you can build nested/complex JSON / XML or even CSV from single / [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/">Export / Create JSON File in Informatica (from SQL Query / Database Tables)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, you will learn how to create simple or complex JSON file in Informatica just in a few clicks. We will use the Powerful Export JSON Command line Builder from <a href="https://zappysys.com/products/zappyshell/data-export-command-line-tools-json-excel-csv-pdf/">ZappyShell</a>. Using this Portable / xCopy style command line you can build nested/complex JSON / XML or even CSV from single / multiple SQL Queries as Input or Select Database Tables as Source. Later you can copy generated command line from Tool and execute in any tool like Informatica / Talend / DataStage or Automation Script like Python / PowerShell.</p>
<h2>Prerequisite</h2>
<p>This article assumes you have access to Informatica Developer Tools and basic knowledge of command-line tools.</p>
<ol>
<li><a href="https://zappysys.com/products/zappyshell/">Download ZappyShell</a> Command line utility (Click on Download Button). You can get msi and Zip (Poratble / xCopy version)</li>
<li>If you want to use the Portable version just extract ZappyShell-xCopy zip to some folder lets say (C:\ZappyShell). If you installed MSI then its usually in C:\Program Files (x86)\ZappySys</li>
<li>Double click on DbCommandBuilder.exe <a href="https://zappysys.com/onlinehelp/zappyshell/index.htm#page=db/db.htm">as listed here</a>  to get started. At the end of this exercise, you will be able to generate something like the below JSON File in few clicks in Informatica or any other Tool / Programming Language you prefer which has option to invoke command line&#8230;</li>
<li>For all possible command line options <a href="https://zappysys.com/onlinehelp/zappyshell/scr/db/db-db-export.htm" target="_blank" rel="noopener">Refer this</a></li>
<li>So lets get started</li>
</ol>
<h2>Sample JSON Created by ZappyShell from Informatica</h2>
<p>&nbsp;</p>
<div style="width: 680px" class="wp-caption alignnone"><img fetchpriority="high" decoding="async" class="figureimage" title="Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-output.png" alt="Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)" width="670" height="626" /><p class="wp-caption-text">Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)</p></div>
<h2>Create Command Line to Export JSON File from Database SQL Query / Tables</h2>
<p>In this section, we will see how to build Command Line which you can then execute in Informatica Command Time and later Schedule Export Job to Produce JSON File on a predefined schedule or manually.</p>
<ol>
<li>Open DbCommandBuilder.exe and configure the Connection / Data source(s) <a href="https://zappysys.com/onlinehelp/zappyshell/index.htm#page=db/db.htm">as listed here</a> .<img decoding="async" class="figureimage" title="ZappyShell - Open Installed File or Directory" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/open-zappyshell.png" alt="ZappyShell - Open Installed File or Directory" /></li>
<li>Select JSON Export Option from the Dropdown. You can also choose XML, Excel or CSV<img decoding="async" class="figureimage" title="XML file generate" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-xml.png" alt="XML file generate" /></li>
<li>You can use the Custom Layout Option if you wish to Export using custom Output Layout else just choose tables you like to export or type SQL query.<br />
<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout.png" alt="JSON Custom Layout" /></li>
<li>Configure your Input Dataset(s) (can be SQL Queries or Tables) and define Desired Layout for your Output File.<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout-add-dataset.png" alt="JSON Custom Layout - Add Dataset" /></li>
<li>Here is just an example of how to define an Array for a nested layout in a JSON or XML file.<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout-add-element-in-document-array.png" alt="Layout Editor to define Structure of JSON / XML Output" /></li>
<li>t the end of configuration you may see command line like below (more examples <a href="https://zappysys.com/onlinehelp/zappyshell/scr/db/db-db-export.htm">listed here</a>)<strong>Example: Simple mode Export (Microsoft SQL Server)</strong><br />
<pre class="crayon-plain-tag">db.exe export customers --json -o c:\data\cust.json --connstr "Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;" -y</pre>
<strong>Example: For Simple mode Export (MySQL SQL Server &#8211; ODBC Driver)</strong><br />
<pre class="crayon-plain-tag">export customers --out c:\data\customers.json --json --overwrite --connstr "Driver={MySQL ODBC 5.2 ANSI Driver};Server=your_server_name_or_ip;Port=3306;Uid=user1;pwd=SomeP@ssword;Database=your_db_name"</pre>
<strong><strong>Example: For custom layout mode Export<br />
</strong></strong><br />
<pre class="crayon-plain-tag">export --map c:\data\MySampleMap.xml -o c:\data\customers.json --json --connstr "Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;" -y</pre>
</li>
<li>Once the Command line is created you can click <strong>Run</strong> to test and then copy it into tools like Informatica Command Task (see next section).</li>
</ol>
<h2>Export / Create JSON File In Informatica</h2>
<ol>
<li>Once the command line is prepared (see previous section) we can open Informatica Developer (D)</li>
<li>Connect to your Repository and create a new workflow</li>
<li>Drag new Command Task, from Toolbox and double click to edit
<div id="attachment_10021" style="width: 691px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png"><img decoding="async" aria-describedby="caption-attachment-10021" class="size-full wp-image-10021" src="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png" alt="Informatica Command Task" width="681" height="281" srcset="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png 681w, https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task-300x124.png 300w" sizes="(max-width: 681px) 100vw, 681px" /></a><p id="caption-attachment-10021" class="wp-caption-text">Informatica Command Task</p></div></li>
<li>Enter the sample command line we obtained from the previous step</li>
<li>Save the workflow and run it&#8230; That&#8217;s it you will see the JSON file generated</li>
</ol>
<h2>Export / Create XML File In Informatica</h2>
<p>Same Steps as above except choose File format as XML and you will see output like the below once you run the command line.</p>
<div style="width: 905px" class="wp-caption alignnone"><img decoding="async" class="figureimage" title="Export / Create XML File In Informatica" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-xml.png" alt="Export / Create XML File In Informatica" width="895" height="160" /><p class="wp-caption-text">Export / Create XML File In Informatica</p></div>
<h2>Export / Create CSV File In Informatica</h2>
<p>Same Steps as above except choose File format as CSV and you will see output like the below once you run the command line.</p>
<div style="width: 817px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="figureimage" title="Generate CSV Files in Informatica" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-csv-output.png" alt="Generate CSV Files in Informatica" width="807" height="507" /><p class="wp-caption-text">Generate CSV Files in Informatica</p></div>
<h2>Export / Create Excel File In Informatica</h2>
<p>Same Steps as above except choose File format as Excel and you will see output like the below once you run the command line.</p>
<p><img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/export-sql-server-table-to-excel-split-by-column.png" alt="Export SQL Server Table to Excel files (split automatically using group by column)" /></p>
<h2>Conclusion</h2>
<p>In this post, we just saw how easy it is to generate JSON / XML / Excel or CSV files in tools like Informatica, Talend, python, PowerShell in few clicks without coding. You can schedule job to generate JSON / XML files from Database tables or SQL Query. <a href="https://zappysys.com/products/zappyshell/download/">Download ZappyShell</a> Today and try it to see what else you can do with it.</p>
<p>The post <a href="https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/">Export / Create JSON File in Informatica (from SQL Query / Database Tables)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
