<?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>ODBC App Integration Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Tue, 23 Dec 2025 13:01:44 +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>ODBC App Integration Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</title>
		<link>https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 27 Jul 2019 06:34:32 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Access]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[hana]]></category>
		<category><![CDATA[ms access]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[s/4hana]]></category>
		<category><![CDATA[sap]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7506</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how to read JIRA data in SQL Server. Now let’s learn how to Import SAP S/4HANA OData Service Data Into MS Access. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use ODBC XML Driver to read SAP data and load [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/">Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/SAP_S4HANA.png" target="_blank" rel="noopener"><img decoding="async" class="alignleft wp-image-7491 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/07/SAP_S4HANA.png" alt="SAP S/4HANA" width="150" height="150" /></a></p>
<p>In our previous blog we saw how to <a href="https://zappysys.com/blog/load-jira-data-sql-server-odbc-call-rest-api/" target="_blank" rel="noopener">read JIRA data in SQL Server</a>. Now let’s learn how to Import SAP S/4HANA OData Service Data Into MS Access. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML Driver</a> to read SAP data and load into MS Access.</p>
<p>So, let’s get started.</p>
<div id="custom_post_widget-2523" class="content_block">
<h2></h2>
<h2></h2>
<h2><span id="Requirements">Requirements</span></h2>
<ol>
<li>A first requirement, make sure that Microsoft Access installed</li>
<li>Finally, make sure to have <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
</ol>
</div>
<h2><span id="About_SAP_HANA_OData_REST_API_Service">About SAP HANA / OData REST API Service</span></h2>
<p>You can expose your SAP Data using ODATA REST API Service. Here is a <a href="https://www.erpworkbench.com/sap-webapps/segw-odata-gateway-service.htm" target="_blank" rel="noopener">good article</a> which shows how to expose data as OData Service.   For more information on SAP OData Service feature check this <a href="https://help.sap.com/doc/05d53b2d3bbb43d2ab5efa23829b2777/1610%20001/en-US/frameset.htm?ecaeea50ca692309e10000000a445394.html" target="_blank" rel="noopener">SAP help page</a>. If you are new to OData Standard then <a href="https://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">read here</a> to know more how OData can facilitate data extraction using HTTP REST API. If you need Sample XML based OData Service then use below test URLs.</p><pre class="crayon-plain-tag">https://services.odata.org/Northwind/Northwind.svc/
https://services.odata.org/Northwind/Northwind.svc/Customers
https://services.odata.org/Northwind/Northwind.svc/Orders
https://services.odata.org/Northwind/Northwind.svc/Invoices
https://services.odata.org/Northwind/Northwind.svc/Products</pre><p>
Now let’s look at how to read SAP Data using ODBC Driver. At this point we assume you have exposed your data as OData Endpoint.</p>
<h2><span id="Read_SAP_HANA_data_using_XML_Source">Read SAP S/4HANA data using XML Driver</span></h2>
<p>First let’s look at steps to configure XML Driver. We will read data from SAP S/4HANA OData Service and then in next section we will look at how to load data into MS Access or other target.</p>
<ol>
<li>First, <strong>Windows search</strong>, write <strong>ODBC</strong> and select the <strong>ODBC Data sources (32 bits)</strong>
<div id="attachment_2780" class="wp-caption aligncenter">
<div id="attachment_2780" style="width: 395px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?ssl=1" target="_blank" rel="noopener"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-2780" class="wp-image-2780 size-full" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?zoom=0.8999999761581421&amp;resize=385%2C520&amp;ssl=1" alt="Open ODBC Data source" width="385" height="520" /></a><p id="caption-attachment-2780" class="wp-caption-text">Open ODBC Data Source</p></div>
</div>
</li>
<li>As a second step, in ODBC Data source Administrator press the <strong>Add</strong> button.
<div id="attachment_2725" style="width: 600px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2725" class="wp-image-2725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png" alt="Add ZappySys" width="590" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys-300x215.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></a><p id="caption-attachment-2725" class="wp-caption-text">Add ZappySys</p></div></li>
<li>In this step, create the new data source, select <strong>ZappySys XML Driver.</strong>
<div id="attachment_2772" style="width: 302px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2772" class="wp-image-2772 size-medium" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?zoom=0.8999999761581421&amp;resize=292%2C218&amp;ssl=1" alt="add new zappysys" width="292" height="217" /></a><p id="caption-attachment-2772" class="wp-caption-text">Add new zappysys xml driver</p></div></li>
<li>Now edit that XML data source to configure it. Enter your OData Service URL its typically like below. Replace 3 parts with your own value (i.e. replace {MY-INSTANCE},  {MY-PROJECT}, {MY-TABLE})<br />
<pre class="crayon-plain-tag">https://{MY-INSTANCE}/sap/opu/odata/sap/{MY-PROJECT}/{MY-TABLE}</pre>
For example if you are hosting SAP HANA in Cloud Instance then your URL may look like below<br />
<pre class="crayon-plain-tag">https://myXXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/MyTestProject/PurchaseOrders</pre>
And create New ZS-HTTP connection in it select <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">Basic Authentication</a> and enter your SAP HANA UserID / Password to call OData Service and select the desire filter.</p>
<div id="attachment_7497" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7497" class="wp-image-7497 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-768x537.png" alt="XML Driver : SAP S/4HANA OData Service Configuration" width="720" height="503" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-768x537.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-300x210.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service.png 1019w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7497" class="wp-caption-text">XML Driver : SAP S/4HANA OData Service Configuration</p></div></li>
<li>Now go to Data Format / Compression (Zip/GZip) tab and select Data Format as OData to get all the records.
<div id="attachment_7498" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7498" class="wp-image-7498 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-768x446.png" alt="Data Format : Odata" width="720" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-768x446.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-300x174.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format.png 792w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7498" class="wp-caption-text">Data Format : Odata</p></div></li>
<li>Finally, now using Query Builder and Code Generator we will generate the query and click on Preview the data.
<div id="attachment_6416" style="width: 766px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6416" class="wp-image-6416 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" alt="odbc-json-driver-generate-quickbooks-query" width="756" height="432" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png 756w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query-300x171.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></a><p id="caption-attachment-6416" class="wp-caption-text">Generate Query</p></div></li>
<li>That’s it we are ready to load SAP S/4HANA OData Service data to MS Access.</li>
</ol>
<h2>Load SAP S/4HANA OData Service in MS Access</h2>
<ol>
<li>In MS Access, go to <strong>External Data</strong> Ribbon and select <strong>New Data Source</strong> and select <strong>From Other Sources</strong> and <strong>ODBC Database</strong>.
<div id="attachment_5171" style="width: 1235px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5171" class="wp-image-5171 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png" alt="Configuration in MS Access: Import Data From REST API" width="1225" height="572" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png 1225w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-300x140.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-768x359.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-1024x478.png 1024w" sizes="(max-width: 1225px) 100vw, 1225px" /></a><p id="caption-attachment-5171" class="wp-caption-text">A configuration in MS Access: Import Data From REST API</p></div></li>
<li>Select the Source and destination of the data, select <strong>Import the source data into a new table in the current database</strong> and press OK.
<div id="attachment_2726" class="wp-caption alignnone">
<div id="attachment_5172" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5172" class="wp-image-5172 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png" alt="Get External Data - ODBC Database" width="736" height="543" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc-300x221.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5172" class="wp-caption-text">Get External Data &#8211; ODBC Database</p></div>
</div>
</li>
<li>Select your newly created JSON Driver Data Source and click<strong><strong><strong> OK.<br />
</strong></strong></strong></p>
<div id="attachment_5223" style="width: 455px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5223" class="wp-image-5223 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png" alt="Get External Data - Select your newly created ODBC Data Source (JSON Driver)" width="445" height="395" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png 445w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1-300x266.png 300w" sizes="(max-width: 445px) 100vw, 445px" /></a><p id="caption-attachment-5223" class="wp-caption-text">Get External Data &#8211; Select your newly created ODBC Data Source (JSON Driver)</p></div>
<p>&nbsp;</li>
<li>Select tables from the list of tables in the Import Objects screen and click <strong><strong>OK.<br />
</strong></strong></p>
<div id="attachment_5174" style="width: 473px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5174" class="wp-image-5174 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png" alt="Get External Data - Select tables from Import Objects Screen" width="463" height="452" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png 463w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables-300x293.png 300w" sizes="(max-width: 463px) 100vw, 463px" /></a><p id="caption-attachment-5174" class="wp-caption-text">Get External Data &#8211; Select tables from Import Objects Screen</p></div></li>
<li>Select <strong>Save Import Steps</strong> from the screen and click on <strong>Save Import</strong> button.
<div id="attachment_5175" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5175" class="wp-image-5175 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png" alt="Get External Data - Select Save Import Steps" width="736" height="576" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps-300x235.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5175" class="wp-caption-text">Get External Data &#8211; Select Save Import Steps</p></div></li>
<li>That&#8217;s it If everything is OK, you will be able to see the data.
<div id="attachment_5176" style="width: 1353px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5176" class="wp-image-5176 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png" alt="Data Imported Successfully in MS Access DB Table" width="1343" height="404" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png 1343w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-300x90.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-768x231.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-1024x308.png 1024w" sizes="(max-width: 1343px) 100vw, 1343px" /></a><p id="caption-attachment-5176" class="wp-caption-text">Data Imported Successfully in MS Access DB Table</p></div></li>
</ol>
<h2><span id="How_to_import_REST_API_data_to_Excel">How to link REST API data to Access</span></h2>
<p>The linking process is very similar to importing data into the Access table. Follow steps of the previous paragraph &#8211; <a href="#how-to-import-data">How to import REST API data to Access</a> &#8211; but on step 2 select the second option to create a <em><strong>linked table</strong></em><b><i> </i></b>instead. Then at last it&#8217;s asked to select a unique record identifier, don&#8217;t select anything:</p>
<div id="attachment_7445" style="width: 326px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7445" class="wp-image-7445 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png" alt="Link table approach - don't select unique record identifier" width="316" height="382" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png 316w, https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack-248x300.png 248w" sizes="(max-width: 316px) 100vw, 316px" /><p id="caption-attachment-7445" class="wp-caption-text">Linked table approach &#8211; Don&#8217;t select a unique Record identifier</p></div>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">SAP S/4HANA Integration with Other BI Tools</span></h2>
<div class="content_block" id="custom_post_widget-7051">ZappySys ODBC Drivers built using ODBC standard which is widely adopted by industry for a long time. Which mean the majority of BI Tools / Database Engines / ETL Tools already there will support native / 3rd party ODBC Drivers. Below is the small list of most popular tools / programming languages our Drivers support. If your tool / programming language doesn't appear in the below list, which means we have not documented use case but as long as your tool supports ODBC Standard, our drivers should work fine.

&nbsp;

<img loading="lazy" decoding="async" class="" src="//zappysys.com/images/odbc-powerpack/odbc-powerpack-integration.jpg" alt="ZappySys ODBC Drivers for REST API, JSON, XML - Integrate with Power BI, Tableau, QlikView, QlikSense, Informatica PowerCenter, Excel, SQL Server, SSIS, SSAS, SSRS, Visual Studio / WinForm / WCF, Python, C#, VB.net, PHP. PowerShell " width="750" height="372" />
<table style="valign: top;">
<tbody>
<tr>
<td>
<p style="text-align: center;"><strong>BI / Reporting Tools
Integration</strong></p>
</td>
<td style="text-align: center;"><strong>ETL Tools
Integration
</strong></td>
<td style="text-align: center;"><strong>Programming Languages</strong>
<strong>Integration</strong></td>
</tr>
<tr>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/" target="_blank" rel="noopener">Microsoft Power BI</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-tableau-read-json-soap-xml-csv/">Tableau</a></li>
 	<li><a href="https://zappysys.com/blog/read-rest-api-using-ssrs-reports-call-json-xml-web-service/" target="_blank" rel="noopener">SSRS (SQL Reporting Services)</a></li>
 	<li><a href="https://zappysys.com/blog/qlik-rest-connector-examples-read-json-xml-api/" target="_blank" rel="noopener">QlikView /Qlik Sense</a></li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/" target="_blank" rel="noopener">MicroStrategy</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-google-sheet-call-appscript-load-json-soap-xml-csv/" target="_blank" rel="noopener">Google Sheet</a></li>
 	<li><a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/" target="_blank" rel="noopener">Microsoft Excel</a></li>
 	<li><a href="https://zappysys.com/api/integration-hub/rest-api-connector/access?context=connector" target="_blank" rel="noopener">Microsoft Access</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/" target="_blank" rel="noopener">Informatica PowerCenter</a> (Windows)</li>
 	<li>Informatica Cloud</li>
 	<li>SSIS (SQL Integration Services)</li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">SQL Server</a></li>
 	<li><a href="https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/" target="_blank" rel="noopener">Talend Data Studio</a></li>
 	<li><a href="https://zappysys.com/blog/pentaho-read-rest-api-in-pentaho/" target="_blank" rel="noopener">Pentaho Kettle</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li>Visual Studio</li>
 	<li><a href="https://zappysys.com/blog/calling-rest-api-in-c/" target="_blank" rel="noopener">C#</a></li>
 	<li>C++</li>
 	<li><a href="https://zappysys.com/blog/connect-java-to-rest-api-json-soap-xml/" target="_blank" rel="noopener">JAVA</a></li>
 	<li><a href="https://zappysys.com/blog/set-rest-python-client/" target="_blank" rel="noopener">Python</a></li>
 	<li>PHP</li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-powershell-script-export-json-csv/" target="_blank" rel="noopener">PowerShell</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">T-SQL (Using Linked Server)</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
&nbsp;</div>
<div class="content_block" id="custom_post_widget-8935"><h2>Troubleshooting Errors</h2>
<p>While running in Access\Excel\other and reading data from DSN created with ODBC PowerPack, if you get this error "<strong>License type [ODBC_PP_TRIAL] not found or its expired</strong>"</p>

<p>Please refer to this article for the same:  <a href="https://zappysys.zendesk.com/hc/en-us/articles/360042521533-Troubleshooting-License-type-ODBC-PP-TRIAL-not-found-or-its-expired-error-in-Microsoft-Access" target="_blank" rel="noopener">Troubleshooting "License type [ODBC_PP_TRIAL] not found or its expired" error in Microsoft Access</a></p></div>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">Conclusion</span></h2>
<p>So in this blog, we learned how to Import SAP S/4HANA OData Service Data in Access using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML / SOAP API Driver</a> in a very simple way. You can achieve many more functionalities with this tool. Check our blogs/articles on <strong><a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/" target="_blank" rel="noopener">XML File / REST API Driver</a> </strong>to find out what <em>this tool</em> is capable of more.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of SAP S/4HANA OData Service with our tools:</p>
<ul>
<li><a href="https://api.sap.com/" target="_blank" rel="noopener">SAP API Business Hub</a></li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML / SOAP API Driver</a>, you can also find <a href="https://youtu.be/iwezz0Z3D4U" target="_blank" rel="noopener">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of XML Driver.</li>
<li><strong>Blog/articles link</strong>: <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/" target="_blank" rel="noopener">https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/">Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Export REST API to MS Access using VBA Command Button</title>
		<link>https://zappysys.com/blog/export-rest-api-ms-access-using-vba-command-button/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 29 Jun 2019 09:34:55 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[Reporting - Microsoft Access]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[command button]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[vba]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7317</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how to export REST API to CSV using c# or Python. In this post we will look at specific example on How to Export REST API to MS Access using VBA Command Button, along with few other topics such as how to make REST API Call, how to [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/export-rest-api-ms-access-using-vba-command-button/">How to Export REST API to MS Access using VBA Command Button</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/VBA_250x250.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-7318 size-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2019/06/VBA_250x250-150x150.png" alt="VBA" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/VBA_250x250-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/06/VBA_250x250.png 250w" sizes="(max-width: 150px) 100vw, 150px" /></a>In our previous blog we saw how to <a href="https://zappysys.com/blog/how-to-export-rest-api-to-csv/" target="_blank" rel="noopener">export REST API to CSV using c# or Python</a>. In this post we will look at specific example on <strong>How to Export REST API to MS Access using VBA Command Button</strong>, along with few other topics such as how to make <strong>REST API Call</strong>, how to read all Customers data from Odata using our ODBC JSON Driver and load it into the Ms Access Table.</p>
<p>We will go through the steps to read data from Odata and Load into MS Access using VBA Command Button.</p>
<p>In nutshell, this post will focus on how to make ODBC Driver Call using VBA.</p>
<p>So let’s get started.</p>
<h2><span id="Requirements">Requirements</span></h2>
<ol>
<li>First of all, you will need <a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
<li>Secondly, Make sure that Microsoft Access installed for VBA example.</li>
</ol>
<h2><span id="An_introduction_to_Rest_API_and_OData">An introduction to Rest API and OData</span></h2>
<p>In this example, we will use OData (Open Data Protocol) to consume REST API. REST API (Representational State Transfer Application Program Interface) allows handling the interoperability between computers and the internet.</p>
<p>In REST API we can handle web services in different formats. In this example, we will work with the Northwind example. The Northwind example is available in this URL:</p>
<div id="crayon-5bc180f1dd015720033381" class="crayon-syntax crayon-theme-vs2012 crayon-font-courier-new crayon-os-pc print-yes notranslate">
<div class="crayon-main">
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc</pre>
</div>
</div>
<ol>
<li>By default, the data is displayed in XML format. To show the data in JSON use this URL:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/?$format=json</pre>
</li>
<li>There are collections of data like Categories, CustomerDemographic, Customers, Invoices, etc. For example, the following URL will show the data of the categories collection:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json</pre>
</li>
<li>In the next steps, we will use ZappySys drivers to connect to this URL and query using OData.</li>
</ol>
<h2><span id="Configure_ODBC_DSN_for_ZappySys_JSON_Driver">Configure ODBC DSN for ZappySys JSON Driver</span></h2>
<p>ODBC driver can be accessed in two modes.</p>
<ol>
<li>Using DSN</li>
<li>Without DSN (Supply direct Connection String e.g. <strong>DRIVER={ZappySys JSON Driver}; ……..</strong> )</li>
</ol>
<p>In this article, we will use the DSN approach (User DSN). We will first add the ZappySys JSON Driver in the ODBC Data Source Administrator.</p>
<p>Follow these steps to accomplish the task:</p>
<ol>
<li>First, <strong>Windows search</strong>, write <strong>ODBC</strong> and select the <strong>ODBC Data sources (32 bits)</strong>
<div id="attachment_2780" class="wp-caption aligncenter">
<div id="attachment_2780" style="width: 395px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2780" class="wp-image-2780 size-full" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?zoom=0.8999999761581421&amp;resize=385%2C520&amp;ssl=1" alt="Open ODBC Data source" width="385" height="520" /></a><p id="caption-attachment-2780" class="wp-caption-text">Open ODBC Data Source</p></div>
</div>
</li>
<li>As a second step, in ODBC Data source Administrator press the <strong>Add</strong> button.
<div id="attachment_2725" class="wp-caption aligncenter">
<div id="attachment_2725" style="width: 600px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2725" class="wp-image-2725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png" alt="Add ZappySys" width="590" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys-300x215.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></a><p id="caption-attachment-2725" class="wp-caption-text">Add ZappySys</p></div>
</div>
</li>
<li>In this step, create the new data source, select <strong>ZappySys JSON Driver.</strong>
<div id="attachment_2772" class="wp-caption aligncenter">
<div id="attachment_2772" style="width: 302px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2772" class="wp-image-2772 size-medium" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?zoom=0.8999999761581421&amp;resize=292%2C218&amp;ssl=1" alt="add new zappysys" width="292" height="217" /></a><p id="caption-attachment-2772" class="wp-caption-text">Add new zappysys json driver</p></div>
</div>
</li>
<li>Here we have several properties, write a data source name. In this example, the name will be ZappySys JSON to Excel.</li>
<li>The Data Source (URL or file path) can specify the URL of the source or if it is a local file, you can specify the local path. In this example, the URL is:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json</pre>
You can also specify a local file path as Data SourceFor a single file:  c:\data\myfile_1.json<br />
For multiple files: c:\data\myfile_*.json</li>
<li>Configure the ODBC JSON Driver like this and test the connection:
<div id="attachment_7321" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-odata-configuration.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7321" class="wp-image-7321 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-odata-configuration-768x698.png" alt="Configure JSON Driver for REST API Call" width="720" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-odata-configuration-768x698.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-odata-configuration-300x273.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-odata-configuration.png 849w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7321" class="wp-caption-text">Configure JSON Driver for REST API Call</p></div></li>
<li>Now click on Copy Connection string Button.
<div id="attachment_7322" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-driver-copy-connection-string.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7322" class="wp-image-7322 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-driver-copy-connection-string-768x672.png" alt="ODBC Driver : Copy Connection String" width="720" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-driver-copy-connection-string-768x672.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-driver-copy-connection-string-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-driver-copy-connection-string.png 802w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7322" class="wp-caption-text">ODBC Driver : Copy Connection String</p></div></li>
<li>That&#8217;s it Connection string is copied to clipboard. Now let&#8217;s use this connection string in the VBA code.</li>
</ol>
<h2><span id="How_to_import_REST_API_data_to_Excel">How to import REST API data to Access using VBA</span></h2>
<ol>
<li>Open the access database and create the table with the desire columns to get API data in it.
<div id="attachment_7324" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7324" class="wp-image-7324 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access-768x511.png" alt="Create Table in Access" width="720" height="479" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access-768x511.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access-300x200.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access-1024x682.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access-272x182.png 272w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access.png 1546w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7324" class="wp-caption-text">Create Table in Access</p></div></li>
<li>Now close the table, and go to Create menu and click on Form Design to add the new blank form in design view.
<div id="attachment_7325" style="width: 642px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-form-desing-access.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7325" class="wp-image-7325 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-form-desing-access.png" alt="Access : Create a New Form in Design View" width="632" height="402" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-form-desing-access.png 632w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-form-desing-access-300x191.png 300w" sizes="(max-width: 632px) 100vw, 632px" /></a><p id="caption-attachment-7325" class="wp-caption-text">Access : Create a New Form in Design View</p></div></li>
<li>It will open the new form in the design view, now add new button with the desire text.
<div id="attachment_7326" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7326" class="wp-image-7326 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button-768x459.png" alt="Access : Add Command Button" width="720" height="430" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button-768x459.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button-300x179.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button-1024x612.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button.png 1215w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7326" class="wp-caption-text">Access : Add Command Button</p></div></li>
<li>Now right click on button and go to properties and click on &#8230; builder button and select Code Builder.
<div id="attachment_7327" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-select-code-builder-access.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7327" class="wp-image-7327 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-select-code-builder-access-768x529.png" alt="Access : Code builder" width="720" height="496" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-select-code-builder-access-768x529.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-select-code-builder-access-300x207.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-select-code-builder-access.png 934w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7327" class="wp-caption-text">Access : Code builder</p></div></li>
<li>When you click the button, it will open a new VBA instance, executing the command event associated with that button click.<br />
Next, insert the provided code inside the <i>Command5_Click()</i> function. In this example, the button is named Command5, and that&#8217;s why it&#8217;s added within this click function.<br />
The provided code encompasses the following steps:</p>
<ol>
<li><strong>Ensure the table is closed:</strong><br />
It&#8217;s crucial to close the table beforehand; otherwise, executing the subsequent command may result in an error.</li>
<li><strong>Truncate the table:<br />
</strong>Clear the existing data from the table. If you want to add fresh data each time</li>
<li><strong>Make the API call:<br />
</strong>Utilize the ODBC Driver connection string to initiate an API call.</li>
<li><strong>Insert into the Access table:<br />
</strong>Use the retrieved data from the API call to insert new records into the Access table.</li>
<li><strong>Open the table:<br />
</strong>Reopen the table to inspect the newly inserted data.</li>
</ol>
<pre class="crayon-plain-tag">' Pass your ZappySys Driver Connection String: Refer to below link to learn how to obtain the ZappySys Driver connection string:
    ' https://community.zappysys.com/t/how-to-copy-the-zappysys-driver-connection-string/172
    Dim zsConnStr As String
    zsConnStr = "DRIVER={ZappySys JSON Driver};DataPath='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json';Filter='$.value[*]';IncludeParentColumns=0;RequestMethod='GET';RequestHeaders='cache-control: no-cache || Accept: */*'"
        
    'ZappySys Driver Query
    Dim zsDriverQuery As String
    zsDriverQuery = "Select * from $"
 
    'MS Access Table Name
    Dim tableName As String
    tableName = "tblCustomers"

    ' 1. Close Table If Open
    CloseTableIfOpen tableName

    ' 2. Truncate Table (Optional): If you want to load fresh data each time, uncomment the line below.
    'TruncateTable tableName

    ' 3. Import Data From API Into Table
    ImportDataFromAPIIntoTable zsConnStr, zsDriverQuery, tableName

    ' 4. Open Table for Viewing (Optional)
    OpenTableForViewing tableName

    ' Show Message after Loading Data Successfully
    MsgBox "Data Loaded Successfully!"</pre>
<div id="attachment_10917" style="width: 744px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ms-access-vba-button-onclick.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10917" class="size-full wp-image-10917" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ms-access-vba-button-onclick.png" alt="ms-access-vba-button-onclick" width="734" height="809" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ms-access-vba-button-onclick.png 734w, https://zappysys.com/blog/wp-content/uploads/2019/06/ms-access-vba-button-onclick-272x300.png 272w" sizes="(max-width: 734px) 100vw, 734px" /></a><p id="caption-attachment-10917" class="wp-caption-text">VBA Button OnClick Function</p></div>
<p>&nbsp;</li>
<li>Below the <i>Private Sub Command5_Click()</i> function, please add the necessary functions and procedures as provided below:</p><pre class="crayon-plain-tag">Sub ImportDataFromAPIIntoTable(zsConnStr As String, zsDriverQuery As String, tableName As String)
    Dim dscn As New ADODB.Connection
    dscn.Open zsConnStr

    Dim rs As Object
    Set rs = New ADODB.Recordset
    
    ''ZappySys Driver Query Goes here
    rs.Open zsDriverQuery, dscn

    Dim strQuery As String
    strQuery = ""
    ' Check if the recordset is not empty
    If Not rs.EOF Then
        ' Get the field names
        Dim fieldNames As String
        fieldNames = ""

        For i = 1 To rs.Fields.Count
            fieldNames = fieldNames &amp; rs.Fields(i - 1).Name
            If i &lt; rs.Fields.Count Then
                fieldNames = fieldNames &amp; ","
            End If
        Next i

        ' Generate the INSERT script
        Dim insertScript As String
        ' Iterate through the recordset to get the values
        Do Until rs.EOF
            ' Generate Insert script
            insertScript = "INSERT INTO " &amp; tableName &amp; " (" &amp; fieldNames &amp; ") VALUES"
            insertScript = insertScript &amp; vbCrLf &amp; "("
            For i = 1 To rs.Fields.Count
                ' Assuming all fields are text, you might need to handle different data types appropriately
                
                If IsNull(rs.Fields(i - 1).Value) Then
                    insertScript = insertScript &amp; "''"
                Else
                    insertScript = insertScript &amp; "'" &amp; EscapeSingleQuote(rs.Fields(i - 1).Value) &amp; "'"
                End If
                
                
                If i &lt; rs.Fields.Count Then
                    insertScript = insertScript &amp; ","
                End If
            Next i
            insertScript = insertScript &amp; ")"
            
            'Insert data
            CurrentProject.Connection.Execute insertScript
            
            rs.MoveNext
        Loop
    End If
    
    ' Close the recordset and connection
    rs.Close
    dscn.Close
    Set rs = Nothing
    Set conn = Nothing
    
End Sub

Sub OpenTableForViewing(tableName As String)
    If Not IsTableOpen(tableName) Then
        DoCmd.OpenTable tableName
    End If
End Sub

Public Function IsTableOpen(strName As String) As Boolean
     IsTableOpen = SysCmd(acSysCmdGetObjectState, acTable, strName)
End Function

Sub CloseTableIfOpen(tableName As String)
    If IsTableOpen(tableName) Then
        DoCmd.SelectObject acTable, tableName
        DoCmd.RunCommand acCmdSaveRecord
        DoCmd.Close
    End If
End Sub


Sub TruncateTable(tableName As String)
    Dim strSql As String
    strSql = "DELETE FROM " &amp; tableName &amp; ";"
    CurrentProject.Connection.Execute strSql
End Sub

Public Function EscapeSingleQuote(strData As String) As String
     EscapeSingleQuote = Replace(strData, "'", "''")
End Function</pre><p>
</li>
<li>Now, save the VBA form code and provide some appropriate form names.
<div id="attachment_7332" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7332" class="size-medium_large wp-image-7332" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form-768x943.png" alt="Save form vba code" width="720" height="884" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form-768x943.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form-244x300.png 244w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form-834x1024.png 834w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form.png 849w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7332" class="wp-caption-text">Save form vba code</p></div>
<p>&nbsp;</li>
<li>Make sure to add the reference to the Microsoft ActiveX Data Objects X.0 Library in the project settings.In Microsoft Access VBA,<br />
You can add the reference to the Microsoft ActiveX Data Objects X.0 Library by following these steps:</p>
<ol>
<li>In the VBA editor, go to &#8220;Tools&#8221; in the menu and select &#8220;References.&#8221;</li>
<li>In the References dialog box, scroll down the list to find &#8220;Microsoft ActiveX Data Objects X.0 Library&#8221; (where &#8220;X.0&#8221; corresponds to the version number, such as 6.1, 2.8, etc.).</li>
<li>Check the box next to the appropriate version to enable the reference.</li>
<li>Click &#8220;OK&#8221; to save the changes and close the References dialog box.</li>
</ol>
<p>Now, your Access project has a reference to the Microsoft ActiveX Data Objects library, and you can use its features in your VBA code.</p>
<div id="attachment_7336" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-add-reference.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7336" class="size-medium_large wp-image-7336" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-add-reference-768x648.png" alt="Access : Add reference" width="720" height="608" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-add-reference-768x648.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-add-reference-300x253.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-add-reference.png 804w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7336" class="wp-caption-text">Access : Add reference</p></div>
<p>If the MS ActiveX reference is not added, an error will be thrown.</p>
<div id="attachment_7335" style="width: 721px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-error-type-not-found.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7335" class="wp-image-7335 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-error-type-not-found-e1705479944324.png" alt="VBA : Error Type not defined" width="711" height="797" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-error-type-not-found-e1705479944324.png 711w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-error-type-not-found-e1705479944324-268x300.png 268w" sizes="(max-width: 711px) 100vw, 711px" /></a><p id="caption-attachment-7335" class="wp-caption-text">VBA : Error Type not defined</p></div></li>
<li>Close the code project, open the form in Form View, and click on the button.
<div id="attachment_7333" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-click-button.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7333" class="size-medium_large wp-image-7333" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-click-button-768x705.png" alt="Access : Click Command Button" width="720" height="661" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-click-button-768x705.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-click-button-300x275.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-click-button.png 939w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7333" class="wp-caption-text">Access : Click Command Button</p></div></li>
<li>After clicking the button, it will initiate a REST API call, insert the data into the Access table, and open the table to display the inserted records along with a success message.
<div id="attachment_7334" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-code-success-message.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7334" class="size-medium_large wp-image-7334" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-code-success-message-768x705.png" alt="Access : Open the table" width="720" height="661" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-code-success-message-768x705.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-code-success-message-300x275.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-code-success-message.png 939w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7334" class="wp-caption-text">Access : Open the table</p></div></li>
</ol>
<div class="content_block" id="custom_post_widget-8935"><h2>Troubleshooting Errors</h2>
<p>While running in Access\Excel\other and reading data from DSN created with ODBC PowerPack, if you get this error "<strong>License type [ODBC_PP_TRIAL] not found or its expired</strong>"</p>

<p>Please refer to this article for the same:  <a href="https://zappysys.zendesk.com/hc/en-us/articles/360042521533-Troubleshooting-License-type-ODBC-PP-TRIAL-not-found-or-its-expired-error-in-Microsoft-Access" target="_blank" rel="noopener">Troubleshooting "License type [ODBC_PP_TRIAL] not found or its expired" error in Microsoft Access</a></p></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>In this article, we saw how to use VBA to call REST API. We show how to do REST API calls in Access using the ZappySys ODBC driver. Also, we show how to write VBA Code in MS Access for command button to make REST API call, truncate access table and insert record in the access table using VBA code. If you liked this article and you want to try, you can download the <a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">ZappySys ODBC installer here</a>.</p>
<h2><span id="References">References</span></h2>
<ul>
<li><a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">ZappySys ODBC installer.</a></li>
<li><a href="https://stackoverflow.com/questions/49984642/access-odbc-query" target="_blank" rel="noopener">Access ODBC Query</a></li>
<li><a href="https://docs.microsoft.com/en-us/sql/ado/guide/appendixes/using-ado-with-microsoft-visual-basic?view=sql-server-2017" target="_blank" rel="noopener">Using ADO with Microsoft Visual Basic and Visual Basic for Applications</a></li>
</ul>
<h2>
Form VBA Code:</h2>
<p>After completing the migration of the higher-level VBA code, you&#8217;ll notice a transformation in the structure of your forms&#8217; code.</p><pre class="crayon-plain-tag">Option Compare Database

Private Sub Command5_Click()
 
    ' Pass your ZappySys Driver Connection String: Refer to below link to learn how to obtain the ZappySys Driver connection string:
    ' https://community.zappysys.com/t/how-to-copy-the-zappysys-driver-connection-string/172
    Dim zsConnStr As String
    zsConnStr = "DRIVER={ZappySys JSON Driver};DataPath='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json';Filter='$.value[*]';IncludeParentColumns=0;RequestMethod='GET';RequestHeaders='cache-control: no-cache || Accept: */*'"
        
    'ZappySys Driver Query
    Dim zsDriverQuery As String
    zsDriverQuery = "Select * from $"
 
    'MS Access Table Name
    Dim tableName As String
    tableName = "tblCustomers"

    ' 1. Close Table If Open
    CloseTableIfOpen tableName

    ' 2. Truncate Table (Optional): If you want to load fresh data each time, uncomment the line below.
    'TruncateTable tableName

    ' 3. Import Data From API Into Table
    ImportDataFromAPIIntoTable zsConnStr, zsDriverQuery, tableName

    ' 4. Open Table for Viewing (Optional)
    OpenTableForViewing tableName

    ' Show Message after Loading Data Successfully
    MsgBox "Data Loaded Successfully!"
    
End Sub

Sub ImportDataFromAPIIntoTable(zsConnStr As String, zsDriverQuery As String, tableName As String)
    Dim dscn As New ADODB.Connection
    dscn.Open zsConnStr

    Dim rs As Object
    Set rs = New ADODB.Recordset
    
    ''ZappySys Driver Query Goes here
    rs.Open zsDriverQuery, dscn

    Dim strQuery As String
    strQuery = ""
    ' Check if the recordset is not empty
    If Not rs.EOF Then
        ' Get the field names
        Dim fieldNames As String
        fieldNames = ""

        For i = 1 To rs.Fields.Count
            fieldNames = fieldNames &amp; rs.Fields(i - 1).Name
            If i &lt; rs.Fields.Count Then
                fieldNames = fieldNames &amp; ","
            End If
        Next i

        ' Generate the INSERT script
        Dim insertScript As String
        ' Iterate through the recordset to get the values
        Do Until rs.EOF
            ' Generate Insert script
            insertScript = "INSERT INTO " &amp; tableName &amp; " (" &amp; fieldNames &amp; ") VALUES"
            insertScript = insertScript &amp; vbCrLf &amp; "("
            For i = 1 To rs.Fields.Count
                ' Assuming all fields are text, you might need to handle different data types appropriately
                
                If IsNull(rs.Fields(i - 1).Value) Then
                    insertScript = insertScript &amp; "''"
                Else
                    insertScript = insertScript &amp; "'" &amp; EscapeSingleQuote(rs.Fields(i - 1).Value) &amp; "'"
                End If
                
                
                If i &lt; rs.Fields.Count Then
                    insertScript = insertScript &amp; ","
                End If
            Next i
            insertScript = insertScript &amp; ")"
            
            'Insert data
            CurrentProject.Connection.Execute insertScript
            
            rs.MoveNext
        Loop
    End If
    
    ' Close the recordset and connection
    rs.Close
    dscn.Close
    Set rs = Nothing
    Set conn = Nothing
    
End Sub

Sub OpenTableForViewing(tableName As String)
    If Not IsTableOpen(tableName) Then
        DoCmd.OpenTable tableName
    End If
End Sub

Public Function IsTableOpen(strName As String) As Boolean
     IsTableOpen = SysCmd(acSysCmdGetObjectState, acTable, strName)
End Function

Sub CloseTableIfOpen(tableName As String)
    If IsTableOpen(tableName) Then
        DoCmd.SelectObject acTable, tableName
        DoCmd.RunCommand acCmdSaveRecord
        DoCmd.Close
    End If
End Sub


Sub TruncateTable(tableName As String)
    Dim strSql As String
    strSql = "DELETE FROM " &amp; tableName &amp; ";"
    CurrentProject.Connection.Execute strSql
End Sub

Public Function EscapeSingleQuote(strData As String) As String
     EscapeSingleQuote = Replace(strData, "'", "''")
End Function</pre><p>
&nbsp;</p>
<h2></h2>
<p>The post <a href="https://zappysys.com/blog/export-rest-api-ms-access-using-vba-command-button/">How to Export REST API to MS Access using VBA Command Button</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ODBC PowerPack v1.1.3 Released</title>
		<link>https://zappysys.com/blog/odbc-powerpack-v1-1-3/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 25 Jun 2019 13:35:30 +0000</pubDate>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[ETL - Informatica]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[Reporting - Microsoft Access]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7296</guid>

					<description><![CDATA[<p>What&#8217;s New In this release we focused on adding URL JOIN Features which may allow many multi steps scenarios in one query. Bing Ads, Amazon MWS, Google BigQuery, Amazon Athena all these supports Job style queries which needs 3 step process (Create job, keep checking status, once done read report data). We also improved compatibility [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/odbc-powerpack-v1-1-3/">ODBC PowerPack v1.1.3 Released</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>What&#8217;s New</h2>
<p>In this release we focused on adding URL JOIN Features which may allow many multi steps scenarios in one query. Bing Ads, Amazon MWS, Google BigQuery, Amazon Athena all these supports Job style queries which needs 3 step process (Create job, keep checking status, once done read report data). We also improved compatibility with Informatica and MS Access.</p>
<h2 class="vertitle">Version 1.1.3.10621 [Jun 24, 2019]</h2>
<h3 class="versubtitle">New Features/Improvements</h3>
<ul>
<li><span class="verAdded">NEW: </span>Add option to replace placeholders in File content if you use IsMultiPart = True</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add option EnableBodyPlaceholderForMultiPart to support replacing placeholders in file content in IsMultiPart mode (E.g. replace &lt;%access_token%&gt; or [$token$] or [$alias.MyJoinColumn$] )</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add option OutputAsRawDocumentSingleRow (Returns __DOCUMENT__ field with entire File / Response string in one field)</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add Options to parse from any unstructured data &#8211; RawOutputExtractMode, RawOutputDataRowTemplate, RawOutputFilterExpr</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add Status Check feature for all API drivers (Keep sending request until desired value found) &#8211; Options added EnableStatusCheck, StatucCheckMaxWaitSeconds, StatucCheckIterationWaitSeconds, StatusSuccessValue, StatusFailureValue</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add support for ConnectionType in URL Join</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add Support for HMAC Authentication</li>
<li><span class="verAdded">NEW: </span>All ODBC Drivers &#8211; Add support for Parameters</li>
<li><span class="verAdded">NEW: </span>Data Gateway &#8211; Add Code Generator UI for SQL / Java</li>
<li><span class="verAdded">NEW: </span>Data Gateway &#8211; Allow to add firewall rule via UI</li>
<li><span class="verAdded">NEW: </span>Data Gateway &#8211; Better logging about connected devices</li>
<li><span class="verAdded">NEW: </span>Salesforce Driver &#8211; Add support for Select * FROM</li>
</ul>
<h3 class="versubtitle">Bug fixes</h3>
<ul>
<li><span class="verFixed">FIX: </span>All API Drivers &#8211; joinXX_DataConnectionType Option not supported in JOIN URL</li>
<li><span class="verFixed">FIX: </span>All API Drivers- Show meaningful error when same option used twice in WITH clause (Right now you see odd error &#8211; An item with the same key has already been added)</li>
<li><span class="verFixed">FIX: </span>Apps &#8211; Informatica &#8211; Driver may output many extra empty rows in some cases</li>
<li><span class="verFixed">FIX: </span>Apps &#8211; MS Access &#8211; Linked table throwing call fail error (due to missing support for parameters in current driver)</li>
<li><span class="verFixed">FIX: </span>Data Gateway &#8211; Certain errors not reported correctly back to caller</li>
<li><span class="verFixed">FIX: </span>Data Gateway &#8211; Enabling caching options may hang query in some case</li>
<li><span class="verFixed">FIX: </span>Data Gateway &#8211; Generic ODBC Connection Type fails with error Connection is Busy</li>
<li><span class="verFixed">FIX: </span>Data Gateway &#8211; When you use Meta option in WITH clause you may see empty rowset rather error in some cases</li>
<li><span class="verFixed">FIX: </span>Salesforce Driver &#8211; Can not load table list in Excel / Power BI</li>
<li><span class="verFixed">FIX: </span>Salesforce Driver &#8211; Failed to preview data in Power BI</li>
<li><span class="verFixed">FIX: </span>Salesforce Driver &#8211; Load ConnectionString doesnt set Username</li>
<li><span class="verFixed">FIX: </span>Salesforce Driver &#8211; Nested queries not supported &#8211; You may get syntax error</li>
<li><span class="verFixed">FIX: </span>Salesforce Driver &#8211; SSIS ODBC destination showing bad Table names in list</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/odbc-powerpack-v1-1-3/">ODBC PowerPack v1.1.3 Released</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read / Write REST API data in Talend (JSON / XML / SOAP)</title>
		<link>https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 12 Jan 2019 20:18:31 +0000</pubDate>
				<category><![CDATA[ETL - Talend]]></category>
		<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[etl]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[talend]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6012</guid>

					<description><![CDATA[<p>Introduction In this post we will learn how to read / write REST API data in Talend Open Studio. We will create a simple Talend Job using ZappySys JSON  Driver to read from REST API / JSON Files and load into Target (e.g. File / DB). Techniques listed in this article can be also used to [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/">Read / Write REST API data in Talend (JSON / XML / SOAP)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> Please visit <a href="https://zappysys.com/api/integration-hub/apps/talend-studio">Talend Studio Connectors</a> page in <a href="https://zappysys.com/api/integration-hub">API Integration Hub</a> to find updated articles on various Talend Studio integrations, including integrations with <a href="https://zappysys.com/api/integration-hub/rest-api-connector/talend-studio">REST API</a>, <a href="https://zappysys.com/api/integration-hub/soap-connector/talend-studio">SOAP API</a>, <a href="https://zappysys.com/api/integration-hub/json-file-connector/talend-studio">JSON file</a>, and <a href="https://zappysys.com/api/integration-hub/xml-file-connector/talend-studio">XML file</a>.</div></div>
<p><img loading="lazy" decoding="async" class="wp-image-11136 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-logo-2.png" alt="" width="150" height="151" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-logo-2.png 177w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-logo-2-150x150.png 150w" sizes="(max-width: 150px) 100vw, 150px" />In this post we will learn how to read / write REST API data in Talend Open Studio. We will create a simple Talend Job using <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ZappySys JSON  Driver</a> to read from REST API / JSON Files and load into Target (e.g. File / DB). Techniques listed in this article can be also used to read from SOAP API / XML Files or CSV Files / API using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/">XML Driver</a> / <a href="https://zappysys.com/products/odbc-powerpack/odbc-csv-rest-api-driver/">CSV Driver</a>.</p>
<p>These drivers support familiar SQL query language. Using SQL you can query virtually any API services just like relational database table. It can flatten nested hierarchy and provide output in rows / columns. Many complex REST API / SOAP API complexity is taken care automatically (e.g. Authentication, Pagination, Security, Error Handling).</p>
<p>So let&#8217;s get started.</p>
<p>&nbsp;</p>
<h2>Requirements</h2>
<ol>
<li>Download and install Talend Open Studio (FREE) <a href="https://www.talend.com/products/data-integration/data-integration-open-studio/" target="_blank" rel="noopener">from here</a>. Skip this step if you already installed.</li>
<li>Download <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> (JSON / XML Drivers)</li>
<li>Get Microsoft <strong>JDBC driver</strong> for <strong>SQL Server</strong> <a href="https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&amp;id=11774">from here</a> (Download <strong>sqljdbc_6.0.8112.200_enu.exe</strong> which is self extracting file you can run and extract to some folder)<br />
After you extract jdbc files, go to sqljdbc_6.0\enu\jre8\ folder rename <strong>sqljdbc42.jar</strong> to  <strong>mssql-jdbc.jar</strong> (name must be this). We will load this file in Talend later in this article.</li>
<li>Basic knowledge about REST API and JSON / XML format.</li>
</ol>
<h2>Configure Data Gateway</h2>
<div class="content_block" id="custom_post_widget-5282">Now let's look at how to configure <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">ZappySys Data Gateway</a>. This feature acts as a bridge between Client App and ZappySys Drivers. Using data gateway you can use ZappySys Drivers inside applications / operating systems where ZappySys drivers may not be available directly for some reason (e.g. You don't have access to Server for Installation or System does not support ODBC drivers like JAVA programs). <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-gateway/">Click here to read more</a> on various use cases of Data Gateway.
<h4><span style="font-size: 14pt;">Configure Data Gateway User / Port</span></h4>
Now let's look at steps to configure Data Gateway after installation. We will also create a sample data source for ODATA API (i.e. JSON based REST API Service).
<ol>
 	<li>Assuming you have installed <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> using default options (Which also enables Data Gateway Service)</li>
 	<li>Search "Gateway" in your start menu and click ZappySys Data Gateway
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" alt="Open ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Open ZappySys Data Gateway</p>

</div></li>
 	<li>First make sure Gateway Service is running (Verify Start icon is disabled)</li>
 	<li>Also verify Port on General Tab
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-1.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-1.png" alt="Port Number setting on ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Port Number setting on ZappySys Data Gateway</p>

</div></li>
 	<li>Now go to Users tab. <strong>Click Add</strong> icon to add a new user. Check Is admin to give access to all data sources you add in future. If you don't check admin then you have to manually configure user permission for each data source.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-2.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-2.png" alt="Add Data Gateway User" /></a>
<p class="wp-caption-text">Add Data Gateway User</p>

</div></li>
</ol>
&nbsp;
<h4><span style="font-size: 14pt;">Configure Data Source</span></h4>
<ol>
 	<li>After user is added, go to Data Sources tab. <strong>Click Add</strong> icon to create new data source. Select appropriate driver based on your API / File format. You can choose Generic ODBC option to read data from ODBC DSN or use Native Driver option.
<pre class=""><strong>NOTE:</strong> Whenever possible use native driver option for better performance / security and ease of use.</pre>
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-3.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-3.png" alt="Add Gateway Data Source (Native JSON Driver)" /></a>
<p class="wp-caption-text">Add Gateway Data Source (Native JSON Driver)</p>

</div></li>
 	<li>Click on "Edit" under Data source and configure as per your need (e.g. Url, Connection, Request Method, Content Type, Body, Pagination etc.). For this demo we are going to pick simple JSON REST API which doesn't need any authentication.  Enter following URL.
<pre class="">https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json</pre>
</li>
 	<li>You can also view response structure and select default hierarchy (i.e. Filter) like below (Select Array Icon) for data extraction.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-4.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-4.png" alt="Configure JSON API Data source" /></a>
<p class="wp-caption-text">Configure JSON API Data source</p>

</div></li>
</ol>
<h4><span style="font-size: 14pt;">Test SQL Query / Preview Data</span></h4>
<ol>
 	<li>Now go to Preview Tab. You can click Preview button to execute default query
OR
Select Table name from dropdown to generate SQL with column names.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-5.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-5.png" alt="JSON / REST API Driver Query Preview / Query Examples (Read REST API or JSON Files)" /></a>
<p class="wp-caption-text">JSON / REST API Driver Query Preview / Query Examples (Read REST API or JSON Files)</p>

</div></li>
 	<li>You can also click Query Builder to generate SQL using different options in WITH clause. ANy setting you specify in WITH clause will override UI settings we applied in previous steps.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-6.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-6.png" alt="Using SQL Query Builder (For Files or REST / SOAP API - JSON / XML / CSV Format)" /></a>
<p class="wp-caption-text">Using SQL Query Builder (For Files or REST / SOAP API - JSON / XML / CSV Format)</p>

</div></li>
 	<li>There is another useful option for code generation. Select your Language and quickly copy code snippet. See below Example of XML Driver Query to call SOAP API.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-7.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-7.png" alt="Generate Example Code for ZappySys Driver" /></a>
<p class="wp-caption-text">Generate Example Code for ZappySys Driver</p>

</div></li>
 	<li><strong>Click OK</strong> to Close Data Source UI</li>
 	<li>Once data source is tested and configured you can <strong>click Save </strong>button in the Gateway UI toolbar and click <strong>Yes</strong> for <strong>Restart Service</strong>.</li>
</ol>
&nbsp;</div>
<h2>Register MS SQL JDBC driver in Talend</h2>
<p>Now lets register Microsoft JDBC Driver in Talend. This is very important step because MSSQL JDBC driver is used to communicate with ZappySys Data Gateway we configured in previous step.</p>
<p>If you missed steps mentioned in the Requirements section then make sure you first download JDBC driver using below steps.</p>
<p>Get Microsoft <strong>JDBC driver</strong> for <strong>SQL Server</strong> <a href="https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&amp;id=11774">from here</a> (Download <strong>sqljdbc_6.0.8112.200_enu.exe</strong> which is self extracting file you can run and extract to some folder). After you extract jdbc files, go to sqljdbc_6.0\enu\jre8\ folder rename <strong>sqljdbc42.jar</strong> to  <strong>mssql-jdbc.jar</strong> (name must be this).</p>
<p>Now lets go through the steps to register MSSQL jdbc driver in Talend.</p>
<ol>
<li>Open Talend Open Studio</li>
<li>Go to <strong>Windows</strong> &gt; Click <strong><strong>Show View</strong></strong>
<div id="attachment_6038" style="width: 456px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-views-menu.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6038" class="size-full wp-image-6038" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-views-menu.png" alt="Talend - Show View" width="446" height="184" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-views-menu.png 446w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-views-menu-300x124.png 300w" sizes="(max-width: 446px) 100vw, 446px" /></a><p id="caption-attachment-6038" class="wp-caption-text">Talend &#8211; Show View</p></div></li>
<li>When you see Popup selection under <strong>Talend</strong> &gt; Select <strong><strong><strong>Modules</strong></strong></strong>
<div id="attachment_6037" style="width: 342px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-modules-option.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6037" class="size-full wp-image-6037" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-modules-option.png" alt="Talend - Select Modules Window" width="332" height="399" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-modules-option.png 332w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-show-modules-option-250x300.png 250w" sizes="(max-width: 332px) 100vw, 332px" /></a><p id="caption-attachment-6037" class="wp-caption-text">Talend &#8211; Select Modules Window</p></div></li>
<li>When Module window is visible click on Little Jar Icon (Bottle icon) in the toolbar.</li>
<li>Select <strong>mssql-jdbc.jar</strong> file we renamed earlier and load this file.
<div id="attachment_6036" style="width: 870px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-register-jdbc-driver-import-mssql-jar.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6036" class="size-full wp-image-6036" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-register-jdbc-driver-import-mssql-jar.png" alt="Talend - Import JAR file / module (Register MS SQL JDBC Driver Example)" width="860" height="348" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-register-jdbc-driver-import-mssql-jar.png 860w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-register-jdbc-driver-import-mssql-jar-300x121.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-register-jdbc-driver-import-mssql-jar-768x311.png 768w" sizes="(max-width: 860px) 100vw, 860px" /></a><p id="caption-attachment-6036" class="wp-caption-text">Talend &#8211; Import JAR file / module (Register MS SQL JDBC Driver Example)</p></div></li>
<li>That&#8217;s it. Now we ready to make API calls / read from JSON / XML in the next section.</li>
</ol>
<h2>Setup Talend REST API Connection (JSON / XML / CSV)</h2>
<p>Now let&#8217;s configure REST API Connection in Talend. To read from JSON / XML Files you can use same steps too. We will use MSSQL JDBC Driver to connect to ZappySys Data Gateway.</p>
<ol>
<li>In Talend Go to Metadata &gt; Db Connections (Right click) &gt; Create Connection
<div id="attachment_6030" style="width: 353px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-create-new-db-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6030" class="size-full wp-image-6030" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-create-new-db-connection.png" alt="Talend - Create new DB connection (JSON / REST API Example)" width="343" height="364" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-create-new-db-connection.png 343w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-create-new-db-connection-283x300.png 283w" sizes="(max-width: 343px) 100vw, 343px" /></a><p id="caption-attachment-6030" class="wp-caption-text">Talend &#8211; Create new DB connection (JSON / REST API Example)</p></div></li>
<li>On the connection Wizard specify following attributes.<br />
<strong>DB Version :</strong> Microsoft<br />
<strong>Login :</strong>  username you setup in zappysys data gateway<br />
<strong>Password :</strong>  password of data gateway user<br />
<strong>Server :</strong> machine name or IP where zappysys data gateway is running<br />
<strong>Port :</strong> &lt;default is 5000&gt; Port on which zappysys data gateway is listening<br />
<strong>DataBase :</strong>  Data source name you setup in zappysys data gateway (case-sensitive)</p>
<div id="attachment_6029" style="width: 977px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-connect-json-xml-rest-api-using-zappysys-gateway-ms-jdbc.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6029" class="size-full wp-image-6029" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-connect-json-xml-rest-api-using-zappysys-gateway-ms-jdbc.png" alt="Talend - Connect to JSON / REST API using ZappySys Gateway (Use MS SQL JDBC Driver)" width="967" height="716" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-connect-json-xml-rest-api-using-zappysys-gateway-ms-jdbc.png 967w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-connect-json-xml-rest-api-using-zappysys-gateway-ms-jdbc-300x222.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-connect-json-xml-rest-api-using-zappysys-gateway-ms-jdbc-768x569.png 768w" sizes="(max-width: 967px) 100vw, 967px" /></a><p id="caption-attachment-6029" class="wp-caption-text">Talend &#8211; Connect to JSON / REST API using ZappySys Gateway (Use MS SQL JDBC Driver)</p></div></li>
<li>That&#8217;s all we need to do to setup a connection which can be used to read / write REST API data in Talend. In the next section we will see how to create a job to read data from REST API Service using this connection.</li>
</ol>
<p>&nbsp;</p>
<h2>Read from REST API in Talend</h2>
<p>Now let&#8217;s look at how to read data from REST API source or JSON / XML File using the connection we configured in the previous section.</p>
<h3>Configure REST API Source</h3>
<ol>
<li>Create a Talend JOB and double click to open designer</li>
<li>Now drag and drop MSSQL Connection we created for ZappySys Data gateway, drop it on the designer surface. It will popup UI like below.</li>
<li>Select <strong>tDBInput</strong> (Microsoft SQL Server). Remember that we are using MSSQL JDBC Driver to connect to ZappySys Data Gateway for REST API Call. This gateway uses Microsoft TDS Protocol so MSSQL JDBC driver is used to communicate.</li>
<li>Now rename Source to something meaningful (e.g. Read from JSON REST API)</li>
<li>Double click REST Source to configure.</li>
<li>Enter <strong>Query</strong> like below (Make sure to <strong>enter between double quotes</strong>). See below examples to read from URL or File. If you have double quote in SQL then escape using \&#8221; character (e.g. select \&#8221;my col\&#8221; from $ )<strong>Read From REST API Url</strong><br />
<pre class="crayon-plain-tag">"SELECT * FROM value 
WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json')"</pre>
<strong>Read from Local File (Wildcard Pattern Search allowed)</strong><br />
<pre class="crayon-plain-tag">"SELECT * FROM value 
WITH (SRC='c:\data\Customers_*.json')"</pre>
</li>
<li>Click on <strong>Guess Schema</strong> button and Click OK to accept detected schema.
<div id="attachment_6028" style="width: 972px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-configure-json-rest-api-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6028" class="size-full wp-image-6028" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-configure-json-rest-api-source.png" alt="Talend - Configure REST API / JSON Source (Enter SQL Query / Guess Schema)" width="962" height="723" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-configure-json-rest-api-source.png 962w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-configure-json-rest-api-source-300x225.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-configure-json-rest-api-source-768x577.png 768w" sizes="(max-width: 962px) 100vw, 962px" /></a><p id="caption-attachment-6028" class="wp-caption-text">Talend &#8211; Configure REST API / JSON Source (Enter SQL Query / Guess Schema)</p></div></li>
<li>Now we will configure target in the next section.</li>
</ol>
<h3>Configure Target (Delimited File)</h3>
<ol>
<li>Now search for &#8220;FileOut&#8221; in the toolbox (Hit Enter). You will see <strong>tFileOutputDelimited</strong> so just select that for now and drag on the surface.
<div id="attachment_6035" style="width: 828px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-to-csv-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6035" class="size-full wp-image-6035" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-to-csv-file.png" alt="Talend - Add File Output (tFileOutputDelimited)" width="818" height="307" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-to-csv-file.png 818w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-to-csv-file-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-to-csv-file-768x288.png 768w" sizes="(max-width: 818px) 100vw, 818px" /></a><p id="caption-attachment-6035" class="wp-caption-text">Talend &#8211; Add File Output (tFileOutputDelimited)</p></div></li>
<li>Double click it to configure.</li>
<li>Enter correct file path (e.g. &#8220;C:/Talend/workspace/rest-api-output.csv&#8221; )</li>
<li>On Advanced Tab you can configure some additional settings (e.g. Throw an error if file already exists)</li>
</ol>
<h3>Connect and Run</h3>
<ol>
<li>Once you have configured Source and Target its time to connect them</li>
<li>Drag Source Port to Target to connect like below.
<div id="attachment_6033" style="width: 539px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-load-json-rest-api-data-to-csv-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6033" class="size-full wp-image-6033" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-load-json-rest-api-data-to-csv-file.png" alt="Talend - Connect REST / JSON Source to File Target" width="529" height="176" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-load-json-rest-api-data-to-csv-file.png 529w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-load-json-rest-api-data-to-csv-file-300x100.png 300w" sizes="(max-width: 529px) 100vw, 529px" /></a><p id="caption-attachment-6033" class="wp-caption-text">Talend &#8211; Connect REST / JSON Source to File Target</p></div></li>
<li>Run the job
<div id="attachment_6034" style="width: 863px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-rest-api-import-into-file-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6034" class="wp-image-6034 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-rest-api-import-into-file-table.png" alt="Run Talend Job - Loading REST API data into File (Read JSON / XML / CSV)" width="853" height="510" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-rest-api-import-into-file-table.png 853w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-rest-api-import-into-file-table-300x179.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-read-json-rest-api-import-into-file-table-768x459.png 768w" sizes="(max-width: 853px) 100vw, 853px" /></a><p id="caption-attachment-6034" class="wp-caption-text">Run Talend Job &#8211; Loading REST API data into File (Read JSON / XML / CSV)</p></div></li>
<li>That&#8217;s it. So in few clicks you loaded data from REST API to File in Talend Open Studio.</li>
</ol>
<h2>Write / Send data to REST API (POST Example)</h2>
<p>There will be a time when you want to POST data to REST API service. Let&#8217;s check how to write POST query to submit data to REST API.</p>
<p>Just like how we did Read query in previous example, we can set POST Body in the SQL Query to send data. Use query like below and click Guess Schema button. If Blank Filter gives you no data error then make sure you remove Filter on Data Gateway Data source. (Notice we used \&#8221; to escape double quote inside query )</p><pre class="crayon-plain-tag">"SELECT * FROM _root_
WITH (
 METHOD='POST'
,HEADER='Content-Type: text/plain || first-header: AAA || second-header: BBB'
,SRC='http://httpbin.org/post'
,BODY='{id:1,notes:\"Some notes\"}'
,FILTER=''
)
"</pre><p>
<div id="attachment_6040" style="width: 848px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-post-data-to-rest-api-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6040" class="size-full wp-image-6040" src="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-post-data-to-rest-api-url.png" alt="Talend - POST data to REST API URL" width="838" height="641" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/talend-post-data-to-rest-api-url.png 838w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-post-data-to-rest-api-url-300x229.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/talend-post-data-to-rest-api-url-768x587.png 768w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-6040" class="wp-caption-text">Talend &#8211; POST data to REST API URL</p></div>
<h2>SQL Query Examples</h2>
<p>Click on below link to learn more writing SQL Query using ZappySys Drivers.</p>
<p><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/json-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">JSON / REST Driver &#8211; SQL Query Examples</a></p>
<p><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/xml-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">XML / SOAP Driver &#8211; SQL Query Examples</a></p>
<p><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/csv-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">CSV / REST Driver &#8211; SQL Query Examples</a></p>
<h2>REST API / XML SOAP Pagination Settings for Talend</h2>
<div class="content_block" id="custom_post_widget-3892"><div style="margin-bottom: 1em;">Even we set up ODBC Data Source to get the data, it may not be enough. Usually, if you are getting a huge data set from API provider, it won't give it to you in one HTTP response. Instead, it gives back only a subset of data and provides a mechanism for data pagination. The good news is that <em>ZappySys ODBC Driver</em> includes many options to cover virtually any pagination method.</div>
<div><span style="font-size: 16px;">Below you will find a few examples of API pagination. If you need something more sophisticated check the below link (the article was written for SSIS PowerPack but UI options and concepts apply to ODBC Driver too):</span></div>
<div style="margin-bottom: 1em;"><a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/</a></div>
<h3>Paginate by Response Attribute</h3>
This example shows how to paginate API calls where you need to paginate until the last page detected. In this example, next page is indicated by some attribute called nextlink (found in response). If this attribute is missing or null then it stops fetching the next page.
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH(
SRC=@'https://zappysys.com/downloads/files/test/pagination_nextlink_inarray_1.json'
,NextUrlAttributeOrExpr = '$.nextlink'  --keep reading until this attribute is missing. If attribute name contains dot then use brackets like this $.['my.attr.name']
)</pre>
<h3>Paginate by URL Parameter (Loop until certain StatusCode)</h3>
This example shows how to paginate API calls where you need to pass page number via URL. The driver keeps incrementing page number and calls next URL until the last page detected (401 error). There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/page-xml.aspx?page=1&amp;mode=DetectBasedOnResponseStatusCode'
,PagingMode='ByUrlParameter'
,PagingByUrlAttributeName='page'
,PagingByUrlEndStrategy='DetectBasedOnResponseStatusCode'
,PagingByUrlCheckResponseStatusCode=401
,IncrementBy=1
)</pre>
<h3>Paginate by URL Path (Loop until no record)</h3>
This example shows how to paginate API calls where you need to pass page number via URL Path. The driver keeps incrementing page number and calls next URL until the last page is detected. There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/cust-&lt;%page%&gt;.xml'
,PagingMode='ByUrlPath'
,PagingByUrlAttributeName='&lt;%page%&gt;'
,PagingByUrlEndStrategy='DetectBasedOnRecordCount'
,IncrementBy=1
)</pre>
<h3>Paginate by Header Link (RFC 5988)</h3>
API like GitHub / Wordpress use Next link in Headers (<a href="https://tools.ietf.org/html/rfc5988" target="_blank" rel="noopener">RFC 5988</a>)
<pre class="lang:default decode:true ">SELECT * FROM $
LIMIT 25
WITH(
	 Src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)</pre>
&nbsp;</div>
<h2>REST API / SOAP Web Service Connection Settings for Talend</h2>
<div class="content_block" id="custom_post_widget-3896"><div style="margin-bottom: 1em;">If you need to authenticate or authorize your user to access a web resource, you will need to use one of the <em>Connections:</em></div>
<ul>
 	<li>HTTP</li>
 	<li>OAuth</li>
</ul>
<img loading="lazy" decoding="async" class="wp-image-4078 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png" alt="ZappySys XML Driver - HTTP and OAuth Connection Types" width="577" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png 577w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252-300x157.png 300w" sizes="(max-width: 577px) 100vw, 577px" />
<h3>HTTP Connection</h3>
<div style="margin-bottom: 1em;">Use <em>HTTP Connection</em> for simple Windows, Basic, NTLM or Kerberos authentication. Just fill in a username and a password and you are good to go!</div>
<div style="margin-bottom: 1em;">You can also use <em>HTTP Connection</em> for more sophisticated authentication like:</div>
<ul>
 	<li><strong>SOAP WSS</strong> (when accessing a SOAP WebService)</li>
 	<li><strong>Static Token / API Key</strong> (when need to pass an API key in HTTP header)</li>
 	<li><strong>Dynamic Token</strong> (same as Static Token method except that each time you need to log in and retrieve a fresh API key)</li>
 	<li><strong>JWT Token</strong> (As per RFC 7519)</li>
</ul>
<img loading="lazy" decoding="async" class="alignnone wp-image-4091 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-1.png" alt="" width="622" height="570" />
<h3>OAuth</h3>
If you are trying to access REST API resource, it is a huge chance, you will need to use <em>OAuth Connection</em>. <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">Read this article</a> to understand how OAuth authentication and authorization works and how to use it (article originally was written for <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>, but the concepts and UI stay the same): <br/>
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/</a>
<img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-2.png" width="721" height="708" /></div>
<h2>Other settings for REST API / SOAP XML Call in Talend</h2>
<div class="content_block" id="custom_post_widget-3901">There are few settings you can coder while calling Web API
<h3><strong>API Limit / Throttling</strong></h3>
While calling public API or other external web services one important aspect you have to check,  how many requests are allowed by your API. Especially when you use API pagination options to pull many records you have to slow down based on API limits. For example, your API may allow you only 5 requests per second. Use Throttling Tab on Driver UI to set delay after each request.
<h3><strong>2D Array Transformation</strong></h3>
If you are using JSON or XML API Driver then possible you may have to transform your data using 2D array transformation feature. <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Check this link</a> for more information.

&nbsp;</div>
<h2>REST API / XML SOAP Performance Tips for Talend</h2>
<div class="content_block" id="custom_post_widget-4455">While calling APIs you may face some performance issues. There are a few tips you can consider to speed up things.
<h4><span style="font-size: 14pt;"><strong>Use Server-side filtering if possible in URL or Body Parameters</strong></span></h4>
Many API supports filtering your data by URL parameters or via Body. Whenever possible try to use such features.  Here is an example of <a href="http://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">odata API</a>, In the below query the first query is faster than the second query because in the first query we filter at the server.
<pre class="lang:tsql decode:true">SELECT * FROM value
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json&amp;$filter=Country eq ''USA'''
	,DataFormat='Odata'
)

-- Slow query - Client-side filtering
SELECT * FROM value
WHERE Country ='USA'
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json'
	,DataFormat='Odata'
)</pre>
<h4><span style="font-size: 14pt;"><strong>Avoid Special features in SQL Query (e.g. WHERE, Group By, Order By)</strong></span></h4>
ZappySys API engine triggers client-side processing if special features are used in Query. Following SQL Features will trigger Client-Side processing which is several times slower than server-side processing. So always try to use simple query (Select col1, col2 .... from mytable )
<ul>
 	<li>WHERE Clause</li>
 	<li>GROUP BY Clause</li>
 	<li>HAVING Clause</li>
 	<li>ORDER BY</li>
 	<li>FUNCTIONS (e.g. Math, String, DateTime, Regex... )</li>
</ul>
LIMIT clause does not trigger client-side processing.
<h4><span style="font-size: 14pt;"><strong>Consider using pre-generated Metadata / Cache File</strong></span></h4>
Use META option in WITH Clause to use static metadata (Pre-Generated)There are two more options to speedup query processing time. Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details.
<ol>
 	<li>
<pre class="lang:default decode:true">select * from value WITH( meta='c:\temp\meta.txt' )
--OR--
select * from value WITH( meta='my-meta-name' )
--OR--
select * from value WITH( meta='[ {"Name": "col1",&amp;nbsp;"Type": "String", Length: 100},&amp;nbsp;{"Name": "col2",&amp;nbsp;"Type": "Int32"} ...... ]' )</pre>
</li>
 	<li>Enable Data Caching Options (Found on <strong>Property Grid</strong> &gt; <strong>Advanced</strong> Mode Only )</li>
</ol>
<h4><span style="font-size: 14pt;"><strong>Consider using Metadata / Data Caching Option</strong></span></h4>
ZappySys API drivers support Caching Metadata and Data rows to speed up query processing. If your data doesn't change often then you can enable this option to speed up processing significantly.

Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details how to enable Data cache / metadata cache feature for datasource level or query level.

To define cache option at query level you can use like below.
<pre class="">SELECT * FROM $
WITH 
(  SRC='https://myhost.com/some-api'
  ,CachingMode='All'  --cache metadata and data rows both
  ,CacheStorage='File' --or Memory
  ,CacheFileLocation='c:\temp\myquery.cache'
  ,CacheEntryTtl=300 --cache for 300 seconds
)
</pre>
&nbsp;

&nbsp;
<h4><strong><span style="font-size: 14pt;">Use --FAST Option to enable Stream Mode</span></strong></h4>
ZappySys JSON / XML drivers support <strong>--FAST</strong> suffix for Filter. By using this suffix after Filter driver enables Stream Mode, <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/#Reading_Large_Files_Streaming_Mode_for_XML_JSON" target="_blank" rel="noopener">Read this article</a> to understand how this works.
<pre class="lang:default decode:true">SELECT * FROM $ 
LIMIT 10 --//add this just to test how fast you can get 10 rows
WITH(
  Filter='$.LargeArray[*]--FAST' --//Adding --FAST option turn on STREAM mode (large files)
 ,SRC='https://zappysys.com/downloads/files/test/large_file_100k_largearray_prop.json.gz'
 --,SRC='c:\data\large_file.json.gz'
 ,IncludeParentColumns='False'  --//This Must be OFF for STREAM mode (read very large files)
 ,FileCompressionType='GZip' --Zip or None (Zip format only available for Local files)
)</pre>
&nbsp;</div>
<h2>Calling SOAP Web Service in Talend</h2>
<div class="content_block" id="custom_post_widget-3870">To call SOAP API you need to know Request XML Body Structure. If you are not sure how to create SOAP Request body then no worries. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn how to generate SOAP Request body using the Free tool <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a>. Basically, you have to use SoapUI to generate Request XML and after that, you can replace parameters as needed in the generated body.
<h3>What is SOAP Web Service?</h3>
If you are new to SOAP Web Service sometimes referred as XML Web Service then please read some concept about SOAP Web service standard <a href="https://msdn.microsoft.com/en-us/library/ms996507.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener">from this link</a>

There are two important aspects in SOAP Web service.
<ol>
 	<li>Getting WSDL file or URL</li>
 	<li>Knowing exact Web Service URL</li>
</ol>
<h3>What is WSDL</h3>
In very simple term WSDL (often pronounced as whiz-dull) is nothing but a document which describes Service metadata (e.g. Functions you can call, Request parameters, response structure etc). Some service simply give you WSDL as xml file you can download on local machine and then analyze or sometimes you may get direct URL (e.g. http://api.mycompany.com/hr-soap-service/?wsdl )
<h3>Example SQL Query for SOAP API call using ZappySys XML Driver</h3>
Here is an example SQL query you can write to call SOAP API. If you not sure about many details then check next few sections on how to use XML Driver User Interface to build desired SQL query to POST data to XML SOAP Web Service without any coding.
<pre class="lang:tsql decode:true">SELECT * FROM $
WITH(
	 Src='http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx'
	,DataConnectionType='HTTP'
	,CredentialType='Basic' --OR SoapWss
	,SoapWssPasswordType='PasswordText'
	,UserName='myuser'
	,Password='pass$$w123'
	,Filter='$.soap:Envelope.soap:Body.GetHolidaysAvailableResponse.GetHolidaysAvailableResult.HolidayCode[*]'
	,ElementsToTreatAsArray='HolidayCode'	
	,RequestMethod='POST'	
	,Header='Content-Type: text/xml;charset=UTF-8 || SOAPAction: "http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable"'
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hol="http://www.holidaywebservice.com/HolidayService_v2/"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;hol:GetHolidaysAvailable&gt;
         &lt;!--type: Country - enumeration: [Canada,GreatBritain,IrelandNorthern,IrelandRepublicOf,Scotland,UnitedStates]--&gt;
         &lt;hol:countryCode&gt;UnitedStates&lt;/hol:countryCode&gt;
      &lt;/hol:GetHolidaysAvailable&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
Now let's look at steps to create SQL query to call SOAP API. Later we will see how to generate code for your desired programming language (e.g. C# or SQL Server)
<h3>Video Tutorial - Introduction to SOAP Web Service and SoapUI tool</h3>
Before we dive into details about calling SOAP API using ZappySys XML Driver, lets first understand what is SOAP API and how to create SOAP requests using SoapUI tool. You will learn more about this process in the later section. The video contains some fragment about using SOAP API in SSIS but just ignore that part because we will be calling Soap API using ZappySys ODBC Driver rather than SSIS Components.

&nbsp;

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/d_x5bgGjg0Y?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe>
<h3>Using SoapUI to test SOAP API call / Create Request Body XML</h3>
Assuming you have downloaded and installed <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI from here</a>, now we are ready to use WSDL for your SOAP Web Service Calls. If you do not have WSDL file or URL handy then contact your API provider (sometimes you just have to add <strong>?wsdl </strong>at the end of your Service URL to get WSDL so try that. Example: http://mycompany/myservice?wsdl ).

If you don't know what is WSDL then in short, WSDL is <strong>Web service Description Language</strong> (i.e. XML file which describes your SOAP Service). WSDL helps to craft SOAP API request Body for ZappySys XML Driver. So Let's get started.
<ol>
 	<li>Open SoapUI and click SOAP button to create new SOAP Project</li>
 	<li>Enter WSDL URL or File Path of WSDLFor example WSDL for our sample service can be accessed via this URL
<pre class="lang:default highlight:0 decode:true">http://www.dneonline.com/calculator.asmx?wsdl</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-import-wsdl-new-soapui-project.png"><img loading="lazy" decoding="async" class="size-full wp-image-3871" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-14.png" alt="Create new SOAP API Project in SoapUI tool for SOAP API Testing" width="486" height="349" /></a>
<div style="margin-bottom: 1em;">Create new SOAP API Project in SoapUI tool for SOAP API Testing</div></li>
 	<li>Once WSDL is loaded you will see possible operations you can call for your SOAP Web Service.</li>
 	<li>If your web service requires credentials then you have to configure it. There are two common credential types for public services (<strong>SOAP WSS</strong> or <strong>BASIC</strong> )
<ol>
 	<li>
<div style="margin-bottom: 1em;">To use <strong>SOAP WSS Credentials</strong> select request node and enter UserId, Password, and <strong>WSS-PasswordType</strong> (PasswordText or PasswordHash)</div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-soap-wss-credentials-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3872 alignnone" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)" width="294" height="544" /></a>
<div style="display: block;">Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)</div></li>
 	<li>To use <strong>BASIC Auth</strong> Credentials select request node and double-click it. At the bottom click on Auth (Basic) and From Authorization dropdown click Add New and Select Basic.<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-basic-authentication-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3873" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure Basic Authorization for SoapUI (SOAP API Testing Tool)" width="616" height="653" /></a>
<div style="margin-bottom: 1em;">Configure Basic Authorization for SoapUI (SOAP API Testing Tool)</div></li>
</ol>
</li>
 	<li>Now you can test your request first Double-click on the request node to open request editor.</li>
 	<li>Change necessary parameters, remove optional or unwanted parameters. If you want to regenerate request you can click on <strong>Recreate default request toolbar icon</strong>.
<a href="https://zappysys.com/blog/wp-content/uploads/2016/06/create-soap-request-with-optional-parameters-soapui.png"><img loading="lazy" decoding="async" class="size-full wp-image-2812" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-4.png" alt="Create SOAP Request XML (With Optional Parameters)" width="807" height="315" /></a>
<div style="margin-bottom: 1em;">Create SOAP Request XML (With Optional Parameters)</div></li>
 	<li>Once your SOAP Request XML is ready, <strong>Click the Play button</strong> in the toolbar to execute SOAP API Request and Response will appear in Right side panel.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soapui-test-soap-api-request-response-edit-xml-body.png"><img loading="lazy" decoding="async" class="size-full wp-image-3874" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-5.png" alt="Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)" width="1216" height="511" /></a>
Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)</li>
</ol>
<h3>Create DSN using ZappySys XML Driver to call SOAP API</h3>
Once you have tested your SOAP API in SoapUI tool, we are ready to use ZappySys XML driver to call SOAP API in your preferred BI tool or Programming language.
<ol>
 	<li>First open <strong>ODBC Data Sources</strong> (search ODBC in your start menu or go under ZappySys &gt; ODBC PowerPack &gt; <strong>ODBC 64 bit</strong>)</li>
 	<li>Goto <strong>System DSN</strong> Tab (or User DSN which is not used by Service account)</li>
 	<li>Click <strong>Add</strong> and Select ZappySys XML Driver
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-6.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" /></a>
ZappySys ODBC Driver for XML / SOAP API</li>
 	<li>Configure API URL, Request Method and Request Body as below
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3876" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-7.png" alt="ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body" width="916" height="874" /></a>
ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body</li>
 	<li><strong>(This step is Optional)</strong> If your SOAP API requires credentials then Select Connection Type to HTTP and configure as below.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-call-credential-basic-soap-wss-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3877" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-8.png" alt="ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)" width="564" height="483" /></a>
<div style="display: block;">ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)</div></li>
 	<li>Configure-Request Headers as below (You can get it from Request &gt; Raw tab from SoapUI after you test the request by clicking the Play button)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/set-soap-api-request-headers-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3881" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-9.png" alt="Configure SOAP API Request Headers - ZappySys XML Driver" width="1009" height="747" /></a>
Configure SOAP API Request Headers - ZappySys XML Driver</li>
 	<li>Once credentials entered you can select Filter to extract data from the desired node. Make sure to select array node (see special icon) or select the node which contains all necessary columns if you don't have array node.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-query-select-filter-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3882" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-10.png" alt="Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)" width="809" height="594" /></a>
Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)</li>
 	<li>If prompted select yes to treat selected node as Array (This is helpful when you expect one or more record for selected node)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/xml-api-array-handling-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3883" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-11.png" alt="Treat selected node as XML Array Option for SOAP API Response XML" width="655" height="572" /></a>
Treat selected node as XML Array Option for SOAP API Response XML</li>
</ol>
<h3>Preview SOAP API Response / Generate SQL Code for SOAP API Call</h3>
Once you configure settings for XML Driver now you can preview data or generate example code for desired language (e.g. C#, Python, Java, SQL Server).

Go to Preview tab and you will see default query generated based on settings you entered in previous sections. Attributes listed in WITH clause are optional. If you omit attribute in WITH clause it will use it from Properties tab.
<h3>Preview Data</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3884" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-12.png" alt="Preview SOAP API Response in ZappySys XML Driver" width="808" height="780" /></a>
Preview SOAP API Response in ZappySys XML Driver
<h3>Generate Code Option</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-driver-code-generator.png"><img loading="lazy" decoding="async" class="size-full wp-image-3885" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-13.png" alt="Generate Example Code for ZappySys Driver" width="572" height="618" /></a>
<div style="display: block;">Generate Example Code for ZappySys Driver</div></div>
<h2>Conclusion</h2>
<p>In this article, we used ZappySys Drivers to read data from JSON REST API / File. You can use same technique to consume SOAP / XML API or File. <a href="https://zappysys.com/products/odbc-powerpack/">Try ODBC PowerPack for FREE</a> and check out how easy it is to consume virtually any REST / SOAP API or Read from JSON / XML / CSV Files in  Talend Open Studio.</p>
<p>The post <a href="https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/">Read / Write REST API data in Talend (JSON / XML / SOAP)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read JIRA data in SSRS Reports (SQL Server Reporting Services)</title>
		<link>https://zappysys.com/blog/read-jira-data-in-ssrs-reports/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 27 Dec 2018 13:04:45 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[Reporting - Microsoft SSRS]]></category>
		<category><![CDATA[jira]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[odbc json driver]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[ssrs]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5759</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how to read rest api in SSRS reports. We recommend you go through that article first. In this post we will look at specific example on How to read JIRA data in SSRS Reports (SQL Server Reporting Services), along with few other topics such as how to generate an [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-jira-data-in-ssrs-reports/">Read JIRA data in SSRS Reports (SQL Server Reporting Services)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/jira-connector/odbc">API Connector for Jira Online</a> which makes it much simpler to <strong>Read/Write Jira Data in ODBC</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/jira-to-ssrs.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-5762 size-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/12/jira-to-ssrs-150x150.png" alt="jira-to-ssrs" width="150" height="150" /></a>In our previous blog we saw how to <a href="https://zappysys.com/blog/read-rest-api-using-ssrs-reports-call-json-xml-web-service/" target="_blank" rel="noopener">read rest api in SSRS reports</a>. We recommend you go through that article first. In this post we will look at specific example on <strong>How to read JIRA data in SSRS Reports (SQL Server Reporting Services)</strong>, along with few other topics such as how to generate an API Token using Atlassian Account for <strong>JIRA REST API Call</strong>, how to read all Issues data from JIRA using our ODBC Driver and load it into the SSRS reports.</p>
<p>We will go through the steps to read data from JIRA and Load into SQL Server using <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">JSON Driver of ODBC PowerPack</a></p>
<p>In nutshell, this post will focus on how to call JIRA API using ODBC PowerPack and how to create SSRS Report.</p>
<p>So let’s get started.</p>
<h2><span id="Requirements">Requirements</span></h2>
<ol>
<li>Make sure you have SSRS designer installed (You can download <a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017" target="_blank" rel="noopener">SSDT BI for Visual Studio</a>).</li>
<li>Finally, make sure to have <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
</ol>
<h2>What is JIRA</h2>
<p>JIRA is Atlassian’s popular project- and issue-tracking platform used by development and technical support teams to get more work done and faster.</p>
<p>It combines:</p>
<p><strong>issue tracking</strong> &#8211; a software application that allows to record and follow the progress of every problem or &#8220;issue&#8221; that user identifies until the problem is resolved.<br />
<strong>agile project management</strong> &#8211; an iterative approach to planning and guiding project processes. customizable workflow, and a pluggable integration &#8211; integrates with Freshdesk, GitHub, Zendesk, Zapbook, Asana and so on.</p>
<h2>Getting Started</h2>
<p>First of all, we will see several examples. ZappySys includes an <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source Connector</a> that will help you to call JIRA API, read various data from JIRA with SSIS and do many more actions using REST API. To learn more about JIRA API <a href="https://developer.atlassian.com/cloud/jira/platform/rest/" target="_blank" rel="noopener">check this help file</a>.</p>
<div class="content_block" id="custom_post_widget-4816"><h2>Generate API Token</h2>
To access JIRA data using REST API call you need to generate an API Token in your Atlassian account. Follow the steps mentioned below to generate API Token:
<ol>
 	<li>you can directly login to the <a href="https://id.atlassian.com" target="_blank" rel="noopener">JIRA Atlassian Cloud site</a> with your credentials, and redirect to the <a href="https://id.atlassian.com/profile/profile.action" target="_blank" rel="noopener">JIRA Atlassian Cloud Account's Profile Page</a> for generating an API Token.</li>
 	<li>Click <strong>API tokens</strong>, then <strong>Create API token</strong>.
<div class="wp-caption aligncenter">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-4315 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1.png" alt="Generate API Token - Step - 1" width="1600" height="605" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1.png 1600w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1-768x290.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1-1024x387.png 1024w" sizes="(max-width: 1600px) 100vw, 1600px" /></a>
<p class="wp-caption-text">Generate API Token - Step - 1</p>

</div></li>
 	<li>Create API Token - Give Label name to your API token which you are generating now
<div class="wp-caption aligncenter">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-4316" src="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2.png" alt="Generate API Token - Step - 2" width="1599" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2.png 1599w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2-768x290.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2-1024x386.png 1024w" sizes="(max-width: 1599px) 100vw, 1599px" /></a>
<p class="wp-caption-text">Generate API Token - Step - 2</p>

</div></li>
 	<li>Use <strong>Copy to the clipboard</strong>, and paste the token into your or elsewhere:
<div class="su-note-inner su-clearfix" style="background-color:#fff4b7;border-color:#fffdf1;color:#333333"><blockquote>Note:  * For security reasons it isn't possible to view the token after closing the creation dialog; if necessary, create a new token. * You should store the token securely, just as for any password.</blockquote></div>
<div class="wp-caption aligncenter">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-4321" src="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3.png" alt="Generate API Token - Step - 3" width="1600" height="602" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3.png 1600w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3-768x289.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3-1024x385.png 1024w" sizes="(max-width: 1600px) 100vw, 1600px" /></a>
<p class="wp-caption-text">Generate API Token - Step - 3</p>

</div></li>
 	<li>If you forgot API token, then you can Revoke your old API token and create new API token OR you can create multiple API tokens too.
<div class="wp-caption aligncenter">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-4326 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4.png" alt="Generate API token - Step - 4" width="1600" height="601" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4.png 1600w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4-768x288.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4-1024x385.png 1024w" sizes="(max-width: 1600px) 100vw, 1600px" /></a>
<p class="wp-caption-text">Generate API token - Step - 4</p>

</div></li>
</ol>
Now we have successfully generated an API token. Let´s start with an example. In this example, we will show how to read Tasks/Issues data from JIRA and store that data into a SQL table with SSIS.</div>
<div class="content_block" id="custom_post_widget-8950"><h2>About JIRA REST API</h2>
JIRA On-premises and Cloud Version both offers REST API. Here are some examples of <a href="https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/" target="_blank" rel="noopener">JIRA REST API</a>. For reading JIRA REST API data we will use <a href="https://developer.atlassian.com/server/jira/platform/jira-rest-api-example-query-issues-6291606/" target="_blank" rel="noopener">JIRA REST API Search method</a> which returns data in JSON format. Search API support use of <a href="https://developer.atlassian.com/server/jira/platform/jira-rest-api-example-query-issues-6291606/" target="_blank" rel="noopener">JQL Syntax</a> to filter issues. If you don't specify <strong>JQL</strong> parameters in /search endpoint then all issues will be returned. Check this link to learn <a href="https://www.youtube.com/watch?v=oSxBnqdF3-A" target="_blank" rel="noopener">how to build JQL for JIRA REST API Call</a>. If you don't have JIRA hosted instance yet but still want to try REST API Examples on public JIRA Server then try below URL (Its official JIRA site which lists their own issues). For example, try to copy below URL in a browser and hit enter.
<pre class="">https://jira.atlassian.com/rest/api/2/search?jql=project=JRASERVER</pre>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">Step-by-Step: Import JIRA data using REST API </span></h2>
Now once you have API token in the JIRA Atlassian Cloud website we can move to ODBC JSON Driver Configuration Part. For this example purpose you can use the following URL:
<pre class="lang:default decode:true">https://YOUR-DOMAIN.atlassian.net/rest/api/2/search?startAt=0&amp;maxResults=100&amp;jql=project=MYPROJECT</pre>
hence, <strong>your-domain is your Atlassian Cloud account’s domain name (we are using zappysys2.atlassian.net).</strong>
Therefore <strong>startAt</strong> is the index of the first item returned in the page of results.
And another<strong> maxResults</strong> is the maximum number of items that can be returned per page.

Above all, each API endpoint may have a different limit for the number of items returned, and these limits may change without notice. (For more See this <a href="https://developer.atlassian.com/cloud/jira/platform/rest/#pagination" target="_blank" rel="noopener">JIRA API Documentation for Pagination</a>)
<h2><span id="Configure_Data_Source_in_Gateway_ZappySys_JSON_REST_API_Driver_Example">Configure Data Source in Gateway (ZappySys JSON / REST API Driver Example)</span></h2>
Now let's look at how to configure <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">ZappySys Data Gateway</a>. This feature acts as a bridge between Client App and ZappySys Drivers. Using data gateway you can use ZappySys Drivers inside applications / operating systems where ZappySys drivers may not be available directly for some reason (e.g. You don't have access to Server for Installation or System does not support ODBC drivers like JAVA programs). <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-gateway/">Click here to read more</a> on various use cases of Data Gateway.
<h3><span style="font-size: 14pt;">Configure Data Gateway User / Port</span></h3>
Now let's look at steps to configure Data Gateway after installation. We will also create a sample data source for ODATA API (i.e. JSON based REST API Service).
<ol>
 	<li>Assuming you have installed <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> using default options (Which also enables Data Gateway Service)</li>
 	<li>Search "Gateway" in your start menu and click ZappySys Data Gateway
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" alt="Open ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Open ZappySys Data Gateway</p>

</div></li>
 	<li>First make sure Gateway Service is running (Verify Start icon is disabled)</li>
 	<li>Also verify Port on General Tab
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/ZappySys-data-gateway-port-5000.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ZappySys-data-gateway-port-5000.png" alt="Port Number setting on ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Port Number setting on ZappySys Data Gateway</p>

</div></li>
 	<li>Now go to Users tab. <strong>Click Add</strong> icon to add a new user. Check Is admin to give access to all data sources you add in future. If you don't check admin then you have to manually configure user permission for each data source.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-user.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-user.png" alt="Add Data Gateway User" /></a>
<p class="wp-caption-text">Add Data Gateway User</p>

</div></li>
</ol>
&nbsp;
<h4><span style="font-size: 14pt;">Configure Data Source</span></h4>
<ol>
 	<li>After user is added, go to Data Sources tab. <strong>Click Add</strong> icon to create new data source. Select appropriate driver based on your API / File format. You can choose Generic ODBC option to read data from ODBC DSN or use Native Driver option.
<pre class=""><strong>NOTE:</strong> Whenever possible use native driver option for better performance / security and ease of use.</pre>
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png" alt="Add Gateway Data Source (Native JSON Driver)" /></a>
<p class="wp-caption-text">Add Gateway Data Source (Native JSON Driver)</p>

</div></li>
 	<li>Now it's time to connect with JIRA. Let's use JSON Driver Data source with the following URL. Change domain with your own domain.
<div id="crayon-5befbb0bdc2d5563302218" class="crayon-syntax crayon-theme-vs2012 crayon-font-courier-new crayon-os-pc print-yes notranslate">
<div class="crayon-main">
<pre class="lang:default decode:true" style="padding-left: 30px;">https://{yourdomain}.atlassian.net/rest/api/2/search?startAt=0&amp;maxResults=100
</pre>
</div>
</div>
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_enter_jira_request_url.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-5390" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_enter_jira_request_url.png" alt="ODBC JSON Driver: Enter Request URL" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_enter_jira_request_url.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_enter_jira_request_url-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_enter_jira_request_url-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a>

ODBC JSON Driver: Enter Request URL

</div></li>
 	<li>It is time to configure the Other Settings. Select HTTP Connection Type from the Connection Type drop-down and Click on Click to Configure Link to Configure the Connection Manager.
<div class="wp-caption alignnone">

[caption id="attachment_5596" align="alignnone" width="1245"]<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/jira-odbc-json-driver-configure-http-api-connection-e1548714720542.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-5596 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/11/jira-odbc-json-driver-configure-http-api-connection-e1548714720542.png" alt="JIRA REST API Connection - Use ZappySys JSON Driver HTTP Connection" width="1245" height="695" /></a> JIRA REST API Connection - Use ZappySys JSON Driver HTTP Connection[/caption]

JIRA REST API Connection - Use ZappySys JSON Driver HTTP Connection

</div></li>
 	<li>Now, we are going to set Pagination related configurations for JIRA Search request. Page number indicator must be <span class="crayon-syntax crayon-syntax-inline crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-courier-new" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-v">startAt</span></span></span> and <span class="crayon-syntax crayon-syntax-inline crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-courier-new" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-v">maxResults</span></span></span> value in URL must match with Increment By (i.e. 100)
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_pagination_configurations.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-5392" src="https://zappysys.com/blog/wp-content/uploads/2018/12/odbc_json_driver_pagination_configuration.png" alt="ODBC JSON Driver - JIRA request Pagination Configurations Settings" width="802" height="702" /></a>

ODBC JSON Driver - JIRA request Pagination Configurations Settings

</div></li>
 	<li>After adding pagination parameters let's add <span id="crayon-5c2b1cd384d9b365821121" class="crayon-syntax crayon-syntax-inline crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-courier-new" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-v">JQL</span><span class="crayon-o">=</span></span></span> search parameter to get specific data. Here we are searching the data by Project name and status. You can find more information about JQL on this link: <a href="https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql" target="_blank" rel="noopener">Search JIRA like a boss with JQL</a>
Here is example JQL search query for Public JIRA site. Replace jira.atlassian.com and project JRASERVER with your own values.
<pre class="lang:default highlight:0 decode:true">https://jira.atlassian.com/rest/api/2/search?jql=project=JRASERVER
https://jira.atlassian.com/rest/api/2/search?jql=project=JRASERVER AND status=Open
https://jira.atlassian.com/rest/api/2/search?jql=project=JRASERVER AND status in (Open,Done)
https://jira.atlassian.com/rest/api/2/search?jql=project=JRASERVER AND status=Open order by lastViewed DESC</pre>
<div id="attachment_5829" align="aligncenter">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/jira-search-using-jql.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-5830 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2018/12/jira-search-using-jql-768x672.png" alt="Search using jql parameter" width="720" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/jira-search-using-jql-768x672.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/12/jira-search-using-jql-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/jira-search-using-jql.png 802w" sizes="(max-width: 720px) 100vw, 720px" /></a>

Search using JQL parameter

</div></li>
 	<li>Click on Select Filter to set the Filter.
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-5393" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter.png" alt="ODBC JSON Driver for JIRA API: Select Filter" width="1283" height="699" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter.png 1283w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter-300x163.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter-768x418.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter-1024x558.png 1024w" sizes="(max-width: 1283px) 100vw, 1283px" /></a>

ODBC JSON Driver for JIRA API: Select Filter

</div></li>
 	<li>You are done with the Configurations, Click on Test Connection to test the Connection.
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_test_connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-5394" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_test_connection.png" alt="ODBC JSON Driver - Test Connection" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_test_connection.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_test_connection-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_test_connection-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a>

ODBC JSON Driver - Test Connection

</div></li>
 	<li>After that select the table from where you want to get data.
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_create_query_of_json.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-5396" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_create_query_of_json.png" alt="JSON Driver: Create Query of JSON data" width="749" height="434" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_create_query_of_json.png 749w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_create_query_of_json-300x174.png 300w" sizes="(max-width: 749px) 100vw, 749px" /></a>

JSON Driver: Create Query of JSON data

</div></li>
 	<li>Click on the Preview Data button to preview the data.
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_preview_data.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-5553 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_preview_data.png" alt="Preview issues table data" width="1016" height="734" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_preview_data.png 1016w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_preview_data-300x217.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_preview_data-768x555.png 768w" sizes="(max-width: 1016px) 100vw, 1016px" /></a>

Preview issues table data

</div></li>
 	<li>And that’s it, Now we will move forward to the next Phase.</li>
</ol>
<h3>Build your Own JQL Search queries for JIRA Issue</h3>
In previous sections we saw some basic JQL queries to search JIRA Issues using API call. Now lets look at how to build such queries using online UI (Think like a query builder). from JIRA.
<ol>
 	<li>JIRA has its own public Issue repository which you can browse any time by going here <a href="https://jira.atlassian.com/issues/" target="_blank" rel="noopener">https://jira.atlassian.com/issues/</a></li>
 	<li>Now try to change filter settings for search criteria (E.g. change Project, Status etc)</li>
 	<li>You will notice when you make change your URL keeps changing too. From that URL you can extract ?jql=xxxxxxx  part and use it as template for your own JIRA API search queries.</li>
</ol>
For more information check <a href="https://www.youtube.com/watch?v=oSxBnqdF3-A" target="_blank" rel="noopener">how to build JQL for JIRA REST API Call</a>.</div>
<h3>Create and configure new SSRS Reports (Using ODBC Connection)</h3>
<p>Let&#8217;s create a new SSRS project.</p>
<ol>
<li>In SSRS, in a new Reporting Service Project, add a new Data Source:
<div id="attachment_3219" style="width: 585px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/04/add-ssrs-data-source.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3219" class="wp-image-3219 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/04/add-ssrs-data-source.jpg" alt="Add REST data source in SSRS" width="575" height="207" srcset="https://zappysys.com/blog/wp-content/uploads/2018/04/add-ssrs-data-source.jpg 575w, https://zappysys.com/blog/wp-content/uploads/2018/04/add-ssrs-data-source-300x108.jpg 300w" sizes="(max-width: 575px) 100vw, 575px" /></a><p id="caption-attachment-3219" class="wp-caption-text">Add SSRS data source</p></div></li>
<li>Also, specify a name for the data source and in type select ODBC. Press Edit to select the ODBC connection for JSON and REST API and select the ZappySys Data Source name that we created before.
<div id="attachment_5760" style="width: 1209px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/add-ssrs-json-data-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5760" class="wp-image-5760 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/12/add-ssrs-json-data-source.png" alt="Add ODBC JSON Data Source" width="1199" height="551" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/add-ssrs-json-data-source.png 1199w, https://zappysys.com/blog/wp-content/uploads/2018/12/add-ssrs-json-data-source-300x138.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/add-ssrs-json-data-source-768x353.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/12/add-ssrs-json-data-source-1024x471.png 1024w" sizes="(max-width: 1199px) 100vw, 1199px" /></a><p id="caption-attachment-5760" class="wp-caption-text">Add ODBC JSON Data Source</p></div></li>
<li>Now let’s create a new SSRS report which uses the API data source we created in the previous section.</li>
<li>Right-click on the Reports node and click Add New Report (Wizard mode)
<div id="attachment_3228" style="width: 446px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/04/ssrs-add-new-json-report.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3228" class="wp-image-3228 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/04/ssrs-add-new-json-report.jpg" alt="Add report" width="436" height="271" srcset="https://zappysys.com/blog/wp-content/uploads/2018/04/ssrs-add-new-json-report.jpg 436w, https://zappysys.com/blog/wp-content/uploads/2018/04/ssrs-add-new-json-report-300x186.jpg 300w" sizes="(max-width: 436px) 100vw, 436px" /></a><p id="caption-attachment-3228" class="wp-caption-text">Add new SSRS report</p></div>
<p>&nbsp;</li>
<li>In New report, wizard window clicks on next button until you reach the step of query builder like below screen. Now Press the query builder button.<div class="su-note"  style="border-color:#e5da9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff4b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Note: You can also copy and paste the query directly into the Query string box which we created in the previous phase.</p><pre class="crayon-plain-tag">SELECT * FROM "issues"</pre><p>
</div></div>
<div id="attachment_3230" style="width: 735px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/04/ssrs-query-builder.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3230" class="wp-image-3230 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/04/ssrs-query-builder.jpg" alt="Create query from REST API" width="725" height="521" srcset="https://zappysys.com/blog/wp-content/uploads/2018/04/ssrs-query-builder.jpg 725w, https://zappysys.com/blog/wp-content/uploads/2018/04/ssrs-query-builder-300x216.jpg 300w" sizes="(max-width: 725px) 100vw, 725px" /></a><p id="caption-attachment-3230" class="wp-caption-text">Query builder</p></div></li>
<li>Now, press the Add table icon and go to Views. Select issues(DATA) and press Add.
<div id="attachment_5781" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssrs-add-table.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5781" class="wp-image-5781 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssrs-add-table-768x572.png" alt="ssrs-add-table" width="720" height="536" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssrs-add-table-768x572.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssrs-add-table-300x223.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssrs-add-table.png 917w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-5781" class="wp-caption-text">SSRS Add Table</p></div></li>
<li>Now remove <strong>DATA.</strong> prefix from the query so that our query look&#8217;s like as below and Click Ok button:<br />
<pre class="crayon-plain-tag">SELECT issues.* FROM issues</pre>
</li>
<li>Now press Next Button and select <strong>Tabular</strong> Report Type and go to next in the following option until the completing wizard and specify a name for the report and finally press the <strong>Finish</strong> button.</li>
<li>Now click on the Preview a report. It shows the report and exports the REST API data to Word, Excel, PowerPoint, etc:
<div id="attachment_5784" style="width: 750px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssrs-preview-report-issues-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5784" class="wp-image-5784 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssrs-preview-report-issues-1.png" alt="SSRS Preview a Report" width="740" height="578" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssrs-preview-report-issues-1.png 740w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssrs-preview-report-issues-1-300x234.png 300w" sizes="(max-width: 740px) 100vw, 740px" /></a><p id="caption-attachment-5784" class="wp-caption-text">SSRS Preview a Report</p></div></li>
<li>That’s all we have successfully imported the JIRA data in SSRS Reports (SQL Server Reporting Services).</li>
</ol>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>In this blog, we have learned how to retrieve the data from JIRA using ODBC JSON Driver and then generated the SSRS Reports using those data with ODBC DSN in a very simple way. You can achieve many more functionalities with the use of <a href="https://zappysys.com/products/odbc-powerpack/">ODBC PowerPack</a>.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of JIRA API with our tools:</p>
<ul>
<li><a href="https://developer.atlassian.com/cloud/jira/platform/rest/" target="_blank" rel="noopener">JIRA Documentation for API</a></li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ODBC JSON / REST API Driver</a>, you can also find <a href="https://youtu.be/iwezz0Z3D4U" target="_blank" rel="noopener">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of <a href="https://zappysys.com/onlinehelp/odbc-powerpack/index.htm#page=json-odbc-driver-intro.htm" target="_blank" rel="noopener">JSON Driver</a>.</li>
<li><strong>Blog/articles link</strong>: <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/json-rest-api-driver/" target="_blank" rel="noopener">https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/json-rest-api-driver/</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-jira-data-in-ssrs-reports/">Read JIRA data in SSRS Reports (SQL Server Reporting Services)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Import JIRA data in Power BI</title>
		<link>https://zappysys.com/blog/how-to-import-jira-data-in-powerbi/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 26 Dec 2018 07:53:23 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[Reporting - Microsoft Power BI]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[jira]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[odbc json driver]]></category>
		<category><![CDATA[power bi]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5715</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how to import rest api in Power BI. We recommend you go through that article first. In this article, we will learn how to Import JIRA data in Power BI. For that, we will create a successful HTML Connection then request for reading JIRA data and loading into Power [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/how-to-import-jira-data-in-powerbi/">How to Import JIRA data in Power BI</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/zendesk-connector/power-bi">API Connector for Jira Online</a> which makes it much simpler to <strong>Read/Write Jira Data in Power BI</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/jira-to-power-biimport-export.png"><img loading="lazy" decoding="async" class="alignleft wp-image-5717 size-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/06/jira-to-power-biimport-export-150x150.png" alt="jira-to-power-biimport-export" width="150" height="150" /></a>In our previous blog we saw how to <a href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/" target="_blank" rel="noopener">import rest api in Power BI</a>. We recommend you go through that article first. In this article, we will learn how to <strong>Import JIRA data in Power BI</strong>. For that, we will create a successful HTML Connection then request for reading JIRA data and loading into Power BI</p>
<p>Power BI is a very popular Business Analytic tool used to get business information. It is very popular because it is easy to install, simple to learn and very intuitive. Also, REST API is very popular these days and we wanted to show you a way to integrate them in Power BI with the help of the <a href="https://zappysys.com/products/odbc-powerpack/">ZappySys ODBC PowerPack</a>. This software includes powerful drivers to <strong>query REST API</strong> URL, Local <strong>XML / JSON files</strong> and <strong>XML SOAP Web Service</strong> with simple SQL queries.</p>
<p>In nutshell, this post will focus on how to call JIRA API using <a href="https://zappysys.com/products/odbc-powerpack/">Zappysys ODBC PowerPack</a>. So let&#8217;s get started</p>
<h2><span id="Requirements">Prerequisite</span></h2>
<ol>
<li>First, you will need to have our <a href="https://zappysys.com/products/odbc-powerpack/">ZappySys ODBC Power Pack.</a></li>
<li>In the second place, you will need to have internet access.</li>
<li>On third place, <a href="https://powerbi.microsoft.com/en-us/desktop/" target="_blank" rel="noopener">Power BI Desktop (FREE)</a> installed.</li>
<li><a href="https://id.atlassian.com/manage-profile">JIRA Atlassian</a> account.</li>
</ol>
<h2>What is JIRA</h2>
<p>JIRA is Atlassian’s popular project- and issue-tracking platform used by development and technical support teams to get more work done and faster.</p>
<p>It combines:</p>
<p><strong>issue tracking</strong> &#8211; a software application that allows to record and follow the progress of every problem or &#8220;issue&#8221; that user identifies until the problem is resolved.<br />
<strong>agile project management</strong> &#8211; an iterative approach to planning and guiding project processes. customizable workflow, and a pluggable integration &#8211; integrates with Freshdesk, GitHub, Zendesk, Zapbook, Asana and so on.</p>
<h2><span id="Getting_Started">Getting Started</span></h2>
<p>In order to start, we will show several examples. ZappySys ODBC PowerPack includes the ZappySys JSON Driver that will help you to call JIRA API, retrieve various data from JIRA and load that data in Power BI. To learn more about JIRA API <a href="https://developer.atlassian.com/cloud/jira/platform/rest/" target="_blank" rel="noopener">check this help file</a>.</p>
<div class="content_block" id="custom_post_widget-4816"><h2>Generate API Token</h2>
To access JIRA data using REST API call you need to generate an API Token in your Atlassian account. Follow the steps mentioned below to generate API Token:
<ol>
 	<li>you can directly login to the <a href="https://id.atlassian.com" target="_blank" rel="noopener">JIRA Atlassian Cloud site</a> with your credentials, and redirect to the <a href="https://id.atlassian.com/profile/profile.action" target="_blank" rel="noopener">JIRA Atlassian Cloud Account's Profile Page</a> for generating an API Token.</li>
 	<li>Click <strong>API tokens</strong>, then <strong>Create API token</strong>.
<div class="wp-caption aligncenter">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-4315 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1.png" alt="Generate API Token - Step - 1" width="1600" height="605" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1.png 1600w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1-768x290.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-1-1024x387.png 1024w" sizes="(max-width: 1600px) 100vw, 1600px" /></a>
<p class="wp-caption-text">Generate API Token - Step - 1</p>

</div></li>
 	<li>Create API Token - Give Label name to your API token which you are generating now
<div class="wp-caption aligncenter">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-4316" src="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2.png" alt="Generate API Token - Step - 2" width="1599" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2.png 1599w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2-768x290.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-2-1024x386.png 1024w" sizes="(max-width: 1599px) 100vw, 1599px" /></a>
<p class="wp-caption-text">Generate API Token - Step - 2</p>

</div></li>
 	<li>Use <strong>Copy to the clipboard</strong>, and paste the token into your or elsewhere:
<div class="su-note-inner su-clearfix" style="background-color:#fff4b7;border-color:#fffdf1;color:#333333"><blockquote>Note:  * For security reasons it isn't possible to view the token after closing the creation dialog; if necessary, create a new token. * You should store the token securely, just as for any password.</blockquote></div>
<div class="wp-caption aligncenter">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-4321" src="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3.png" alt="Generate API Token - Step - 3" width="1600" height="602" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3.png 1600w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3-768x289.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-3-1024x385.png 1024w" sizes="(max-width: 1600px) 100vw, 1600px" /></a>
<p class="wp-caption-text">Generate API Token - Step - 3</p>

</div></li>
 	<li>If you forgot API token, then you can Revoke your old API token and create new API token OR you can create multiple API tokens too.
<div class="wp-caption aligncenter">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-4326 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4.png" alt="Generate API token - Step - 4" width="1600" height="601" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4.png 1600w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4-768x288.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/07/jira-generate-api-token-step-4-1024x385.png 1024w" sizes="(max-width: 1600px) 100vw, 1600px" /></a>
<p class="wp-caption-text">Generate API token - Step - 4</p>

</div></li>
</ol>
Now we have successfully generated an API token. Let´s start with an example. In this example, we will show how to read Tasks/Issues data from JIRA and store that data into a SQL table with SSIS.</div>
<div class="content_block" id="custom_post_widget-5776"><h2>About JIRA REST API</h2>
JIRA On-premises and Cloud Version both offers REST API. Here are some examples of <a href="https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/" target="_blank" rel="noopener">JIRA REST API</a>. For reading JIRA REST API data we will use <a href="https://developer.atlassian.com/server/jira/platform/jira-rest-api-example-query-issues-6291606/" target="_blank" rel="noopener">JIRA REST API Search method</a> which returns data in JSON format. Search API support use of <a href="https://developer.atlassian.com/server/jira/platform/jira-rest-api-example-query-issues-6291606/" target="_blank" rel="noopener">JQL Syntax</a> to filter issues. If you don't specify <strong>JQL</strong> parameters in /search endpoint then all issues will be returned. Check this link to learn <a href="https://www.youtube.com/watch?v=oSxBnqdF3-A" target="_blank" rel="noopener">how to build JQL for JIRA REST API Call</a>. If you don't have JIRA hosted instance yet but still want to try REST API Examples on public JIRA Server then try below URL (Its official JIRA site which lists their own issues). For example, try to copy below URL in a browser and hit enter.
<pre class="">https://jira.atlassian.com/rest/api/2/search?jql=project=JRASERVER</pre>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">Step-by-Step: Import JIRA data using REST API </span></h2>
Now once you have API token in the JIRA Atlassian Cloud website we can move to ODBC JSON Driver Configuration Part. For this example purpose you can use the following URL:
<pre class="lang:default decode:true">https://YOUR-DOMAIN.atlassian.net/rest/api/2/search?startAt=0&amp;maxResults=100&amp;jql=project=MYPROJECT</pre>
hence, <strong>your-domain is your Atlassian Cloud account’s domain name (we are using zappysys2.atlassian.net).</strong>
Therefore <strong>startAt</strong> is the index of the first item returned in the page of results.
And another<strong> maxResults</strong> is the maximum number of items that can be returned per page.

Above all, each API endpoint may have a different limit for the number of items returned, and these limits may change without notice. (For more See this <a href="https://developer.atlassian.com/cloud/jira/platform/rest/#pagination" target="_blank" rel="noopener">JIRA API Documentation for Pagination</a>)
<h3><span id="Create_ODBC_DSN_8211_JSON_Driver">Create ODBC – Zappysys JSON Driver Data Source</span></h3>
<ol>
 	<li>To do this, we will first open the ODBC Data Source : <strong>Select 64-Bit</strong> for 64bit apps and 32bit if your app / process doesnt support 64bit.
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/open-ODBC-Data-souce-administrator.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-4232 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/open-ODBC-Data-souce-administrator.png" alt="ODBC Windows" width="393" height="531" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/open-ODBC-Data-souce-administrator.png 393w, https://zappysys.com/blog/wp-content/uploads/2018/06/open-ODBC-Data-souce-administrator-222x300.png 222w" sizes="(max-width: 393px) 100vw, 393px" /></a> Windows ODBC Data Sources

</div></li>
 	<li>Click on Add button in User DSN Tab and then select JSON Driver from the driver list and click on Finish button to Create a new JSON Driver.
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-3993 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver.png" alt="ODBC User DSN Tab: Add new Driver Screen" width="1057" height="422" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver.png 1057w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver-300x120.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver-768x307.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver-1024x409.png 1024w" sizes="(max-width: 1057px) 100vw, 1057px" /></a> ODBC User DSN Tab: Add new Driver Screen

</div></li>
 	<li>Now it's time to connect with JIRA. Let's use JSON Driver Data source with the following URL. Change domain with your own domain.
<div id="crayon-5befbb0bdc2d5563302218" class="crayon-syntax crayon-theme-vs2012 crayon-font-courier-new crayon-os-pc print-yes notranslate">
<div class="crayon-main">
<pre class="lang:default decode:true" style="padding-left: 30px;">https://{yourdomain}.atlassian.net/rest/api/2/search?startAt=0&amp;maxResults=100
</pre>
</div>
</div>
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_enter_jira_request_url.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-5390" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_enter_jira_request_url.png" alt="ODBC JSON Driver: Enter Request URL" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_enter_jira_request_url.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_enter_jira_request_url-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_enter_jira_request_url-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a>

ODBC JSON Driver: Enter Request URL

</div></li>
 	<li>It is time to configure the Other Settings. Select HTTP Connection Type from the Connection Type drop-down and Click on Click to Configure Link to Configure the Connection Manager.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/jira-odbc-json-driver-configure-http-api-connection-e1548714720542.png" target="_blank" rel="noopener"><img decoding="async" class="wp-image-5830 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2018/11/jira-odbc-json-driver-configure-http-api-connection-e1548714720542.png" alt="JIRA REST API Connection - Use ZappySys JSON Driver HTTP Connection" width="720" /></a>JIRA REST API Connection - Use ZappySys JSON Driver HTTP Connection</div></li>
 	<li>Now, we are going to set Pagination related configurations for JIRA Search request. Page number indicator must be <span class="crayon-syntax crayon-syntax-inline crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-courier-new" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-v">startAt</span></span></span> and <span class="crayon-syntax crayon-syntax-inline crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-courier-new" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-v">maxResults</span></span></span> value in URL must match with Increment By (i.e. 50)
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/odbc_json_driver_pagination_configuration.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="aligncenter wp-image-9305 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2018/12/odbc_json_driver_pagination_configuration.png" alt="ODBC JSON Driver - JIRA request Pagination Configurations Settings" width="720" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/odbc_json_driver_pagination_configuration.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/12/odbc_json_driver_pagination_configuration-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/odbc_json_driver_pagination_configuration-768x672.png 768w" sizes="(max-width: 720px) 100vw, 720px" /></a>

ODBC JSON Driver - JIRA request Pagination Configurations Settings

</div></li>
 	<li>After adding pagination parameters let's add <span id="crayon-5c2b1cd384d9b365821121" class="crayon-syntax crayon-syntax-inline crayon-theme-vs2012 crayon-theme-vs2012-inline crayon-font-courier-new" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-pre crayon-code" style="font-size: 12px !important; line-height: 15px !important;"><span class="crayon-v">JQL</span><span class="crayon-o">=</span></span></span> search parameter to get specific data. Here we are searching the data by Project name and status. You can find more information about JQL on this link: <a href="https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql" target="_blank" rel="noopener">Search JIRA like a boss with JQL</a>
Here is example JQL search query for Public JIRA site. Replace jira.atlassian.com and project JRASERVER with your own values.
<pre class="lang:default highlight:0 decode:true">https://jira.atlassian.com/rest/api/2/search?jql=project=JRASERVER
https://jira.atlassian.com/rest/api/2/search?jql=project=JRASERVER AND status=Open
https://jira.atlassian.com/rest/api/2/search?jql=project=JRASERVER AND status in (Open,Done)
https://jira.atlassian.com/rest/api/2/search?jql=project=JRASERVER AND status=Open order by lastViewed DESC</pre>
<div id="attachment_5829" align="aligncenter">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/jira-search-using-jql.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-5830 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2018/12/jira-search-using-jql-768x672.png" alt="Search using jql parameter" width="720" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/jira-search-using-jql-768x672.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/12/jira-search-using-jql-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/jira-search-using-jql.png 802w" sizes="(max-width: 720px) 100vw, 720px" /></a>

Search using JQL parameter

</div></li>
 	<li>Click on Select Filter to set the Filter.
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-5393" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter.png" alt="ODBC JSON Driver for JIRA API: Select Filter" width="1283" height="699" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter.png 1283w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter-300x163.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter-768x418.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_select_filter-1024x558.png 1024w" sizes="(max-width: 1283px) 100vw, 1283px" /></a>

ODBC JSON Driver for JIRA API: Select Filter

</div></li>
 	<li>You are done with the Configurations, Click on Test Connection to test the Connection.
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_test_connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-5394" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_test_connection.png" alt="ODBC JSON Driver - Test Connection" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_test_connection.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_test_connection-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_test_connection-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a>

ODBC JSON Driver - Test Connection

</div></li>
 	<li>After that select the table from where you want to get data.
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_create_query_of_json.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-5396" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_create_query_of_json.png" alt="JSON Driver: Create Query of JSON data" width="749" height="434" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_create_query_of_json.png 749w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_create_query_of_json-300x174.png 300w" sizes="(max-width: 749px) 100vw, 749px" /></a>

JSON Driver: Create Query of JSON data

</div></li>
 	<li>Click on the Preview Data button to preview the data.
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_preview_data.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-5553 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_preview_data.png" alt="Preview issues table data" width="1016" height="734" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_preview_data.png 1016w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_preview_data-300x217.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_preview_data-768x555.png 768w" sizes="(max-width: 1016px) 100vw, 1016px" /></a>

Preview issues table data

</div></li>
 	<li>And that’s it, Now we will move forward to the next Phase.</li>
</ol>
<h3>Build your Own JQL Search queries for JIRA Issue</h3>
In previous sections we saw some basic JQL queries to search JIRA Issues using API call. Now lets look at how to build such queries using online UI (Think like a query builder). from JIRA.
<ol>
 	<li>JIRA has its own public Issue repository which you can browse any time by going here <a href="https://jira.atlassian.com/issues/" target="_blank" rel="noopener">https://jira.atlassian.com/issues/</a></li>
 	<li>Now try to change filter settings for search criteria (E.g. change Project, Status etc)</li>
 	<li>You will notice when you make change your URL keeps changing too. From that URL you can extract ?jql=xxxxxxx  part and use it as template for your own JIRA API search queries.</li>
</ol>
For more information check <a href="https://www.youtube.com/watch?v=oSxBnqdF3-A" target="_blank" rel="noopener">how to build JQL for JIRA REST API Call</a>.</div>
<h2><span id="Load_data_into_Power_BI">Load JIRA data into Power BI (Connect JIRA REST API)</span></h2>
<div class="content_block" id="custom_post_widget-6247">In the previous section, we configured and added the ZappySys drivers in the ODBC Driver Administrator with information to connect to REST API. We queried the REST API data in JSON / XML format. Now let's look at how to import REST API data in Power BI using from ODBC connection.
<ol>
 	<li>Open Power BI Desktop and select the <strong>Get data </strong>option.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/Get-data-Power-bi-desktop.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/Get-data-Power-bi-desktop.png" alt="Get data using power bi" />
</a>
<p class="wp-caption-text">Get data using Power BI</p>

</div></li>
</ol>
<ol>
 	<li>Once Get data is clicked, Go to <strong>Other</strong> and select <strong>ODBC.</strong>
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-odbc-other-data-source.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-power-bi-import-rest-api-2-1.png" alt="Import ODBC data source in power bi" />
</a>
<p class="wp-caption-text">Import ODBC data source in Power BI</p>

</div></li>
 	<li>After that select ODBC DSN name from the DSN dropdown</li>
 	<li>Now it's time to import data. Basically, there are two modes to import data. <strong>Table Mode</strong> and <strong>Query Mode</strong>. Query mode is the most common but we will show you both ways.</li>
 	<li><strong>Import using Power BI Query Mode:  </strong>Select your DSN and click Advanced Option to enter custom SQL Query to Import your REST API data. You can use ODBC DSN Data sources Preview tool to generate SQL Query. For example you can enter query like below. If you are not sure use Query builder (Found on Driver Preview Window)
<pre class="lang:tsql decode:true">SELECT * FROM $
WITH(SRC='https://my-api-url')</pre>
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-from-rest-api-url-odbc-json-driver.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-power-bi-import-rest-api-1-1.png" alt="Import JSON / REST API data in Power BI using SQL Query Mode" />
</a>
<p class="wp-caption-text">Import JSON / REST API data in Power BI using SQL Query Mode</p>

</div>
&nbsp;</li>
 	<li><strong>Import using Power BI Table Mode:  </strong>If you don't specify SQL query under advanced options then you may get a chance to select Table name to import and Credentials. If Power BI asks for credentials then select <strong>Windows</strong> and connect.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/select-credentials-zappysys.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-power-bi-import-rest-api-3.png" alt="Select credentials for ODBC Source" />
</a>
<p class="wp-caption-text">Select credentials for ODBC Source</p>

</div></li>
 	<li>Once you enter select table, you can choose Select data to import and click OK (Below screeenshot is for the Table mode import when no SQL specified. You can pick desired table to import)
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/Navigator-odbc-json-get-values.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-power-bi-import-rest-api-4.png" alt="Select Table to import in Power BI" />
</a>
<p class="wp-caption-text">Select Table to import in Power BI</p>

</div></li>
 	<li>You can also display data in map using Map visualization like below. Press the map and check Address this option will display the addresses in a map.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/maps-power-view.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-power-bi-import-rest-api-5.png" alt="see address in power bi map" />
</a>
<p class="wp-caption-text">See Address data in power bi map</p>

</div>
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/maps-address-power-bi.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-power-bi-import-rest-api-6.png" alt="Map visualization in Power BI" />
</a>
<p class="wp-caption-text">Map visualization in Power BI</p>

</div></li>
 	<li>Now, let's display data in Table Format. Select in values more columns and select the data grid to visualize the data.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/visualization-power-bi-select-columns.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-power-bi-import-rest-api-7.png" alt="Select columns in Power BI" />
</a>
<p class="wp-caption-text">Select columns in Power BI</p>

</div></li>
 	<li>Once data is displayed, Right click on the data and select <strong>Show Data</strong>.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-show-data.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-power-bi-import-rest-api-8.png" alt="show data in power bi" />
</a>
<p class="wp-caption-text">Show data in Power BI</p>

</div></li>
 	<li>The data will be displayed
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-read-data.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-power-bi-import-rest-api-9.png" alt="View Power BI Table data" />
</a>
<p class="wp-caption-text">read json information data</p>

</div></li>
</ol></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>In this blog, we have learned how to retrieve the data from JIRA using ODBC JSON Driver and then Load those data in Power BI with ODBC DSN in a very simple way. You can achieve many more functionalities with the use of <a href="https://zappysys.com/products/odbc-powerpack/">ODBC PowerPack</a>.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of JIRA API with our tools:</p>
<ul>
<li><a href="https://developer.atlassian.com/cloud/jira/platform/rest/" target="_blank" rel="noopener">JIRA Documentation for API</a></li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ODBC JSON / REST API Driver</a>, you can also find <a href="https://youtu.be/iwezz0Z3D4U" target="_blank" rel="noopener">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of <a href="https://zappysys.com/onlinehelp/odbc-powerpack/index.htm#page=json-odbc-driver-intro.htm" target="_blank" rel="noopener">JSON Driver</a>.</li>
<li><strong>Blog/articles link</strong>: <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/json-rest-api-driver/" target="_blank" rel="noopener">https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/json-rest-api-driver/</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/how-to-import-jira-data-in-powerbi/">How to Import JIRA data in Power BI</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Get Office 365 data in Power BI using Microsoft Graph API and ODBC</title>
		<link>https://zappysys.com/blog/get-office-365-data-in-power-bi-using-microsoft-graph-api-and-odbc/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 19 Dec 2018 17:57:00 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC App Integration]]></category>
		<category><![CDATA[ODBC Drivers]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Power BI]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[microsoft graph api]]></category>
		<category><![CDATA[office 365]]></category>
		<category><![CDATA[onedrive]]></category>
		<category><![CDATA[onenote]]></category>
		<category><![CDATA[power bi]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5661</guid>

					<description><![CDATA[<p>Introduction In this article, we will get Office 365  data in Power BI using Microsoft Graph API and ODBC drivers. Specifically, we will get Excel file data in OneDrive, events from a Calendar and finally, a list in a note in OneNote and then load that data into a Power BI report. We will achieve [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/get-office-365-data-in-power-bi-using-microsoft-graph-api-and-odbc/">Get Office 365 data in Power BI using Microsoft Graph API and ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-6204 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-to-power-bi-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-to-power-bi-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-to-power-bi-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-to-power-bi.png 350w" sizes="(max-width: 150px) 100vw, 150px" />In this article, we will get <a href="https://www.office.com/" target="_blank" rel="noopener">Office 365</a>  data in Power BI using <a href="https://docs.microsoft.com/en-us/graph/overview" target="_blank" rel="noopener">Microsoft Graph API</a> and ODBC drivers. Specifically, we will get Excel file data in <a href="https://onedrive.live.com" target="_blank" rel="noopener">OneDrive</a>, events from a <a href="https://outlook.live.com/owa/?path=/calendar" target="_blank" rel="noopener">Calendar</a> and finally, a list in a note in <a href="https://www.onenote.com/" target="_blank" rel="noopener">OneNote</a> and then load that data into a Power BI report. We will achieve that by creating an ODBC data source using <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> and then querying corresponding <a href="https://docs.microsoft.com/en-us/graph/overview" target="_blank" rel="noopener">Microsoft Graph API</a> methods. ODBC PowerPack allows to query REST/SOAP APIs in an easy way and lets to view responses in a tabular format, which will be perfect to accomplish our goal.</p>
<p>&nbsp;</p>
<h2>Prerequisites</h2>
<ol>
<li>A Power BI account.</li>
<li>Wield basic Power BI skills.</li>
<li><a href="https://powerbi.microsoft.com/en-us/desktop/" target="_blank" rel="noopener">Power BI Desktop</a> installed.</li>
<li><a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
</ol>
<h2>Step By Step &#8211; Get Office 365 data in Power BI using Microsoft Graph API and ODBC</h2>
<div class="content_block" id="custom_post_widget-5670"><h2 style="text-align: left;">Register Application (OAuth2 App for Graph API)</h2>
<p style="text-align: left;">The first step to access any Office 365 API / Graph API is to register an OAuth App in the Azure Portal. After
following these steps, you will get the following two items to use in the next section:</p>

<ul style="text-align: left;">
 	<li>Application Id</li>
 	<li>Application Secret</li>
</ul>
<p style="text-align: left;">In this section, you will learn how to register a custom app in Microsoft Azure portal that will allow access to the
OneDrive. So, let's get started -</p>

<ol>
 	<li style="text-align: left;">Log into <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps">Microsoft
Azure portal</a> to register a custom app.</li>
 	<li style="text-align: left;">Register a new application by clicking New Registration link.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png"><img loading="lazy" decoding="async" class="size-full wp-image-9034" src="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png" alt="New App Registration in Azure portal" width="748" height="221" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png 748w, https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration-300x89.png 300w" sizes="(max-width: 748px) 100vw, 748px" /></a></li>
 	<li style="text-align: left;">Provide the name of the custom app and who can access the app in the organization.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg"><img loading="lazy" decoding="async" class="wp-image-9005 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg" alt="Register an OneDrive App" width="610" height="518" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg 610w, https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1-300x255.jpg 300w" sizes="(max-width: 610px) 100vw, 610px" /></a></li>
 	<li style="text-align: left;">Go to the App overview and add a Redirect URL.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg"><img loading="lazy" decoding="async" class="wp-image-9044 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg" alt="Add a Redirect URL" width="937" height="122" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg 937w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1-300x39.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1-768x100.jpg 768w" sizes="(max-width: 937px) 100vw, 937px" /></a></li>
 	<li style="text-align: left;">Click on "Add a Platform" under Platform Configuration section and then select "Web" under Web applications
section to enter a Redirect URL.
<pre class="lang:default decode:true">https://zappysys.com/oauth</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9007" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg" alt="Redirect URL" width="466" height="564" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg 466w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2-248x300.jpg 248w" sizes="(max-width: 466px) 100vw, 466px" /></a></li>
 	<li style="text-align: left;">Create a Client Secret key which will be used to Authenticate the custom Azure app.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9010" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg" alt="Add a Client Secret" width="576" height="403" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg 576w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret-300x210.jpg 300w" sizes="(max-width: 576px) 100vw, 576px" /></a><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9011" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg" alt="Secret Key Expiration Period" width="208" height="259" /></a><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9012" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg" alt="Specify Secret Key" width="1024" height="176" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3-300x52.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3-768x132.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a>
<div><strong>Note</strong> - Take a note of <strong>Client Secret</strong>, it will be required while
configuring OAuth connection in the SSIS later</div></li>
 	<li style="text-align: left;">Add API Permissions.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9008" src="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions.jpg" alt="OneDrive API Permissions" width="1291" height="415" /></a></li>
 	<li style="text-align: left;">Select following permissions from the Delegated Permissions section.
<pre class="lang:default decode:true">User.ReadBasic.All
Files.Read
offline_access</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9009" src="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg" alt="Select Delegated Permissions" width="512" height="571" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg 512w, https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2-269x300.jpg 269w" sizes="(max-width: 512px) 100vw, 512px" /></a></li>
 	<li>Take a note of Client ID, it will be required while configuring OAuth connection in the SSIS later.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret4.jpg"><img loading="lazy" decoding="async" class="wp-image-9013 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret4.jpg" alt="App Client ID" width="810" height="274" /></a></li>
</ol></div>
<div class="content_block" id="custom_post_widget-5914"><h3>Open ODBC Data Source Administrator</h3>
<ol>
 	<li>Hit <em>Windows Start</em> button and search for "odbc".</li>
 	<li>You will see two versions of <em>ODBC Data Source administrator</em>: <strong>64-bit </strong>and <strong>32-bit</strong>. Choose:
<ol>
 	<li style="list-style-type: none;">
<ul style="margin-left: 0px;">
 	<li>64-bit if your client application is a 64-bit program and you plan to create a <em>System DSN</em>.</li>
 	<li>32-bit if your client application is a 32-bit program and you plan to create a <em>System DSN</em>.</li>
 	<li>32-bit or 64-bit version if you plan to create a <em>User DSN</em>.</li>
</ul>
</li>
</ol>
<div class="wp-caption alignnone">

<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6213" src="https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2.png" alt="" width="394" height="542" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2.png 394w, https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2-218x300.png 218w" sizes="(max-width: 394px) 100vw, 394px" />
<p class="wp-caption-text">Windows ODBC Data Sources</p>

</div></li>
 	<li>Once you open, you should see a similar window:
<div class="wp-caption">

<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5915" src="https://zappysys.com/blog/wp-content/uploads/2019/01/open-odbc-data-source-administrator-to-get-data-in-power-bi.png" alt="" width="594" height="421" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/open-odbc-data-source-administrator-to-get-data-in-power-bi.png 594w, https://zappysys.com/blog/wp-content/uploads/2019/01/open-odbc-data-source-administrator-to-get-data-in-power-bi-300x213.png 300w" sizes="(max-width: 594px) 100vw, 594px" />
<p class="wp-caption-text">ODBC Data Source Administrator</p>

</div></li>
</ol></div>
<h3>Set up an ODBC data source based on ZappySys JSON Driver</h3>
<h4>Add a data source</h4>
<div class="content_block" id="custom_post_widget-6052"><ol>
 	<li>Go to <em>System DSN</em> and press <em>Add</em> to add a system DSN. If you use apps like Power BI which needs access only your User account then you can create User DSN.<img loading="lazy" decoding="async" class="wp-image-2927 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/odb-data-source-administrator-add.png" alt="Create new ODBC DSN (System DSN Tab)" width="590" height="419" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/odb-data-source-administrator-add.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/odb-data-source-administrator-add-300x213.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></li>
 	<li>Add a data source based on <em>ZappySys JSON Driver</em>:
<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/add-zappysys-json-driver.png"><img loading="lazy" decoding="async" class="wp-image-2923 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-zappysys-json-driver.png" alt="Add ZappySys JSON / REST Driver Connection" width="464" height="352" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-zappysys-json-driver.png 464w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-zappysys-json-driver-300x228.png 300w" sizes="(max-width: 464px) 100vw, 464px" /></a></li>
</ol></div>
<h4>Configure the data source</h4>
<div class="content_block" id="custom_post_widget-6064"><ol>
 	<li>Once a window appears, give a name to the data source, e.g. <strong>System - JSON:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6182" src="https://zappysys.com/blog/wp-content/uploads/2019/01/get-data-from-office-365-using-microsoft-graph-api-and-odbc-powerpack-1.png" alt="" width="697" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/get-data-from-office-365-using-microsoft-graph-api-and-odbc-powerpack-1.png 697w, https://zappysys.com/blog/wp-content/uploads/2019/01/get-data-from-office-365-using-microsoft-graph-api-and-odbc-powerpack-1-281x300.png 281w" sizes="(max-width: 697px) 100vw, 697px" />
</strong></li>
 	<li>Then input <strong>https://graph.microsoft.com/v1.0/me</strong> in the URL field.</li>
 	<li>Select <strong>OAuth</strong> as the <em>Connection Type</em>.</li>
 	<li>Click <strong>Click to Configure</strong> button/link to open OAuth configuration window.</li>
 	<li>Select <strong>Custom</strong> as <em>OAuth Provider</em>.</li>
 	<li>Then input <em>Client Id, Client Secret</em> which we got when created the Graph API application.</li>
 	<li>Set <strong>https://login.microsoftonline.com/common/oauth2/v2.0/authorize</strong> as <em>Authorization Url.</em></li>
 	<li>Set <strong>https://login.microsoftonline.com/common/oauth2/v2.0/token</strong> as <em>Access Token Url</em>.</li>
 	<li>In <em>Scopes / Permissions</em> section set these scopes, separated by a new line. E.g. <strong>offline_access</strong>, <strong>Files.Read.All</strong>, <strong>Calendars</strong>.<strong>Read</strong>, <strong>Notes.Read, User.Read</strong></li>
 	<li>In <em>Advanced </em>tab configure <em>Callback/Redirect Url </em>and set it to the one we configured in Graph API app:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6060" src="https://zappysys.com/blog/wp-content/uploads/2018/12/oauth-callback-return-url-configuration-for-office-365-app-in-odbc-powerpack.png" alt="" width="586" height="271" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/oauth-callback-return-url-configuration-for-office-365-app-in-odbc-powerpack.png 586w, https://zappysys.com/blog/wp-content/uploads/2018/12/oauth-callback-return-url-configuration-for-office-365-app-in-odbc-powerpack-300x139.png 300w" sizes="(max-width: 586px) 100vw, 586px" /></li>
 	<li>Finally, click <strong>Generate Token </strong>button to generate a token.</li>
 	<li>Click <strong>OK</strong> to close the window.</li>
</ol></div>
<h3>Set up an ODBC data source based on ZappySys XML Driver</h3>
<div class="content_block" id="custom_post_widget-6075"><ol>
 	<li>Before adding another data source based on ZappySys XML Driver, copy the connection string of the data source we just created:
<img loading="lazy" decoding="async" class="wp-image-6062 size-full alignnone" style="margin-right: 100px;" src="https://zappysys.com/blog/wp-content/uploads/2018/12/copy-connection-string-of-odbc-datasource-for-office-365-e1547488424263.png" alt="" width="529" height="210" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/copy-connection-string-of-odbc-datasource-for-office-365-e1547488424263.png 529w, https://zappysys.com/blog/wp-content/uploads/2018/12/copy-connection-string-of-odbc-datasource-for-office-365-e1547488424263-300x119.png 300w" sizes="(max-width: 529px) 100vw, 529px" /></li>
 	<li>Close the window and then add a new data source, but this time based on <em>ZappySys XML Driver</em>.</li>
 	<li>Once a window is opened, give it a name, e.g. <strong>System - XML</strong>.</li>
 	<li>Then press <strong>Load connection string</strong> button to load the connection string.</li>
 	<li>Paste the copied connection string and replace JSON text to XML, so that you have <strong>{ ZappySys XML Driver }</strong> in <em>DRIVER</em> property.</li>
 	<li>Close the window.</li>
</ol>
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6184" src="https://zappysys.com/blog/wp-content/uploads/2019/01/load-connection-string-in-odbc-data-source-for-office-365-graph-api-app-1.png" alt="" width="652" height="416" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/load-connection-string-in-odbc-data-source-for-office-365-graph-api-app-1.png 652w, https://zappysys.com/blog/wp-content/uploads/2019/01/load-connection-string-in-odbc-data-source-for-office-365-graph-api-app-1-300x191.png 300w" sizes="(max-width: 652px) 100vw, 652px" /></div>
<h3>Create a Power BI report</h3>
<h4>Reading files from OneDrive (getting Excel data)</h4>
<p>Let&#8217;s say you have Stock.xlsx stored in <em>Sample Documents</em> folder, OneDrive with this kind of data and you want to show it in a Power BI report:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-6081" src="https://zappysys.com/blog/wp-content/uploads/2018/12/stock.xlsx.png" alt="" width="261" height="151" /></p>
<p>To have that data in a Power BI report, perform these steps:</p>
<ol style="margin-left: 0;">
<li>Open Power BI Desktop and create a new Power BI report.</li>
<li>Create a data source based on <strong>System &#8211; JSON</strong> DSN (since we get a JSON response):<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6191" style="border: 1px solid grey;" src="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-office-365-data-2.png" alt="" width="695" height="518" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-office-365-data-2.png 695w, https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-office-365-data-2-300x224.png 300w" sizes="(max-width: 695px) 100vw, 695px" /></li>
<li style="text-align: justify;">Then in <em>SQL statement</em> area enter this query:<br />
<code>SELECT * FROM $<br />
WITH(Src='https://graph.microsoft.com/v1.0/me/drive/root:/<strong>YOUR FOLDER</strong>/Stock.xlsx:/workbook/worksheets/<strong>SHEET NAME</strong>/usedRange'<br />
,Filter='$.values[1:]'<br />
,ArrayTransformType='TransformSimpleTwoDimensionalArray'<br />
,ArrayTransColumnNameFilter='$.values[0][*]'<br />
)<br />
</code>Using <em>WITH</em> clause lets us override the properties. You can generate the query above using the <em>Query Builder</em>:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6189" src="https://zappysys.com/blog/wp-content/uploads/2018/12/use-query-builder-in-odbc-powerpack-to-override-the-properties.png" alt="" width="545" height="297" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/use-query-builder-in-odbc-powerpack-to-override-the-properties.png 545w, https://zappysys.com/blog/wp-content/uploads/2018/12/use-query-builder-in-odbc-powerpack-to-override-the-properties-300x163.png 300w" sizes="(max-width: 545px) 100vw, 545px" />In this step we are overriding Url, Filter and array transformation fields you configured in JSON DSN. The <em>Src</em> value overrides the URL. The <em>Filter</em> property enables us to select the data we want to see in the report. We use <strong>[1:]</strong> in <strong>$.values[1:] </strong>to skip the first row because the first row contains the headers and we want only the data. You can configure this option in the <em>Filter Options</em> tab (<a href="https://goessner.net/articles/JsonPath/" target="_blank" rel="noopener">read more about JSON path</a>).We also have to make the transformation on the JSON and turn JSON arrays into rows. To accomplish that, we override <em>ArrayTransformType. </em>With <em>ArrayTransColumnNameFilter</em> property and <strong>[0][*]</strong> text, we specify that the first array of parent array will be the headers of the columns. You can read more about transformations in <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Parse multi-dimensional JSON array</a> article.<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>Note:</strong> Use <a href="https://developer.microsoft.com/en-us/graph/graph-explorer/" target="_blank" rel="noopener">Microsoft Graph API Explorer</a> to make a call and see what response you get. You can try calling <a href="https://docs.microsoft.com/en-us/graph/onedrive-concept-overview" target="_blank" rel="noopener">other OneDrive endpoints</a>.</div></div></li>
<li>Click <strong>OK</strong>.</li>
<li>Drag a table into the report, select the columns and you should see a similar view:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6087" src="https://zappysys.com/blog/wp-content/uploads/2018/12/get-excel-data-into-power-bi-using-odbc-powerpack-and-microsoft-graph-api-1.png" alt="" width="236" height="216" /></li>
</ol>
<h4>Reading calendar entries</h4>
<p>Now, let&#8217;s say you use a calendar in Office 365 and you want your appointments to be visible in a Power BI report:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6101" src="https://zappysys.com/blog/wp-content/uploads/2018/12/calendar-in-office-365.png" alt="" width="590" height="222" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/calendar-in-office-365.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/12/calendar-in-office-365-300x113.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></p>
<ol>
<li>To start, create a new Power BI report.</li>
<li>Then add a data source based on <strong>System &#8211; JSON </strong>DSN (again, we get the response in JSON):<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6187" src="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-calendar-events-in-office-365-b-1.png" alt="" width="701" height="524" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-calendar-events-in-office-365-b-1.png 701w, https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-calendar-events-in-office-365-b-1-300x224.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></li>
<li style="text-align: justify;">In <em>SQL statement</em> section enter this query:<br />
<code>SELECT * FROM $<br />
WITH(Src='https://graph.microsoft.com/v1.0/me/events?$select=subject,start,end,location'<br />
,Filter='$.value[*]'<br />
,Header='Prefer: outlook.timezone="FLE Standard Time"'<br />
)</code>Here we also are overriding <em>HTTP Header</em> so that we get the event times not in UTC/GMT but for the specified timezone. It must be specified in <strong>Prefer: outlook.timezone=&#8221;{time-zone-string}&#8221;</strong> format (check <a href="https://graph.microsoft.com/v1.0/me/outlook/supportedTimeZones" target="_blank" rel="noopener">an article</a> on how to get a list of supported time zones).<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>Note:</strong> Use <a href="https://developer.microsoft.com/en-us/graph/graph-explorer/" target="_blank" rel="noopener">Microsoft Graph API Explorer</a> to make a call and see what response you get. You can try calling <a href="https://docs.microsoft.com/en-us/graph/outlook-calendar-concept-overview" target="_blank" rel="noopener">other Calendar endpoints</a>.</div></div></li>
<li>Click <strong>OK</strong>.</li>
<li>Drag a table control into the report, select several columns and you should see a similar view:<br />
<img loading="lazy" decoding="async" class="alignnone wp-image-6102 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-calendar-appointments-in-power-bi-report-retrieved-with-odbc-powerpack-e1547658449371.png" alt="" width="490" height="214" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-calendar-appointments-in-power-bi-report-retrieved-with-odbc-powerpack-e1547658449371.png 490w, https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-calendar-appointments-in-power-bi-report-retrieved-with-odbc-powerpack-e1547658449371-300x131.png 300w" sizes="(max-width: 490px) 100vw, 490px" /></li>
</ol>
<h4>Reading notes from OneNote</h4>
<p>Suppose, you have these notes in OneNote and you want &#8220;<em>Groceries list</em>&#8221; to be shown in a Power BI report:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-6114" src="https://zappysys.com/blog/wp-content/uploads/2018/12/notes-in-onenote.png" alt="" width="516" height="189" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/notes-in-onenote.png 516w, https://zappysys.com/blog/wp-content/uploads/2018/12/notes-in-onenote-300x110.png 300w" sizes="(max-width: 516px) 100vw, 516px" /></p>
<ol>
<li>First, we will need to find NOTE ID we are trying to get. To do that, open <em>ODBC Administrator</em>, find <strong>System &#8211; JSON</strong> data source and hit <strong>Configure</strong>.</li>
<li>Then go to <em>the Preview</em> tab, and input this SQL query and hit <strong>Preview Data</strong>:<br />
<code>SELECT * FROM $<br />
WITH (Src='https://graph.microsoft.com/v1.0/me/onenote/pages'<br />
,Filter='$.value[*]'<br />
)</code></li>
<li>Once you get a result set, find your note name and copy its ID:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6192" src="https://zappysys.com/blog/wp-content/uploads/2018/12/using-odbc-powerpack-get-note-id-in-onenote-part-of-office-365-1.png" alt="" width="676" height="593" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/using-odbc-powerpack-get-note-id-in-onenote-part-of-office-365-1.png 676w, https://zappysys.com/blog/wp-content/uploads/2018/12/using-odbc-powerpack-get-note-id-in-onenote-part-of-office-365-1-300x263.png 300w" sizes="(max-width: 676px) 100vw, 676px" /></li>
<li>Then create a new Power BI report.</li>
<li>Create a new data source based on <strong>System &#8211; XML</strong> DSN (we are using XML-based DSN because the response will be in HTML):<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6193" src="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-onenote-notes-in-office-365-1.png" alt="" width="701" height="524" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-onenote-notes-in-office-365-1.png 701w, https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-onenote-notes-in-office-365-1-300x224.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></li>
<li>In <em>SQL statement</em> section enter this query (use the NOTE ID you retrieved in the previous step):<br />
<code>SELECT * FROM $<br />
WITH(ElementsToTreatAsArray='div,p'<br />
,Src='https://graph.microsoft.com/v1.0/me/onenote/pages/<strong>NOTE ID</strong>/content'<br />
,Filter='$.html.body.div[0].p[1:]'<br />
)<br />
</code><br />
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>Note:</strong> Use <a href="https://developer.microsoft.com/en-us/graph/graph-explorer/" target="_blank" rel="noopener">Microsoft Graph API Explorer</a> to make a call and see what response you get. You can try calling <a href="https://docs.microsoft.com/en-us/graph/integrate-with-onenote" target="_blank" rel="noopener">other OneNote endpoints</a>.</div></div></li>
<li style="text-align: justify;">Click <strong>OK</strong>.</li>
<li>Drag and drop <em>Multi-row card</em> visual, select <strong>#text</strong> column and you should see a similar view:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6145" src="https://zappysys.com/blog/wp-content/uploads/2018/12/note-to-buy.png" alt="" width="288" height="288" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/note-to-buy.png 288w, https://zappysys.com/blog/wp-content/uploads/2018/12/note-to-buy-150x150.png 150w" sizes="(max-width: 288px) 100vw, 288px" /></li>
<li>We finished! Now you can publish your Power BI reports to Power BI service.</li>
</ol>
<div class="content_block" id="custom_post_widget-5891"><h2>Working with Gateways in Power BI (Schedule Import)</h2>
If the data needs to be updated, it is necessary to create a gateway on-premises. In this new section, we will install a Power BI Gateway and in the next section schedule it to update the REST API information.
<ol>
 	<li>In the last section, we Published the report. Power BI may ask you to <strong>SIGN IN.</strong>
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/sign-in-power-bi.png"><img loading="lazy" decoding="async" class="size-full wp-image-2879" src="https://zappysys.com/blog/wp-content/uploads/2018/03/sign-in-power-bi.png" alt="Sign in Power BI" width="762" height="361" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/sign-in-power-bi.png 762w, https://zappysys.com/blog/wp-content/uploads/2018/03/sign-in-power-bi-300x142.png 300w" sizes="(max-width: 762px) 100vw, 762px" /></a>
<p class="wp-caption-text">Sign in in Power BI</p>

</div></li>
 	<li>Select the Workspace and select Datasets
<div class="wp-caption">

[caption id="attachment_10110" align="alignnone" width="702"]<a href="https://zappysys.com/blog/wp-content/uploads/2019/01/power-bi-my-workspace-dataset.png"><img loading="lazy" decoding="async" class="wp-image-10110 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/power-bi-my-workspace-dataset.png" alt="power-bi-my-workspace-dataset" width="702" height="372" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/power-bi-my-workspace-dataset.png 702w, https://zappysys.com/blog/wp-content/uploads/2019/01/power-bi-my-workspace-dataset-300x159.png 300w" sizes="(max-width: 702px) 100vw, 702px" /></a> Go to workspace and dataset[/caption]
<p class="wp-caption-text">Go to workspace and dataset</p>

</div></li>
 	<li>Right-click the report and select <strong>Settings</strong>.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/report-power-bi-settings.png"><img loading="lazy" decoding="async" class="size-full wp-image-2877" src="https://zappysys.com/blog/wp-content/uploads/2018/03/report-power-bi-settings.png" alt="Define settings for Power BI report" width="535" height="325" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/report-power-bi-settings.png 535w, https://zappysys.com/blog/wp-content/uploads/2018/03/report-power-bi-settings-300x182.png 300w" sizes="(max-width: 535px) 100vw, 535px" /></a>
<p class="wp-caption-text">Specify settings for the report</p>

</div></li>
 	<li>The system will ask for a Gateway. Stay here.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway.png"><img loading="lazy" decoding="async" class="size-full wp-image-2862" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway.png" alt="add power bi gateway" width="1068" height="380" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway.png 1068w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway-300x107.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway-768x273.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway-1024x364.png 1024w" sizes="(max-width: 1068px) 100vw, 1068px" /></a>
<p class="wp-caption-text">Add Power BI Gateway</p>

</div></li>
 	<li>Use the following link to install a Data Gateway:
<pre class="lang:php highlight:0 decode:true">https://docs.microsoft.com/en-us/power-bi/service-gateway-onprem</pre>
</li>
 	<li>Run the installer and press <strong>Next</strong>
<div class="wp-caption">

<img loading="lazy" decoding="async" class="size-full wp-image-2888" src="https://zappysys.com/blog/wp-content/uploads/2018/03/on-premises-gateway-installer-PB.png" alt="Initial gateway window for installation" width="634" height="504" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/on-premises-gateway-installer-PB.png 634w, https://zappysys.com/blog/wp-content/uploads/2018/03/on-premises-gateway-installer-PB-300x238.png 300w" sizes="(max-width: 634px) 100vw, 634px" />
<p class="wp-caption-text">Gateway installer</p>

</div></li>
 	<li>Select the option On-premises data gateway (recommended). This option allows access to multiple users and can be used by more applications than Power BI.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-power-bi-on-premises-data-pb.png"><img loading="lazy" decoding="async" class="size-full wp-image-2889" src="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-power-bi-on-premises-data-pb.png" alt="Choose Power BI gateway" width="631" height="501" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-power-bi-on-premises-data-pb.png 631w, https://zappysys.com/blog/wp-content/uploads/2018/03/choose-power-bi-on-premises-data-pb-300x238.png 300w" sizes="(max-width: 631px) 100vw, 631px" /></a>
<p class="wp-caption-text">Choose Power BI option</p>

</div></li>
 	<li>The installer will show a warning message.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-warning-PB-msg.png"><img loading="lazy" decoding="async" class="size-full wp-image-2891" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-warning-PB-msg.png" alt="Warning message gateway installation" width="628" height="447" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-warning-PB-msg.png 628w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-warning-PB-msg-300x214.png 300w" sizes="(max-width: 628px) 100vw, 628px" /></a>
<p class="wp-caption-text">Warning message during installation</p>

</div></li>
 	<li>Select the path to install and check the I accept the terms.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-accept.png"><img loading="lazy" decoding="async" class="size-full wp-image-2916" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-accept.png" alt="accept terms" width="636" height="441" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-accept.png 636w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-accept-300x208.png 300w" sizes="(max-width: 636px) 100vw, 636px" /></a>
<p class="wp-caption-text">Accept terms</p>

</div></li>
 	<li>Specify the email address to use the gateway.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-email-address.png"><img loading="lazy" decoding="async" class="size-full wp-image-2895" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-email-address.png" alt="Register email in gateway installation" width="627" height="578" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-email-address.png 627w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-email-address-300x277.png 300w" sizes="(max-width: 627px) 100vw, 627px" /></a>
<p class="wp-caption-text">Register email address</p>

</div></li>
 	<li>After entering the email, write the gateway name and a recovery key. Make sure to confirm the recovery key.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-name-recovery-key-confirm.png"><img loading="lazy" decoding="async" class="size-full wp-image-2896" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-name-recovery-key-confirm.png" alt="Specify name and recovery key" width="629" height="487" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-name-recovery-key-confirm.png 629w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-name-recovery-key-confirm-300x232.png 300w" sizes="(max-width: 629px) 100vw, 629px" /></a>
<p class="wp-caption-text">Enter recovery key</p>

</div></li>
</ol>
&nbsp;</div>
<div class="content_block" id="custom_post_widget-5892"><h2>Manage gateways and configure the schedule</h2>
Once that the gateway is installed we will configure it and add the connection strings.
<ol>
 	<li>The next step is to go to manage gateway
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway.png"><img loading="lazy" decoding="async" class="size-full wp-image-2912" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway.png" alt="Power BI - Manage Gateway Setting" width="1068" height="380" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway.png 1068w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway-300x107.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway-768x273.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway-1024x364.png 1024w" sizes="(max-width: 1068px) 100vw, 1068px" /></a>
<p class="wp-caption-text">Power BI - Manage Gateway Setting</p>

</div></li>
 	<li>In order to get the connection string, we will need the connection string of the ZappySys JSON Driver. In the first section of this post, we explained how to configure it. Press<strong> Copy Connection String</strong>
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-data-source-copy-connection-string.png"><img loading="lazy" decoding="async" class="size-full wp-image-2866" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-data-source-copy-connection-string.png" alt="ZappySys connection properties" width="607" height="599" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-data-source-copy-connection-string.png 607w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-data-source-copy-connection-string-300x296.png 300w" sizes="(max-width: 607px) 100vw, 607px" /></a>
<p class="wp-caption-text">Connection properties</p>

</div></li>
 	<li>Once that the data is copied, add a New data Source. In <strong>Data Source Name</strong>, enter the Data Source Name of the ZappySys JSON driver in step 13 and in Data Source Type, select ODBC. In connection string copy and paste from the clipboard of the step 13 and press <strong>Add</strong>.
<div class="wp-caption">

[caption id="attachment_10113" align="alignnone" width="720"]<a href="https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string.png"><img loading="lazy" decoding="async" class="wp-image-10113 size-large" src="https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string-1024x536.png" alt="gateway-data-source-name-connection-string" width="720" height="377" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string-1024x536.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string-300x157.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string-768x402.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string.png 1043w" sizes="(max-width: 720px) 100vw, 720px" /></a> ZappySys connection properties in Power BI[/caption]
<p class="wp-caption-text">ZappySys connection properties in Power BI</p>

</div></li>
 	<li>Once added the gateway. You can see the schedule refresh to <strong>On </strong>and Add another time to add the time where you want to refresh the data.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-schedule.png"><img loading="lazy" decoding="async" class="size-full wp-image-2875" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-schedule.png" alt="Schedule gateway" width="451" height="401" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-schedule.png 451w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-schedule-300x267.png 300w" sizes="(max-width: 451px) 100vw, 451px" /></a>
<p class="wp-caption-text">Schedule gateway</p>

</div></li>
</ol>
&nbsp;</div>
<h2>Conclusion</h2>
<p style="text-align: justify;">Today we learned how to call Microsoft Graph API methods using <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> and load response data into Power BI without any ETL procedures. Particularly, we used OneDrive, Calendar and OneNote Graph API endpoints to achieve that. We created two ODBC data sources based on JSON and XML ODBC Driver to query those endpoints, which let us read data directly in a Power BI report. Finally, we examined how to refresh data source on Power BI using on-premises Power BI gateway.</p>
<h2>References</h2>
<p><a href="https://powerbi.microsoft.com/en-us/" target="_blank" rel="noopener">https://powerbi.microsoft.com/en-us/</a></p>
<p><a href="https://apps.dev.microsoft.com/" target="_blank" rel="noopener">https://apps.dev.microsoft.com/</a></p>
<p><a href="https://developer.microsoft.com/en-us/graph/graph-explorer/" target="_blank" rel="noopener">https://developer.microsoft.com/en-us/graph/graph-explorer/</a></p>
<p><a href="https://docs.microsoft.com/en-us/graph/overview" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/graph/overview</a></p>
<p><a href="https://docs.microsoft.com/en-us/graph/onedrive-concept-overview" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/graph/onedrive-concept-overview</a></p>
<p><a href="https://docs.microsoft.com/en-us/graph/outlook-calendar-concept-overview" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/graph/outlook-calendar-concept-overview</a></p>
<p><a href="https://docs.microsoft.com/en-us/graph/integrate-with-onenote" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/graph/integrate-with-onenote</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/get-office-365-data-in-power-bi-using-microsoft-graph-api-and-odbc/">Get Office 365 data in Power BI using Microsoft Graph API and ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Tableau Parameters &#8211; Fix Metadata / Dynamic SQL Columns Issue</title>
		<link>https://zappysys.com/blog/create-csv-list-sql-server-table-columns-datatypes/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 05 Nov 2018 17:17:42 +0000</pubDate>
				<category><![CDATA[Reporting - Tableau]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5304</guid>

					<description><![CDATA[<p>Introduction Many time you have to use Dynamic SQL in your Stored Procedure but some tools (e.g. Tableau) may reject it because metadata is not returned when sp_describe_first_result_set is called in SQL Prepare phase. You may see error like below in that case. &#160; &#160; Metadata Prepare Call [crayon-69b7f8b4cbf85320537771/] Error due to Dynamic SQL Msg [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/create-csv-list-sql-server-table-columns-datatypes/">Tableau Parameters &#8211; Fix Metadata / Dynamic SQL Columns Issue</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/tableau-integration-logo.png"><img loading="lazy" decoding="async" class=" wp-image-4374 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/06/tableau-integration-logo.png" alt="" width="97" height="97" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/tableau-integration-logo.png 376w, https://zappysys.com/blog/wp-content/uploads/2018/06/tableau-integration-logo-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/06/tableau-integration-logo-300x300.png 300w" sizes="(max-width: 97px) 100vw, 97px" /></a>Many time you have to use Dynamic SQL in your Stored Procedure but some tools (e.g. <a href="https://zappysys.com/blog/tag/tableau/" target="_blank" rel="noopener">Tableau</a>) may reject it because metadata is not returned when sp_describe_first_result_set is called in SQL Prepare phase. You may see error like below in that case.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Metadata Prepare Call</strong></p><pre class="crayon-plain-tag">exec sp_describe_first_result_set N'EXEC [dbo].[usp_GetInvoicesByCountry] @country=''Germany'''</pre><p>
<strong>Error due to Dynamic SQL</strong></p>
<p><span style="color: #ff0000;"><code>Msg 11514, Level 16, State 1, Procedure sp_describe_first_result_set, Line 1 [Batch Start Line 29]</code></span><br />
<code><span style="color: #ff0000;">The metadata could not be determined because statement 'EXECUTE (@sqlFull)' in procedure 'usp_GetInvoicesByCountry' contains dynamic SQL. Consider using the WITH RESULT SETS clause to explicitly describe the result set.</span></code></p>
<p>Here is example Stored Procedure which may throw above error. We will re-write same stored proc in later section.</p>
<h2><strong>Example of Dynamic SQL in Stored Procedure</strong></h2>
<pre class="crayon-plain-tag">--DROP PROC dbo.usp_GetInvoicesByCountry
--GO
/*
Purpose: Parameterize REST API call via SQL. Call ZappySys Drivers inside SQL Server.
*/
CREATE PROC dbo.usp_GetInvoicesByCountry
	@country varchar(100) 
AS 

DECLARE @sql varchar(max)
--//Escape single ticks carefully
SET @sql =  'SELECT OrderID,CustomerID,Country,Quantity FROM $
WITH (Src=''https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json&amp;filter=Country eq '+ @country +'''
	 ,Filter=''$.value[*]''
	 ,DataFormat=''OData''
)'

DECLARE @sqlFull varchar(max)
SET @sqlFull='SELECT * FROM OPENQUERY( LS , ''' + REPLACE( @sql, '''', '''''' ) + ''' )'
PRINT @sqlFull --//For DEBUG purpose
EXECUTE (@sqlFull)

GO
-- Example call
EXEC dbo.usp_GetInvoicesByCountry @country='Germany'</pre>
&nbsp;</p>
<h2><strong>How to Fix Metadata error for Dynamic SQL</strong></h2>
<p>To fix metadata error due to dynamic SQL you have add <a href="https://docs.microsoft.com/en-us/sql/t-sql/language-elements/execute-transact-sql?view=sql-server-2017" target="_blank" rel="noopener">WITH RESULT SETS</a> statement after EXECUTE call. This feature was added in SQL 2012 and later. There are two ways to describe Stored Procedure / using Dynamic SQL</p>
<h3>Method-1</h3>
<p>Add  <a href="https://docs.microsoft.com/en-us/sql/t-sql/language-elements/execute-transact-sql?view=sql-server-2017" target="_blank" rel="noopener">WITH RESULT SETS</a> clause inside Stored Proc if you are using EXECUTE or sp_Executesql like below.</p><pre class="crayon-plain-tag">--DROP PROC dbo.usp_GetInvoicesByCountry
--GO
/*
Purpose: Parameterize REST API call via SQL. Call ZappySys Drivers inside SQL Server.
*/
ALTER PROC dbo.usp_GetInvoicesByCountry
	@country varchar(100) 
AS 

DECLARE @sql varchar(max)
--//Escape single ticks carefully
SET @sql =  'SELECT OrderID,CustomerID,Country,Quantity FROM $
WITH (Src=''https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json&amp;filter=Country eq '+ @country +'''
	 ,Filter=''$.value[*]''
	 ,DataFormat=''OData''
)'

DECLARE @sqlFull varchar(max)
SET @sqlFull='SELECT * FROM OPENQUERY( LS , ''' + REPLACE( @sql, '''', '''''' ) + ''' )'
PRINT @sqlFull --//For DEBUG purpose

EXECUTE (@sqlFull)
WITH RESULT SETS
(
	(OrderID int,CustomerID varchar(100),Country varchar(100),Quantity int) --//describe first result
)
GO</pre><p>
&nbsp;</p>
<h3>Method-2</h3>
<p>Another way to describe resultset is add WITH RESULT SETS statement right after you call Stored proc each time from any client tool (see below). This way you don&#8217;t have to touch Source stored Proc. First method is still preferred way.</p><pre class="crayon-plain-tag">EXEC [dbo].[usp_GetInvoicesByCountry] @country='Germany' WITH RESULT SETS ( (OrderID int,CustomerID varchar(100),Country varchar(100),Quantity int))</pre><p>
<h2>How to generate column names and field datatypes for WITH RESULT SETS</h2>
<p>If you have many columns to describe then it becomes tedious to type 200 columns by hand. Lets see how to make it simple.</p>
<ol>
<li>First step is you need to load your result into some static table.<br />
<pre class="crayon-plain-tag">SELECT * INTO _tmp FROM ( some sub query ) t</pre>
</li>
<li>Once you have data we can use it few ways to get datatypes. Lets create a view to query metadata<br />
<pre class="crayon-plain-tag">CREATE VIEW dbo.vwDataTypes
AS
SELECT 
   c.name as ColumnName,
   t.name +
   CASE WHEN t.name IN ('char', 'varchar','nchar','nvarchar') THEN '('+
             CASE WHEN c.max_length=-1 THEN 'MAX'
                  ELSE CONVERT(VARCHAR(4),
                               CASE WHEN t.name IN ('nchar','nvarchar')
                               THEN  c.max_length/2 ELSE c.max_length END )
                  END +')'
          WHEN t.name IN ('decimal','numeric')
                  THEN '('+ CONVERT(VARCHAR(4),c.precision)+','
                          + CONVERT(VARCHAR(4),c.Scale)+')'
                  ELSE '' END
	      as FriendlyDataType,
   t.name as DataType,
   c.[object_id] as [TblObjectId],
   c.max_length MaxLengthBytes,
   c.precision as [Precision],
   c.scale  as [Scale],
   c.is_nullable as IsNullable,
   ISNULL(i.is_primary_key, 0) as IsPrimaryKey
FROM    
   sys.columns c
INNER JOIN 
   sys.types t ON c.user_type_id = t.user_type_id
LEFT OUTER JOIN 
   sys.index_columns ic ON ic.object_id = c.object_id AND ic.column_id = c.column_id
LEFT OUTER JOIN 
   sys.indexes i ON ic.object_id = i.object_id AND ic.index_id = i.index_id
--WHERE    c.object_id = OBJECT_ID('_tmp')
go</pre>
</li>
<li>Now you can write below query to generate Comma separated list of columns names and datatypes<br />
<pre class="crayon-plain-tag">DECLARE @csv VARCHAR(MAX)
SELECT @csv = COALESCE(@csv+', ' ,'') + '[' + ColumnName + '] ' + FriendlyDataType
FROM vwDataTypes WHERE [TblObjectId]= OBJECT_ID('_tmp')
SELECT @csv</pre>
<strong>Example : </strong><br />
<pre class="crayon-plain-tag">[CustomerID] nvarchar(10), [CustomerName] nvarchar(68), .........&nbsp;[Freight] nvarchar(16)</pre>
</li>
<li>Use result of above query and paste in WITH RESULT SETS as below<br />
<pre class="crayon-plain-tag">EXECUTE( @sqlFull )
WITH RESULT SETS
(
&nbsp; (&nbsp; your-comma-separated-list-goes-here )
)</pre>
</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/create-csv-list-sql-server-table-columns-datatypes/">Tableau Parameters &#8211; Fix Metadata / Dynamic SQL Columns Issue</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Import REST API in Tableau &#8211; Read JSON, SOAP XML, CSV</title>
		<link>https://zappysys.com/blog/import-rest-api-tableau-read-json-soap-xml-csv/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sun, 04 Nov 2018 22:52:06 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[Reporting - Tableau]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[tableau]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5277</guid>

					<description><![CDATA[<p>Introduction Tableau is one of the most popular Reporting / Visualization tool for BI / Data analytics. It comes with many out-of the box connectors to pull data from some popular data sources but still it seriously lakes capability to consume data from millions of other REST / SOAP data sources out there for which [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-rest-api-tableau-read-json-soap-xml-csv/">Import REST API in Tableau &#8211; Read JSON, SOAP XML, CSV</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/tableau-integration-logo.png"><img loading="lazy" decoding="async" class="wp-image-4374 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/06/tableau-integration-logo.png" alt="" width="122" height="122" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/tableau-integration-logo.png 376w, https://zappysys.com/blog/wp-content/uploads/2018/06/tableau-integration-logo-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/06/tableau-integration-logo-300x300.png 300w" sizes="(max-width: 122px) 100vw, 122px" /></a>Tableau is one of the most popular Reporting / Visualization tool for BI / Data analytics. It comes with many out-of the box connectors to pull data from some popular data sources but still it seriously lakes capability to consume data from millions of other REST / SOAP data sources out there for which Tableau not going to create native connectors.</p>
<p>In this article we will cover how to import REST API in Tableau, We will also look at various examples to read from Files or any JSON / XML SOAP / CSV API in few clicks. We will use <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys API Drivers</a> to read data from Web API or Local XML / JSON / CSV Files without doing any coding or ETL.</p>
<p>ZappySys API drivers are most advanced API drivers available in the market with many options to connect to virtually any REST / SOAP API data source. For demo purpose we will load ODATA API (JSON Format) using <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ZappySys JSON Driver</a>. Concepts / steps listed in this articles are mostly same for other type of API formats too (e.g. XML API or CSV API).</p>
<h2>Requirements</h2>
<p>Before we get started for step by step tutorial, make sure following requirements are met.</p>
<ol>
<li>You have installed Tableau Desktop</li>
<li>Make sure SQL Server Instance is installed somewhere. We will use Linked Server to access REST API. You can <a href="https://www.microsoft.com/en-us/sql-server/sql-server-editions-express" target="_blank" rel="noopener">download FREE SQL Express Version</a> (DB Server) and <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017" target="_blank" rel="noopener">SSMS from here</a> (Client).</li>
<li>Download and Install <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack (API Drivers)</a> &#8211; These drivers must be installed on <strong>Windows Machine (Can be different than Tableau Desktop / Server)</strong></li>
</ol>
<h2>Step By Step &#8211; Loading REST API data in Tableau</h2>
<p>Now let&#8217;s get started. To load REST API data in Tableau using ZappySys drivers basically there are two approaches.</p>
<p><strong>Approach#1</strong> You can use direct ODBC Connection to call ZappySys Drivers<br />
<strong>Approach#2</strong> Use SQL Server Connection in Tableau to send ZappySys Driver queries to <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">ZappySys Data Gateway</a> (using Linked Server OPENQUERY).</p>
<p><span style="text-decoration: underline;"><span style="color: #339966; text-decoration: underline;">We recommend Approach#2</span></span> for any ZappySys driver use case in Tableau.  Now you must be wondering why use approach#2 and not #1 ? Tableau doesn&#8217;t play well when it comes to 3rd party ODBC drivers because behind the scene Tableau generate complex SQL statements which may not be supported by ODBC driver its trying to call (e.g. JOIN Syntax, CAST functions, Sub queries). See some issues like <a href="https://community.tableau.com/thread/184557" target="_blank" rel="noopener">this</a> and <a href="https://community.tableau.com/thread/263938" target="_blank" rel="noopener">this one</a>.  So if we use SQL Server to wrap those complex queries then it becomes much simpler because Tableau has very good support for SQL Server compared to 3rd party ODBC Drivers.</p>
<p>To access REST API in tableau using SQL Server Connection, you have to perform the following high level steps.</p>
<ol>
<li>Make sure you have access to Microsoft SQL Server instance. If you don&#8217;t have one you can always use lightweight <a href="https://www.microsoft.com/en-us/sql-server/sql-server-editions-express" target="_blank" rel="noopener">FREE SQL Express Edition (Download)</a>. This is free for Production use too.</li>
<li>Install <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack (API Drivers)</a></li>
<li>Configure <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">ZappySys Data Gateway</a> (Create API connection) &#8211; We will see in depth, later in this article.</li>
<li>Create Linked Server in Microsoft SQL Server and connect to ZappySys Data Gateway</li>
<li>Import API data in Tableau using Microsoft SQL Server Connector by calling Linked Server SQL Queries</li>
</ol>
<p>Assuming you have already done first step lets get started with remaining steps. You can also read this article for other example of <a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">calling SQL Server Queries via ZappySys Data Gateway</a>.</p>
<h3>Configure ZappySys Data Gateway</h3>
<div class="content_block" id="custom_post_widget-5282">Now let's look at how to configure <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">ZappySys Data Gateway</a>. This feature acts as a bridge between Client App and ZappySys Drivers. Using data gateway you can use ZappySys Drivers inside applications / operating systems where ZappySys drivers may not be available directly for some reason (e.g. You don't have access to Server for Installation or System does not support ODBC drivers like JAVA programs). <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-gateway/">Click here to read more</a> on various use cases of Data Gateway.
<h4><span style="font-size: 14pt;">Configure Data Gateway User / Port</span></h4>
Now let's look at steps to configure Data Gateway after installation. We will also create a sample data source for ODATA API (i.e. JSON based REST API Service).
<ol>
 	<li>Assuming you have installed <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> using default options (Which also enables Data Gateway Service)</li>
 	<li>Search "Gateway" in your start menu and click ZappySys Data Gateway
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" alt="Open ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Open ZappySys Data Gateway</p>

</div></li>
 	<li>First make sure Gateway Service is running (Verify Start icon is disabled)</li>
 	<li>Also verify Port on General Tab
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-1.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-1.png" alt="Port Number setting on ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Port Number setting on ZappySys Data Gateway</p>

</div></li>
 	<li>Now go to Users tab. <strong>Click Add</strong> icon to add a new user. Check Is admin to give access to all data sources you add in future. If you don't check admin then you have to manually configure user permission for each data source.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-2.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-2.png" alt="Add Data Gateway User" /></a>
<p class="wp-caption-text">Add Data Gateway User</p>

</div></li>
</ol>
&nbsp;
<h4><span style="font-size: 14pt;">Configure Data Source</span></h4>
<ol>
 	<li>After user is added, go to Data Sources tab. <strong>Click Add</strong> icon to create new data source. Select appropriate driver based on your API / File format. You can choose Generic ODBC option to read data from ODBC DSN or use Native Driver option.
<pre class=""><strong>NOTE:</strong> Whenever possible use native driver option for better performance / security and ease of use.</pre>
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-3.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-3.png" alt="Add Gateway Data Source (Native JSON Driver)" /></a>
<p class="wp-caption-text">Add Gateway Data Source (Native JSON Driver)</p>

</div></li>
 	<li>Click on "Edit" under Data source and configure as per your need (e.g. Url, Connection, Request Method, Content Type, Body, Pagination etc.). For this demo we are going to pick simple JSON REST API which doesn't need any authentication.  Enter following URL.
<pre class="">https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json</pre>
</li>
 	<li>You can also view response structure and select default hierarchy (i.e. Filter) like below (Select Array Icon) for data extraction.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-4.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-4.png" alt="Configure JSON API Data source" /></a>
<p class="wp-caption-text">Configure JSON API Data source</p>

</div></li>
</ol>
<h4><span style="font-size: 14pt;">Test SQL Query / Preview Data</span></h4>
<ol>
 	<li>Now go to Preview Tab. You can click Preview button to execute default query
OR
Select Table name from dropdown to generate SQL with column names.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-5.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-5.png" alt="JSON / REST API Driver Query Preview / Query Examples (Read REST API or JSON Files)" /></a>
<p class="wp-caption-text">JSON / REST API Driver Query Preview / Query Examples (Read REST API or JSON Files)</p>

</div></li>
 	<li>You can also click Query Builder to generate SQL using different options in WITH clause. ANy setting you specify in WITH clause will override UI settings we applied in previous steps.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-6.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-6.png" alt="Using SQL Query Builder (For Files or REST / SOAP API - JSON / XML / CSV Format)" /></a>
<p class="wp-caption-text">Using SQL Query Builder (For Files or REST / SOAP API - JSON / XML / CSV Format)</p>

</div></li>
 	<li>There is another useful option for code generation. Select your Language and quickly copy code snippet. See below Example of XML Driver Query to call SOAP API.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-7.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc-configure-data-gateway-json-7.png" alt="Generate Example Code for ZappySys Driver" /></a>
<p class="wp-caption-text">Generate Example Code for ZappySys Driver</p>

</div></li>
 	<li><strong>Click OK</strong> to Close Data Source UI</li>
 	<li>Once data source is tested and configured you can <strong>click Save </strong>button in the Gateway UI toolbar and click <strong>Yes</strong> for <strong>Restart Service</strong>.</li>
</ol>
&nbsp;</div>
<h3>Create Linked Server in SQL Server</h3>
<p>Once REST API Data source is configured in ZappySys Data Gateway, we can move forward to creating Linked Server part. At this point, you must be wondering why I have to use SQL Server to call ZappySys ODBC Driver? Why can&#8217;t I directly use ZappySys ODBC Driver in Tableau?</p>
<p>Technically, you can use <a href="https://onlinehelp.tableau.com/current/pro/desktop/en-us/examples_otherdatabases.htm">Generic ODBC Connector in Tableau</a> to call ZappySys ODBC Drivers for JSON API / XML API or CSV API but there are many problems with it.</p>
<p>Tableau Generic ODBC Connection option generates many <a href="https://community.tableau.com/thread/227646">unsupported SQL Syntax</a> (e.g. Temp tables, Subqueries, date functions) which may not be supported by most non-relational ODBC drivers (e.g. ZappySys API drivers). Using SQL Server Linked Server we can bridge between ZappySys Drivers and Tableau to access any REST API. So let&#8217;s see how to do this.</p>
<div class="content_block" id="custom_post_widget-5289">Once you configured data source in Gateway, we can now setup Linked Server in SQL Server to query API data.
<ol style="margin-left: 10px;">
 	<li>Assuming you have installed SQL Server and SSMS. If not then get both for FREE from here: <a href="https://www.microsoft.com/en-us/sql-server/sql-server-editions-express">Get SQL Server Express</a> and  <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms" target="_blank" rel="noopener">Get SSMS</a></li>
 	<li>Open SSMS and connect to SQL Server.</li>
 	<li>Go to Root &gt; Server Objects &gt; Linked Servers node. Right click and click <strong>New Linked Server...
</strong>
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png" alt="Add Linked Server in SQL Server" />
</a>
<p class="wp-caption-text">Add Linked Server in SQL Server</p>

</div></li>
 	<li> Now enter linked server name, select Provider as SQL Native Client</li>
 	<li>Enter data source as <strong><span class="lang:default decode:true crayon-inline">GatewayServerName,PORT_NUMBER</span></strong> where server name is where ZappySys Gateway is running (Can be same as SQL Server machine or remote machine). Default PORT_NUMBER is 5000 but confirm on Data gateway &gt; General tab incase its different.</li>
 	<li>Enter Catalog Name. This must match name from Data gateway Data sources grid &gt; Name column
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/ssms-sql-server-configure-linked-server-2.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/ssms-sql-server-configure-linked-server-2.png" alt="Configure Linked Server Provider, Catalog, Server, Port for ZappySys Data Gateway Connection" />
</a>
<p class="wp-caption-text">Configure Linked Server Provider, Catalog, Server, Port for ZappySys Data Gateway Connection</p>
</div>
<div style="color: #31708f;background-color: #d9edf7;border-color: #bce8f1;padding: 15px;margin-bottom: 20px;border: 1px solid transparent;border-radius: 4px;">
<strong>INFO:</strong><br/>
<ul>
    <li>
      For <strong>SQL Server 2012, 2014, 2016, 2017, and 2019</strong>, use the <em>SQL Server Native Client 11.0</em> as the Provider.
    </li>
    <li>
      For <strong>SQL Server 2022 or higher</strong>, use the <em>Microsoft OLE DB Driver for SQL Server</em> as the Provider.
    </li>
  </ul>
</div></li>
 	<li>Click on Security Tab and select last option "<strong>Be made using this security context</strong>". Enter your gateway user account here.</li>
<li>
        <p>Optional: Under the Server Options Tab, Enable <b>RPC</b> and <b>RPC Out</b> and Disable Promotion of Distributed Transactions<b>(MSDTC)</b>.</p>
		<div class="wp-caption alignnone">
			<img decoding="async" class="block margin-bottom-10 img-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/11/linked-server-options-rpc-msdtc.png" title="RPC and MSDTC Settings" alt="RPC and MSDTC Settings" />
			<p class="wp-caption-text">RPC and MSDTC Settings</p>
		</div>
        <hr />
        <p>
            You need to enable RPC Out if you plan to use <b><i>EXEC(...) AT [MY_LINKED_SERVER_NAME]</i></b> rather than OPENQUERY.
            <br />
            If don't enabled it, you will encounter the <i>'Server "MY_LINKED_SERVER_NAME" is not configured for RPC'</i> error.
        </p>
        <p>
            Query Example:
            <code class="sql">EXEC('Select * from Products') AT [MY_LINKED_SERVER_NAME]</code>
        </p>
        <hr />
        <p>
            If you plan to use <b><i>'INSERT INTO...EXEC(....) AT [MY_LINKED_SERVER_NAME]'</i></b> in that case you need to Disable Promotion of Distributed Transactions(MSDTC).
            <br />
            If don't disabled it, you will encounter the <i>'The operation could not be performed because OLE DB provider "SQLNCLI11/MSOLEDBSQL" for linked server "MY_LINKED_SERVER_NAME" was unable to begin a distributed transaction.'</i> error.
        </p>
        <p>
            Query Example:
<pre class="">Insert Into dbo.Products 
EXEC('Select * from Products') AT [MY_LINKED_SERVER_NAME]</pre>
        </p>
        <hr />
</li>
 	<li>Click OK to save Linked Server</li>
 	<li>In SSMS execute below SQL query to test your connectivity.
<pre class="">SELECT * FROM OPENQUERY( MY_LINKED_SERVER_NAME, 'SELECT * FROM $')</pre>
--OR--
<pre class="">SELECT * FROM OPENQUERY( MY_LINKED_SERVER_NAME, 
'SELECT * FROM $
 WITH (Src=''https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json''
 ,Filter=''$.value[*]''
 ,DataFormat=''OData''
)');</pre>
</li>
 	<li>Here is the preview after you run some REST API query in SQL Server. Notice that you can override default configuration by supplying <a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/json-odbc-driver-connectionstring.htm" target="_blank" rel="noopener">many parameters</a> in WITH clause (second query example in screenshot).
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway.png" alt="SSMS Output - Query REST API via Linked Server OPENQUERY statement (Connect to ZappySys Data Gateway)" />
</a>
<p class="wp-caption-text">SSMS Output - Query REST API via Linked Server OPENQUERY statement (Connect to ZappySys Data Gateway)</p>

</div></li>
 	<li>You can wrap your queries inside View or wrap inside Stored procedure to parameterize. Here is an example of create view which calls REST API queries. Below View can be consumed like a normal table from any Tools or Programming Language which supports connectivity to SQL Server.
<pre class="lang:tsql decode:true ">CREATE VIEW dbo.vwApiInvoices 
AS 
/*Call REST API inside SQL Server View*/
SELECT * FROM OPENQUERY( LS , 
'SELECT * FROM $
WITH (Src=''https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json''
	 ,Filter=''$.value[*]''
	 ,DataFormat=''OData''
)');

GO
</pre>
&nbsp;</li>
 	<li>Notice in above approach if you parameterize Stored Procedure then <a href="https://zappysys.com/blog/create-csv-list-sql-server-table-columns-datatypes/" target="_blank" rel="noopener">check this article to understand Dynamic Metadata</a>.</li>
 	<li>That's it. We are now ready to move forward with more interesting things in next section.</li>
</ol></div>
<h3>Import REST API data in Tableau using Microsoft SQL Server Connector</h3>
<p>Now we are ready to call REST API in Tableau. Perform following steps to Connect REST API to Tableau.</p>
<ol>
<li>Open Tableau Desktop and click File &gt; New</li>
<li>To create new Connection click More &gt; Microsoft SQL Server &gt; Enter your credentials to connect to SQL Server.
<div id="attachment_5303" style="width: 765px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-connect-rest-api-data-microsoft-sql-server-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5303" class="size-full wp-image-5303" src="https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-connect-rest-api-data-microsoft-sql-server-driver.png" alt="Connect to REST API in Tableau using Microsoft SQL Server (Linked Server OPENQUERY approach)" width="755" height="690" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-connect-rest-api-data-microsoft-sql-server-driver.png 755w, https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-connect-rest-api-data-microsoft-sql-server-driver-300x274.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></a><p id="caption-attachment-5303" class="wp-caption-text">Connect to REST API in Tableau using Microsoft SQL Server (Linked Server OPENQUERY approach)</p></div></li>
<li>Once connection is created for SQL Server we can read REST API data 3 different ways
<ol>
<li>Query View which contains OPENQUERY to Linked Server for REST API data</li>
<li>Use direct SQL Query using OPENQUERY</li>
<li>Use Stored Procedure (Mostly useful to parameterize calls</li>
</ol>
</li>
<li>See below example to pull data from REST API in Tableau using SQL View approach
<div id="attachment_5302" style="width: 775px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/table-create-new-datasource-rest-api-query-json-xml-csv.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5302" class="size-full wp-image-5302" src="https://zappysys.com/blog/wp-content/uploads/2018/11/table-create-new-datasource-rest-api-query-json-xml-csv.png" alt="Create new Data Source in Tableau to Query REST API or file data (JSON / XML / CSV )" width="765" height="559" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/table-create-new-datasource-rest-api-query-json-xml-csv.png 765w, https://zappysys.com/blog/wp-content/uploads/2018/11/table-create-new-datasource-rest-api-query-json-xml-csv-300x219.png 300w" sizes="(max-width: 765px) 100vw, 765px" /></a><p id="caption-attachment-5302" class="wp-caption-text">Create new Data Source in Tableau to Query REST API or file data (JSON / XML / CSV )</p></div></li>
<li>Here is how to Create Data Source using direct SQL Query. You can enter following Example Query.<br />
<pre class="crayon-plain-tag">SELECT * FROM OPENQUERY( YOUR_LINKED_SERVER , 
'SELECT * FROM $
WITH (Src=''https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json''
	 ,Filter=''$.value[*]''
)');</pre>
&nbsp;</p>
<div id="attachment_5307" style="width: 1014px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-data-in-tableu-datasource-sql-server-approach.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5307" class="size-full wp-image-5307" src="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-data-in-tableu-datasource-sql-server-approach.png" alt="Create Tableau REST API Datasource using direct SQL Query" width="1004" height="470" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-data-in-tableu-datasource-sql-server-approach.png 1004w, https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-data-in-tableu-datasource-sql-server-approach-300x140.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-data-in-tableu-datasource-sql-server-approach-768x360.png 768w" sizes="(max-width: 1004px) 100vw, 1004px" /></a><p id="caption-attachment-5307" class="wp-caption-text">Create Tableau REST API Datasource using direct SQL Query</p></div></li>
<li>Once your data sources are created you can click on Sheet1 and drag fields to create visualizations for Tableau Dashboard.
<div id="attachment_5308" style="width: 867px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-dashboard-from-rest-api-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5308" class="size-full wp-image-5308" src="https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-dashboard-from-rest-api-example.png" alt="Create Tableau Dashboard from REST API data (JSON / XML / CSV)" width="857" height="616" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-dashboard-from-rest-api-example.png 857w, https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-dashboard-from-rest-api-example-300x216.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-dashboard-from-rest-api-example-768x552.png 768w" sizes="(max-width: 857px) 100vw, 857px" /></a><p id="caption-attachment-5308" class="wp-caption-text">Create Tableau Dashboard from REST API data (JSON / XML / CSV)</p></div></li>
</ol>
<h2>Passing Parameters to REST API calls in Tableau (Dynamic SQL)</h2>
<p>Now let&#8217;s look at scenario where you have to pass parameters to build Dynamic Dashboard. You can try to insert Parameters in your Direct SQL when you build Dynamic SQL but we found some issues with that so we are going to suggest Stored Procedure approach. For more information on Known issue on <a href="https://zappysys.com/blog/create-csv-list-sql-server-table-columns-datatypes/" target="_blank" rel="noopener">Dynamic Metadata Check this post</a>.</p>
<ol>
<li>First lets create a stored procedure in SQL Server for Parameter Example. Notice how we added WITH RESULT SETS in the code to <a href="https://zappysys.com/blog/create-csv-list-sql-server-table-columns-datatypes/" target="_blank" rel="noopener">describe metadata</a>.<br />
<pre class="crayon-plain-tag">--DROP PROC dbo.usp_GetInvoicesByCountry
--GO
/*
Purpose: Parameterize REST API call via SQL. Call ZappySys Drivers inside SQL Server.
*/
CREATE PROC dbo.usp_GetInvoicesByCountry
	@country varchar(100) 
AS 

DECLARE @sql varchar(max)
--//Escape single ticks carefully
SET @sql =  'SELECT OrderID,CustomerID,Country,Quantity FROM $
WITH (Src=''https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json&amp;filter=Country eq '+ @country +'''
	 ,Filter=''$.value[*]''
	 ,DataFormat=''OData''
)'

DECLARE @sqlFull varchar(max)
SET @sqlFull='SELECT * FROM OPENQUERY( LS , ''' + REPLACE( @sql, '''', '''''' ) + ''' )'
PRINT @sqlFull --//For DEBUG purpose

EXECUTE (@sqlFull) 
WITH RESULT SETS ( 
 (OrderID int,CustomerID varchar(100),Country varchar(100),Quantity int) --//describe first result. If you don't do this then wont work in Tableau 
)
GO
-- Example call
EXEC dbo.usp_GetInvoicesByCountry @country='Germany'</pre>
</li>
<li>Once you create a stored procedure go to Tableau datasource and select Database which contains the stored procedure we just created.</li>
<li>Now find your stored proc and drag it on the datasource pane. You will see parameters UI as below. You can create new parameter &#8211; Select <strong>New Parameter</strong> under Value Column.
<div id="attachment_5310" style="width: 912px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/parameterize-tableau-datasource-call-rest-api-stored-procedure.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5310" class="size-full wp-image-5310" src="https://zappysys.com/blog/wp-content/uploads/2018/11/parameterize-tableau-datasource-call-rest-api-stored-procedure.png" alt="Parameterize Tableau REST API datasource (Stored Procedure Parameters)" width="902" height="634" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/parameterize-tableau-datasource-call-rest-api-stored-procedure.png 902w, https://zappysys.com/blog/wp-content/uploads/2018/11/parameterize-tableau-datasource-call-rest-api-stored-procedure-300x211.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/parameterize-tableau-datasource-call-rest-api-stored-procedure-768x540.png 768w" sizes="(max-width: 902px) 100vw, 902px" /></a><p id="caption-attachment-5310" class="wp-caption-text">Parameterize Tableau REST API datasource (Stored Procedure Parameters)</p></div></li>
<li>Thats it now you can reuse your parameterized datasource anywhere in Dashboard.</li>
<li>If you have need to select Parameters from predefined values rather than free text then edit your parameter and select <strong>List</strong> option. Define values you like to select from as below.
<div id="attachment_5311" style="width: 960px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/allow-multiple-values-tableau-parameters.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5311" class="size-full wp-image-5311" src="https://zappysys.com/blog/wp-content/uploads/2018/11/allow-multiple-values-tableau-parameters.png" alt="Allow Tableau Parameter selection from multiple values" width="950" height="568" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/allow-multiple-values-tableau-parameters.png 950w, https://zappysys.com/blog/wp-content/uploads/2018/11/allow-multiple-values-tableau-parameters-300x179.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/allow-multiple-values-tableau-parameters-768x459.png 768w" sizes="(max-width: 950px) 100vw, 950px" /></a><p id="caption-attachment-5311" class="wp-caption-text">Allow Tableau Parameter selection from multiple values</p></div></li>
<li>When you create Tableau Dashboard you will see Parameter dropdown (If you selected List) elase you may see Textbox to enter custom value.
<div id="attachment_5312" style="width: 918px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-dashboard-rest-api-example-with-parameters.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5312" class="size-full wp-image-5312" src="https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-dashboard-rest-api-example-with-parameters.png" alt="Tableau Dashboard Example - REST API Source with Parameterized Datasource" width="908" height="668" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-dashboard-rest-api-example-with-parameters.png 908w, https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-dashboard-rest-api-example-with-parameters-300x221.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/tableau-dashboard-rest-api-example-with-parameters-768x565.png 768w" sizes="(max-width: 908px) 100vw, 908px" /></a><p id="caption-attachment-5312" class="wp-caption-text">Tableau Dashboard Example &#8211; REST API Source with Parameterized Datasource</p></div></li>
</ol>
<h2></h2>
<h2>Read data from JSON Files in Tableau (Single or Multiple)</h2>
<p>So far we have seen how to read data from REST API but there will be a time to read data from JSON Files (Single or Multiple). Also files may be compressed (GZip or Zip). Regardless no worries if you are using ZappySys drivers. See below sample query you can submit via SQL Linked Server to read JSON files stored on network share.</p>
<p><strong>Single File Example</strong></p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_LINKED_SERVER]
, 'SELECT * FROM $
WITH(
   Src=''c:\ssis\large_2018.json''
  ,Filter=''$.Branches[*]''
)')</pre><p>
<strong>Multiple Files Example</strong></p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_LINKED_SERVER]
, 'SELECT * FROM $
WITH(
   Src=''c:\ssis\large_*.json''
  ,Filter=''$.Branches[*]''
)')</pre><p>
<strong>Read Compressed Files (GZip / Zip Format)</strong></p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_LINKED_SERVER]
, 'SELECT * FROM $
WITH(
   Src=''c:\ssis\large_*.json.gz''
  --Src=''https://zappysys.com/downloads/files/test/large_file_10k.json.gz''
  ,Filter=''$.Branches[*]''
  ,FileCompressionType=''GZip''  --OR-- Zip --OR-- None
)')</pre><p>
&nbsp;</p>
<h2>Read CSV Files or URL in Tableau</h2>
<p>If you like to read data from CSV files or URL then you can use <a href="https://zappysys.com/products/odbc-powerpack/odbc-csv-rest-api-driver/" target="_blank" rel="noopener">ZappySys CSV Driver</a> same way.</p>
<p>Here is sample query for CSV data.</p>
<p><strong>Reading Compressed CSV Files in Tableau</strong></p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_API_SERVICE]
, 'SELECT * FROM $
WITH(
  Src=''https://zappysys.com/downloads/files/test/customerdata.csv.gz''
  ,FileCompressionType=''GZip''  --OR-- Zip --OR-- None
  ,ColumnDelimiter=''|''
  ,HasColumnHeaderRow=''False''
)')</pre><p>
<strong>Read multiple files (TAB delimited) in Tableau</strong></p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_API_SERVICE]
, 'SELECT * FROM $
WITH(
  Src=''''c:\ssis\customerdata_*.csv''''
  ,ColumnDelimiter=''{tab}'' --or use \t for tab delimited files
  ,HasColumnHeaderRow=''True''
)')</pre><p>
<h2>Read XML Files or API in Tableau</h2>
<p>If you like to read data from XML files or URL then you can use <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ZappySys XML Driver</a> same way. See below example to read some data from XML Web API. We have also passed credentials along with it for demo purpose.</p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_API_SERVICE]
, 'SELECT * FROM $
WITH(
	 ElementsToTreatAsArray=''item,slide''
	,Src=''http://httpbin.org/xml''
	,DataConnectionType=''HTTP''
	,UserName=''user1''
	,CredentialType=''Basic''
	,Password=''P@11s#''
	,Filter=''$.slideshow.slide[*]''
)')</pre><p>
<strong>Read local XML files</strong></p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_API_SERVICE]
, 'SELECT * FROM $ WITH (
 SRC=''C:\Data\CustomerData.xml''
, Filter=''$.Root.Row[*]''
, ElementsToTreatAsArray=''Row''
)')</pre><p>
&nbsp;</p>
<h2>Call POST REST API in Tableau</h2>
<p>There will be a time when you like to submit API request as POST rather than GET. See below example how to write POST API Request to send Body along with Custom Headers and Method.</p>
<p><strong>POST Body, Set Method, Headers</strong></p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_API_SERVICE]
, 'SELECT * FROM $
WITH 
(METHOD=''POST'', HEADER=''Content-Type: text/plain || x-hdr1: AAA''
,SRC=''http://httpbin.org/post''
,BODY=''
{
    id:1,
    notes:"Line1\r\nLine2"
}''
)')</pre><p>
<strong>Call SOAP API using XML Driver (POST data) &#8211; Token based Authentication</strong></p>
<p>Here is another interesting example to call XML SOAP API. It first authenticates and get Token from SOAP Response. Then use that token for API call. To read more about <a href="https://zappysys.com/blog/call-soap-rest-api-using-dynamic-token-ssis/" target="_blank" rel="noopener">Dynamic Token Method check this article</a>.</p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_API_SERVICE]
, 'SELECT * FROM $
WITH(
	 ElementsToTreatAsArray=''urn:Row''
	,Src=''https://zappysys.com/downloads/files/test/soap-getdata.aspx''
	,DataConnectionType=''HTTP''
	,AuthScheme=''{none}''
	,TokenUrl=''https://zappysys.com/downloads/files/test/soap-login.aspx''
	,TokenRequestData=''
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com"&gt;
   &lt;soapenv:Body&gt;
      &lt;urn:login&gt;
         &lt;urn:username&gt;[$userid$]&lt;/urn:username&gt;
         &lt;urn:password&gt;[$password$]&lt;/urn:password&gt;
      &lt;/urn:login&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;''

	,TokenRequestMethod=''POST''
	,TokenResponseContentFilter=''//*[local-name() = ''''sessionid'''']''
	,TokenRequestHeaders=''Content-Type:text/xml|Accept:*/*|Cache-Control:no-cache''
	,TokenResponseContentType=''Xml''
	,UserName=''MyUser001''
    ,Password=''P@$$w0rdAAc12''
	,CredentialType=''TokenDynamic''
	,Filter=''$.soapenv:Envelope.soapenv:Body.urn:Row[*]''
	,RequestData=''
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com"&gt;
   &lt;soapenv:Body&gt;
      &lt;urn:sessionid&gt;[$token$]&lt;/urn:sessionid&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;''

	,Header=''Content-Type: text/xml;charset=UTF-8 || SOAPAction: "https://zappysys.com/soap-getdata" || Accept: */* || Cache-Control: no-cache''
	,RequestMethod=''POST''
)')</pre><p>
&nbsp;</p>
<p>&nbsp;</p>
<h2>REST API / XML SOAP Pagination Settings for Tableau</h2>
<div class="content_block" id="custom_post_widget-3892"><div style="margin-bottom: 1em;">Even we set up ODBC Data Source to get the data, it may not be enough. Usually, if you are getting a huge data set from API provider, it won't give it to you in one HTTP response. Instead, it gives back only a subset of data and provides a mechanism for data pagination. The good news is that <em>ZappySys ODBC Driver</em> includes many options to cover virtually any pagination method.</div>
<div><span style="font-size: 16px;">Below you will find a few examples of API pagination. If you need something more sophisticated check the below link (the article was written for SSIS PowerPack but UI options and concepts apply to ODBC Driver too):</span></div>
<div style="margin-bottom: 1em;"><a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/</a></div>
<h3>Paginate by Response Attribute</h3>
This example shows how to paginate API calls where you need to paginate until the last page detected. In this example, next page is indicated by some attribute called nextlink (found in response). If this attribute is missing or null then it stops fetching the next page.
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH(
SRC=@'https://zappysys.com/downloads/files/test/pagination_nextlink_inarray_1.json'
,NextUrlAttributeOrExpr = '$.nextlink'  --keep reading until this attribute is missing. If attribute name contains dot then use brackets like this $.['my.attr.name']
)</pre>
<h3>Paginate by URL Parameter (Loop until certain StatusCode)</h3>
This example shows how to paginate API calls where you need to pass page number via URL. The driver keeps incrementing page number and calls next URL until the last page detected (401 error). There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/page-xml.aspx?page=1&amp;mode=DetectBasedOnResponseStatusCode'
,PagingMode='ByUrlParameter'
,PagingByUrlAttributeName='page'
,PagingByUrlEndStrategy='DetectBasedOnResponseStatusCode'
,PagingByUrlCheckResponseStatusCode=401
,IncrementBy=1
)</pre>
<h3>Paginate by URL Path (Loop until no record)</h3>
This example shows how to paginate API calls where you need to pass page number via URL Path. The driver keeps incrementing page number and calls next URL until the last page is detected. There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/cust-&lt;%page%&gt;.xml'
,PagingMode='ByUrlPath'
,PagingByUrlAttributeName='&lt;%page%&gt;'
,PagingByUrlEndStrategy='DetectBasedOnRecordCount'
,IncrementBy=1
)</pre>
<h3>Paginate by Header Link (RFC 5988)</h3>
API like GitHub / Wordpress use Next link in Headers (<a href="https://tools.ietf.org/html/rfc5988" target="_blank" rel="noopener">RFC 5988</a>)
<pre class="lang:default decode:true ">SELECT * FROM $
LIMIT 25
WITH(
	 Src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)</pre>
&nbsp;</div>
<h2>REST API / SOAP Web Service Connection Settings for Tableau</h2>
<div class="content_block" id="custom_post_widget-3896"><div style="margin-bottom: 1em;">If you need to authenticate or authorize your user to access a web resource, you will need to use one of the <em>Connections:</em></div>
<ul>
 	<li>HTTP</li>
 	<li>OAuth</li>
</ul>
<img loading="lazy" decoding="async" class="wp-image-4078 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png" alt="ZappySys XML Driver - HTTP and OAuth Connection Types" width="577" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png 577w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252-300x157.png 300w" sizes="(max-width: 577px) 100vw, 577px" />
<h3>HTTP Connection</h3>
<div style="margin-bottom: 1em;">Use <em>HTTP Connection</em> for simple Windows, Basic, NTLM or Kerberos authentication. Just fill in a username and a password and you are good to go!</div>
<div style="margin-bottom: 1em;">You can also use <em>HTTP Connection</em> for more sophisticated authentication like:</div>
<ul>
 	<li><strong>SOAP WSS</strong> (when accessing a SOAP WebService)</li>
 	<li><strong>Static Token / API Key</strong> (when need to pass an API key in HTTP header)</li>
 	<li><strong>Dynamic Token</strong> (same as Static Token method except that each time you need to log in and retrieve a fresh API key)</li>
 	<li><strong>JWT Token</strong> (As per RFC 7519)</li>
</ul>
<img loading="lazy" decoding="async" class="alignnone wp-image-4091 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-1.png" alt="" width="622" height="570" />
<h3>OAuth</h3>
If you are trying to access REST API resource, it is a huge chance, you will need to use <em>OAuth Connection</em>. <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">Read this article</a> to understand how OAuth authentication and authorization works and how to use it (article originally was written for <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>, but the concepts and UI stay the same): <br/>
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/</a>
<img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-2.png" width="721" height="708" /></div>
<h2>Other settings for REST API / SOAP XML Call in Tableau</h2>
<div class="content_block" id="custom_post_widget-3901">There are few settings you can coder while calling Web API
<h3><strong>API Limit / Throttling</strong></h3>
While calling public API or other external web services one important aspect you have to check,  how many requests are allowed by your API. Especially when you use API pagination options to pull many records you have to slow down based on API limits. For example, your API may allow you only 5 requests per second. Use Throttling Tab on Driver UI to set delay after each request.
<h3><strong>2D Array Transformation</strong></h3>
If you are using JSON or XML API Driver then possible you may have to transform your data using 2D array transformation feature. <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Check this link</a> for more information.

&nbsp;</div>
<h2>REST API / XML SOAP Performance Tips for Tableau</h2>
<div class="content_block" id="custom_post_widget-4455">While calling APIs you may face some performance issues. There are a few tips you can consider to speed up things.
<h4><span style="font-size: 14pt;"><strong>Use Server-side filtering if possible in URL or Body Parameters</strong></span></h4>
Many API supports filtering your data by URL parameters or via Body. Whenever possible try to use such features.  Here is an example of <a href="http://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">odata API</a>, In the below query the first query is faster than the second query because in the first query we filter at the server.
<pre class="lang:tsql decode:true">SELECT * FROM value
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json&amp;$filter=Country eq ''USA'''
	,DataFormat='Odata'
)

-- Slow query - Client-side filtering
SELECT * FROM value
WHERE Country ='USA'
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json'
	,DataFormat='Odata'
)</pre>
<h4><span style="font-size: 14pt;"><strong>Avoid Special features in SQL Query (e.g. WHERE, Group By, Order By)</strong></span></h4>
ZappySys API engine triggers client-side processing if special features are used in Query. Following SQL Features will trigger Client-Side processing which is several times slower than server-side processing. So always try to use simple query (Select col1, col2 .... from mytable )
<ul>
 	<li>WHERE Clause</li>
 	<li>GROUP BY Clause</li>
 	<li>HAVING Clause</li>
 	<li>ORDER BY</li>
 	<li>FUNCTIONS (e.g. Math, String, DateTime, Regex... )</li>
</ul>
LIMIT clause does not trigger client-side processing.
<h4><span style="font-size: 14pt;"><strong>Consider using pre-generated Metadata / Cache File</strong></span></h4>
Use META option in WITH Clause to use static metadata (Pre-Generated)There are two more options to speedup query processing time. Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details.
<ol>
 	<li>
<pre class="lang:default decode:true">select * from value WITH( meta='c:\temp\meta.txt' )
--OR--
select * from value WITH( meta='my-meta-name' )
--OR--
select * from value WITH( meta='[ {"Name": "col1",&amp;nbsp;"Type": "String", Length: 100},&amp;nbsp;{"Name": "col2",&amp;nbsp;"Type": "Int32"} ...... ]' )</pre>
</li>
 	<li>Enable Data Caching Options (Found on <strong>Property Grid</strong> &gt; <strong>Advanced</strong> Mode Only )</li>
</ol>
<h4><span style="font-size: 14pt;"><strong>Consider using Metadata / Data Caching Option</strong></span></h4>
ZappySys API drivers support Caching Metadata and Data rows to speed up query processing. If your data doesn't change often then you can enable this option to speed up processing significantly.

Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details how to enable Data cache / metadata cache feature for datasource level or query level.

To define cache option at query level you can use like below.
<pre class="">SELECT * FROM $
WITH 
(  SRC='https://myhost.com/some-api'
  ,CachingMode='All'  --cache metadata and data rows both
  ,CacheStorage='File' --or Memory
  ,CacheFileLocation='c:\temp\myquery.cache'
  ,CacheEntryTtl=300 --cache for 300 seconds
)
</pre>
&nbsp;

&nbsp;
<h4><strong><span style="font-size: 14pt;">Use --FAST Option to enable Stream Mode</span></strong></h4>
ZappySys JSON / XML drivers support <strong>--FAST</strong> suffix for Filter. By using this suffix after Filter driver enables Stream Mode, <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/#Reading_Large_Files_Streaming_Mode_for_XML_JSON" target="_blank" rel="noopener">Read this article</a> to understand how this works.
<pre class="lang:default decode:true">SELECT * FROM $ 
LIMIT 10 --//add this just to test how fast you can get 10 rows
WITH(
  Filter='$.LargeArray[*]--FAST' --//Adding --FAST option turn on STREAM mode (large files)
 ,SRC='https://zappysys.com/downloads/files/test/large_file_100k_largearray_prop.json.gz'
 --,SRC='c:\data\large_file.json.gz'
 ,IncludeParentColumns='False'  --//This Must be OFF for STREAM mode (read very large files)
 ,FileCompressionType='GZip' --Zip or None (Zip format only available for Local files)
)</pre>
&nbsp;</div>
<h2>Calling SOAP Web Service in Tableau</h2>
<div class="content_block" id="custom_post_widget-3870">To call SOAP API you need to know Request XML Body Structure. If you are not sure how to create SOAP Request body then no worries. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn how to generate SOAP Request body using the Free tool <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a>. Basically, you have to use SoapUI to generate Request XML and after that, you can replace parameters as needed in the generated body.
<h3>What is SOAP Web Service?</h3>
If you are new to SOAP Web Service sometimes referred as XML Web Service then please read some concept about SOAP Web service standard <a href="https://msdn.microsoft.com/en-us/library/ms996507.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener">from this link</a>

There are two important aspects in SOAP Web service.
<ol>
 	<li>Getting WSDL file or URL</li>
 	<li>Knowing exact Web Service URL</li>
</ol>
<h3>What is WSDL</h3>
In very simple term WSDL (often pronounced as whiz-dull) is nothing but a document which describes Service metadata (e.g. Functions you can call, Request parameters, response structure etc). Some service simply give you WSDL as xml file you can download on local machine and then analyze or sometimes you may get direct URL (e.g. http://api.mycompany.com/hr-soap-service/?wsdl )
<h3>Example SQL Query for SOAP API call using ZappySys XML Driver</h3>
Here is an example SQL query you can write to call SOAP API. If you not sure about many details then check next few sections on how to use XML Driver User Interface to build desired SQL query to POST data to XML SOAP Web Service without any coding.
<pre class="lang:tsql decode:true">SELECT * FROM $
WITH(
	 Src='http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx'
	,DataConnectionType='HTTP'
	,CredentialType='Basic' --OR SoapWss
	,SoapWssPasswordType='PasswordText'
	,UserName='myuser'
	,Password='pass$$w123'
	,Filter='$.soap:Envelope.soap:Body.GetHolidaysAvailableResponse.GetHolidaysAvailableResult.HolidayCode[*]'
	,ElementsToTreatAsArray='HolidayCode'	
	,RequestMethod='POST'	
	,Header='Content-Type: text/xml;charset=UTF-8 || SOAPAction: "http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable"'
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hol="http://www.holidaywebservice.com/HolidayService_v2/"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;hol:GetHolidaysAvailable&gt;
         &lt;!--type: Country - enumeration: [Canada,GreatBritain,IrelandNorthern,IrelandRepublicOf,Scotland,UnitedStates]--&gt;
         &lt;hol:countryCode&gt;UnitedStates&lt;/hol:countryCode&gt;
      &lt;/hol:GetHolidaysAvailable&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
Now let's look at steps to create SQL query to call SOAP API. Later we will see how to generate code for your desired programming language (e.g. C# or SQL Server)
<h3>Video Tutorial - Introduction to SOAP Web Service and SoapUI tool</h3>
Before we dive into details about calling SOAP API using ZappySys XML Driver, lets first understand what is SOAP API and how to create SOAP requests using SoapUI tool. You will learn more about this process in the later section. The video contains some fragment about using SOAP API in SSIS but just ignore that part because we will be calling Soap API using ZappySys ODBC Driver rather than SSIS Components.

&nbsp;

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/d_x5bgGjg0Y?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe>
<h3>Using SoapUI to test SOAP API call / Create Request Body XML</h3>
Assuming you have downloaded and installed <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI from here</a>, now we are ready to use WSDL for your SOAP Web Service Calls. If you do not have WSDL file or URL handy then contact your API provider (sometimes you just have to add <strong>?wsdl </strong>at the end of your Service URL to get WSDL so try that. Example: http://mycompany/myservice?wsdl ).

If you don't know what is WSDL then in short, WSDL is <strong>Web service Description Language</strong> (i.e. XML file which describes your SOAP Service). WSDL helps to craft SOAP API request Body for ZappySys XML Driver. So Let's get started.
<ol>
 	<li>Open SoapUI and click SOAP button to create new SOAP Project</li>
 	<li>Enter WSDL URL or File Path of WSDLFor example WSDL for our sample service can be accessed via this URL
<pre class="lang:default highlight:0 decode:true">http://www.dneonline.com/calculator.asmx?wsdl</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-import-wsdl-new-soapui-project.png"><img loading="lazy" decoding="async" class="size-full wp-image-3871" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-14.png" alt="Create new SOAP API Project in SoapUI tool for SOAP API Testing" width="486" height="349" /></a>
<div style="margin-bottom: 1em;">Create new SOAP API Project in SoapUI tool for SOAP API Testing</div></li>
 	<li>Once WSDL is loaded you will see possible operations you can call for your SOAP Web Service.</li>
 	<li>If your web service requires credentials then you have to configure it. There are two common credential types for public services (<strong>SOAP WSS</strong> or <strong>BASIC</strong> )
<ol>
 	<li>
<div style="margin-bottom: 1em;">To use <strong>SOAP WSS Credentials</strong> select request node and enter UserId, Password, and <strong>WSS-PasswordType</strong> (PasswordText or PasswordHash)</div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-soap-wss-credentials-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3872 alignnone" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)" width="294" height="544" /></a>
<div style="display: block;">Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)</div></li>
 	<li>To use <strong>BASIC Auth</strong> Credentials select request node and double-click it. At the bottom click on Auth (Basic) and From Authorization dropdown click Add New and Select Basic.<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-basic-authentication-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3873" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure Basic Authorization for SoapUI (SOAP API Testing Tool)" width="616" height="653" /></a>
<div style="margin-bottom: 1em;">Configure Basic Authorization for SoapUI (SOAP API Testing Tool)</div></li>
</ol>
</li>
 	<li>Now you can test your request first Double-click on the request node to open request editor.</li>
 	<li>Change necessary parameters, remove optional or unwanted parameters. If you want to regenerate request you can click on <strong>Recreate default request toolbar icon</strong>.
<a href="https://zappysys.com/blog/wp-content/uploads/2016/06/create-soap-request-with-optional-parameters-soapui.png"><img loading="lazy" decoding="async" class="size-full wp-image-2812" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-4.png" alt="Create SOAP Request XML (With Optional Parameters)" width="807" height="315" /></a>
<div style="margin-bottom: 1em;">Create SOAP Request XML (With Optional Parameters)</div></li>
 	<li>Once your SOAP Request XML is ready, <strong>Click the Play button</strong> in the toolbar to execute SOAP API Request and Response will appear in Right side panel.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soapui-test-soap-api-request-response-edit-xml-body.png"><img loading="lazy" decoding="async" class="size-full wp-image-3874" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-5.png" alt="Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)" width="1216" height="511" /></a>
Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)</li>
</ol>
<h3>Create DSN using ZappySys XML Driver to call SOAP API</h3>
Once you have tested your SOAP API in SoapUI tool, we are ready to use ZappySys XML driver to call SOAP API in your preferred BI tool or Programming language.
<ol>
 	<li>First open <strong>ODBC Data Sources</strong> (search ODBC in your start menu or go under ZappySys &gt; ODBC PowerPack &gt; <strong>ODBC 64 bit</strong>)</li>
 	<li>Goto <strong>System DSN</strong> Tab (or User DSN which is not used by Service account)</li>
 	<li>Click <strong>Add</strong> and Select ZappySys XML Driver
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-6.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" /></a>
ZappySys ODBC Driver for XML / SOAP API</li>
 	<li>Configure API URL, Request Method and Request Body as below
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3876" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-7.png" alt="ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body" width="916" height="874" /></a>
ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body</li>
 	<li><strong>(This step is Optional)</strong> If your SOAP API requires credentials then Select Connection Type to HTTP and configure as below.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-call-credential-basic-soap-wss-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3877" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-8.png" alt="ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)" width="564" height="483" /></a>
<div style="display: block;">ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)</div></li>
 	<li>Configure-Request Headers as below (You can get it from Request &gt; Raw tab from SoapUI after you test the request by clicking the Play button)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/set-soap-api-request-headers-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3881" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-9.png" alt="Configure SOAP API Request Headers - ZappySys XML Driver" width="1009" height="747" /></a>
Configure SOAP API Request Headers - ZappySys XML Driver</li>
 	<li>Once credentials entered you can select Filter to extract data from the desired node. Make sure to select array node (see special icon) or select the node which contains all necessary columns if you don't have array node.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-query-select-filter-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3882" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-10.png" alt="Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)" width="809" height="594" /></a>
Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)</li>
 	<li>If prompted select yes to treat selected node as Array (This is helpful when you expect one or more record for selected node)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/xml-api-array-handling-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3883" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-11.png" alt="Treat selected node as XML Array Option for SOAP API Response XML" width="655" height="572" /></a>
Treat selected node as XML Array Option for SOAP API Response XML</li>
</ol>
<h3>Preview SOAP API Response / Generate SQL Code for SOAP API Call</h3>
Once you configure settings for XML Driver now you can preview data or generate example code for desired language (e.g. C#, Python, Java, SQL Server).

Go to Preview tab and you will see default query generated based on settings you entered in previous sections. Attributes listed in WITH clause are optional. If you omit attribute in WITH clause it will use it from Properties tab.
<h3>Preview Data</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3884" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-12.png" alt="Preview SOAP API Response in ZappySys XML Driver" width="808" height="780" /></a>
Preview SOAP API Response in ZappySys XML Driver
<h3>Generate Code Option</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-driver-code-generator.png"><img loading="lazy" decoding="async" class="size-full wp-image-3885" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-13.png" alt="Generate Example Code for ZappySys Driver" width="572" height="618" /></a>
<div style="display: block;">Generate Example Code for ZappySys Driver</div></div>
<h2>Conclusion</h2>
<p>Tableau has no out of the box features to consume many Web API / JSON / XML data sources out there. ZappySys has developed most innovative drivers which can connect to virtually any REST API / SOAP data sources in Tableau. These drivers also capable reading local files in JSON / CSV or XML format. Feel free to download  <a href="https://zappysys.com/products/odbc-powerpack/">ZappySys Drivers here</a> and try yourself . You can always contact ZappySys Support Team <a href="https://zappysys.com/support/" target="_blank" rel="noopener">here</a> if you need any API integration help.</p>
<p>The post <a href="https://zappysys.com/blog/import-rest-api-tableau-read-json-soap-xml-csv/">Import REST API in Tableau &#8211; Read JSON, SOAP XML, CSV</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to call REST API in MicroStrategy (JSON / XML SOAP)</title>
		<link>https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Sat, 13 Oct 2018 21:19:14 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - MicroStrategy]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[MicroStrategy]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[rest]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5181</guid>

					<description><![CDATA[<p> Introduction In this new article, we will show how to call REST API in MicroStrategy. MicroStrategy is a Business Intelligence company that provides powerful software to create nice charts, reports to take decisions. It started in 1993 and now it is one of the most popular Business Intelligence tools in the world because it is simple, intuitive and friendly. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/">How to call REST API in MicroStrategy (JSON / XML SOAP)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2> Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-logo.png"><img loading="lazy" decoding="async" class=" wp-image-5187 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-logo.png" alt="MicroStrategy logo" width="86" height="86" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-logo.png 225w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-logo-150x150.png 150w" sizes="(max-width: 86px) 100vw, 86px" /></a>In this new article, we will show how to call REST API in MicroStrategy. MicroStrategy is a Business Intelligence company that provides powerful software to create nice charts, reports to take decisions. It started in 1993 and now it is one of the most popular Business Intelligence tools in the world because it is simple, intuitive and friendly. Also, It can connect to almost any database. We will use ZappySys ODBC PowerPack. Zappysys ODBC is a pretty nice software used to connect to REST API.  ZappySys ODBC is an excellent plugin for MicroStrategy, because, with this plugin, you can connect to almost any application that supports REST API.</p>
<h2>Requirements</h2>
<ol>
<li>First of all, we will need <a href="https://www.microstrategy.com/us/get-started/desktop" target="_blank" rel="noopener">MicroStrategy Desktop</a> installed.</li>
<li>Secondly, you will require <a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">ZappySys PowerPack for ODBC</a> installed.</li>
</ol>
<h2>Getting started</h2>
<p>First of all, we will need to configure the ODBC ZappySys to connect to REST API. Once the ODBC connection is created, we will invoke the ODBC connection in Microstrategy.</p>
<h3>Configuring the ODBC Zappysys</h3>
<ol>
<li>Search &#8220;odbc&#8221; in start menu and select <strong>ODBC Data sources (64-bit)</strong></li>
<li>First of all, we will open the ODBC Data Source Administrator in the <strong>System DSN</strong> and press Add:
<div id="attachment_5190" style="width: 599px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ODBC-Data-source-add-data-source.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5190" class="size-full wp-image-5190" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ODBC-Data-source-add-data-source.jpg" alt="Driver to connect to REST API" width="589" height="319" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ODBC-Data-source-add-data-source.jpg 589w, https://zappysys.com/blog/wp-content/uploads/2018/10/ODBC-Data-source-add-data-source-300x162.jpg 300w" sizes="(max-width: 589px) 100vw, 589px" /></a><p id="caption-attachment-5190" class="wp-caption-text">ODBC Connect to REST API</p></div>
<div class="su-note"  style="border-color:#e5da9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff4b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Use 64 bits if your machine supports it.</div></div></li>
<li>Secondly, add a new ZappySys JSON Driver:
<div id="attachment_5191" style="width: 473px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/select-zappysys-json-driver-data-source.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5191" class="size-full wp-image-5191" src="https://zappysys.com/blog/wp-content/uploads/2018/10/select-zappysys-json-driver-data-source.jpg" alt="ODBC driver list" width="463" height="350" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/select-zappysys-json-driver-data-source.jpg 463w, https://zappysys.com/blog/wp-content/uploads/2018/10/select-zappysys-json-driver-data-source-300x227.jpg 300w" sizes="(max-width: 463px) 100vw, 463px" /></a><p id="caption-attachment-5191" class="wp-caption-text">List of drivers supported</p></div></li>
<li>Also, we will add the following URL to the Simple View:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json</pre>
<div id="attachment_5193" style="width: 805px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-url-configuration.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5193" class="size-full wp-image-5193" src="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-url-configuration.jpg" alt="Configuration to connect to REST" width="795" height="619" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-url-configuration.jpg 795w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-url-configuration-300x234.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-url-configuration-768x598.jpg 768w" sizes="(max-width: 795px) 100vw, 795px" /></a><p id="caption-attachment-5193" class="wp-caption-text">ODBC configuration to connect to REST API</p></div></li>
</ol>
<h3>Configuring MicroStrategy</h3>
<ol>
<li>In MicroStrategy Desktop, press the <strong>New Dossier</strong> button:
<div id="attachment_5194" style="width: 1101px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5194" class="size-full wp-image-5194" src="https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier.jpg" alt="call REST API in Microstrategy" width="1091" height="427" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier.jpg 1091w, https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier-300x117.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier-768x301.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier-1024x401.jpg 1024w" sizes="(max-width: 1091px) 100vw, 1091px" /></a><p id="caption-attachment-5194" class="wp-caption-text">Create a new dossier in MicroStrategy</p></div></li>
<li>Secondly, in the Dossier, press the <strong>New Data</strong> button:
<div id="attachment_5195" style="width: 1098px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5195" class="size-full wp-image-5195" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data.jpg" alt="Use MicroStrategy to add new data" width="1088" height="506" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data.jpg 1088w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data-300x140.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data-768x357.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data-1024x476.jpg 1024w" sizes="(max-width: 1088px) 100vw, 1088px" /></a><p id="caption-attachment-5195" class="wp-caption-text">Add new data in Microstrategy</p></div></li>
<li>Also, in Data Sources select <strong>Databases</strong>:
<div class="mceTemp"></div>
<div id="attachment_5198" style="width: 1010px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstratege-data-sources-databases.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5198" class="size-full wp-image-5198" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstratege-data-sources-databases.jpg" alt="Use MicroStrategy to connect to Databases" width="1000" height="445" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstratege-data-sources-databases.jpg 1000w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstratege-data-sources-databases-300x134.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstratege-data-sources-databases-768x342.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><p id="caption-attachment-5198" class="wp-caption-text">Select the option to connect to Databases in Microstrategy</p></div></li>
<li>In addition, select the option to <strong>Type a Query</strong>:
<div id="attachment_5197" style="width: 517px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-type-a-query.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5197" class="size-full wp-image-5197" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-type-a-query.jpg" alt="MicroStrategy query" width="507" height="388" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-type-a-query.jpg 507w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-type-a-query-300x230.jpg 300w" sizes="(max-width: 507px) 100vw, 507px" /></a><p id="caption-attachment-5197" class="wp-caption-text">Create a query to get Database data</p></div></li>
<li>Next, in Data Sources press the <strong>+</strong> icon:
<div id="attachment_5199" style="width: 336px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-data-sources.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5199" class="size-full wp-image-5199" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-data-sources.jpg" alt="Data sources in MicroStrategy" width="326" height="73" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-data-sources.jpg 326w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-data-sources-300x67.jpg 300w" sizes="(max-width: 326px) 100vw, 326px" /></a><p id="caption-attachment-5199" class="wp-caption-text">Add Data Source in MicroStrategy</p></div></li>
<li>Finally, in Data Source, select DSN Data Sources and select the data source created in the previous section using the ZappySys ODBC Driver. In version, select <strong>Generic DBMS</strong> and write any username and password:
<div id="attachment_5201" style="width: 539px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/select-data-source.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5201" class="size-full wp-image-5201" src="https://zappysys.com/blog/wp-content/uploads/2018/10/select-data-source.jpg" alt="Select DSN and type of connection" width="529" height="346" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/select-data-source.jpg 529w, https://zappysys.com/blog/wp-content/uploads/2018/10/select-data-source-300x196.jpg 300w" sizes="(max-width: 529px) 100vw, 529px" /></a><p id="caption-attachment-5201" class="wp-caption-text">Select DSN, version</p></div></li>
</ol>
<h3>Call REST API in MicroStrategy</h3>
<ol>
<li>You can write different queries using the ZappySys ODBC Driver. The driver supports SQL queries to REST API data including WHERE clauses, GROUP BY, HAVING, ORDER BY, LIMIT WITH:<br />
<pre class="crayon-plain-tag">SELECT ShipName FROM value  
WHERE ShipName="Around the Horn"</pre>
<div id="attachment_5203" style="width: 925px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-tables-tables.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5203" class="size-full wp-image-5203" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-tables-tables.jpg" alt="Call REST API in MicroStrategy" width="915" height="464" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-tables-tables.jpg 915w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-tables-tables-300x152.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-tables-tables-768x389.jpg 768w" sizes="(max-width: 915px) 100vw, 915px" /></a><p id="caption-attachment-5203" class="wp-caption-text">Query to REST API using MicroStrategy</p></div></li>
<li>Secondly, you can connect online (Live) or use an in-memory Dataset:
<div id="attachment_5204" style="width: 471px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/connect-live-import-in-memory-microstrategy.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5204" class="size-full wp-image-5204" src="https://zappysys.com/blog/wp-content/uploads/2018/10/connect-live-import-in-memory-microstrategy.jpg" alt="Connect in MicroStrategy live or in-memory dataset" width="461" height="346" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/connect-live-import-in-memory-microstrategy.jpg 461w, https://zappysys.com/blog/wp-content/uploads/2018/10/connect-live-import-in-memory-microstrategy-300x225.jpg 300w" sizes="(max-width: 461px) 100vw, 461px" /></a><p id="caption-attachment-5204" class="wp-caption-text">MicroStrategy connect Live</p></div></li>
<li>Finally, you can use the data for your MicroStrategy reports:
<div id="attachment_5206" style="width: 1095px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5206" class="size-full wp-image-5206" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created.jpg" alt="REST API data extracted to get areport" width="1085" height="428" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created.jpg 1085w, https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created-300x118.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created-768x303.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created-1024x404.jpg 1024w" sizes="(max-width: 1085px) 100vw, 1085px" /></a><p id="caption-attachment-5206" class="wp-caption-text">MicroStrategy report created</p></div></li>
</ol>
<h3>Invoking a JSON file in MicroStrategy using ODBC</h3>
<p>With ZappySys PowerPack, you can not only CALL REST API in Microstrategy, but you can also create queries to plain JSON files stored locally or in a web address. We will use the following JSON file to test:</p>
<ol>
<li>First of all, in order to connect, you will need to specify on the ZappySys JSON Driver the path of the local JSON file:
<div id="attachment_5214" style="width: 809px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-connect-to-json-file.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5214" class="size-full wp-image-5214" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-connect-to-json-file.jpg" alt="ODBC connection to a JSON file" width="799" height="376" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-connect-to-json-file.jpg 799w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-connect-to-json-file-300x141.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-connect-to-json-file-768x361.jpg 768w" sizes="(max-width: 799px) 100vw, 799px" /></a><p id="caption-attachment-5214" class="wp-caption-text">Configure a JSON file connection with ODBC</p></div></li>
<li>Secondly, you can create queries in MicroStrategy in the same way that we did in the Call REST API in MicroStrategy section:
<div id="attachment_5215" style="width: 1046px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5215" class="size-full wp-image-5215" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file.jpg" alt="Connection to a local JSON file in MicroStrategy" width="1036" height="464" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file.jpg 1036w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file-300x134.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file-768x344.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file-1024x459.jpg 1024w" sizes="(max-width: 1036px) 100vw, 1036px" /></a><p id="caption-attachment-5215" class="wp-caption-text">Query to JSON file in MicroStrategy</p></div></li>
</ol>
<h3>Call REST API in MicroStrategy to get Gmail information</h3>
<p>It is also possible to invoke and query Gmail data using REST API in MicroStrategy using ZappySys ODBC PowerPack. With the ODBC PowerPack, you can write SQL queries and call REST API in MicroStrategy using OAuth or HTTP<br />
connections.</p>
<ol>
<li>First of all, in the ZappySys ODBC JSON driver, write the following URL:<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/gmail/v1/users/me/messages/</pre>
</li>
<li>Secondly, in connection type select <strong>OAuth Provider</strong>.</li>
<li>Also, in the OAuth Parameter in OAuth Provider, select Google and in scope <a href="https://mail.google.com">https://mail.google.com</a> and press generate token button and specify your credentials:
<div id="attachment_5217" style="width: 788px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/gmail-oauth-configuration.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5217" class="size-full wp-image-5217" src="https://zappysys.com/blog/wp-content/uploads/2018/10/gmail-oauth-configuration.jpg" alt="Get Gmail data in MicroStrategy" width="778" height="632" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/gmail-oauth-configuration.jpg 778w, https://zappysys.com/blog/wp-content/uploads/2018/10/gmail-oauth-configuration-300x244.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/gmail-oauth-configuration-768x624.jpg 768w" sizes="(max-width: 778px) 100vw, 778px" /></a><p id="caption-attachment-5217" class="wp-caption-text">Configuration to connect MicroStrategy with Gmail</p></div></li>
<li>Additionally, in Zappysys you can write queries in MicroStrategy as we did with other REST API URLs:<br />
<pre class="crayon-plain-tag">SELECT * FROM messages</pre>
<div id="attachment_5218" style="width: 1031px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-gmail-report.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5218" class="size-full wp-image-5218" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-gmail-report.jpg" alt="Get Gmail information in Microstrategy" width="1021" height="444" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-gmail-report.jpg 1021w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-gmail-report-300x130.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-gmail-report-768x334.jpg 768w" sizes="(max-width: 1021px) 100vw, 1021px" /></a><p id="caption-attachment-5218" class="wp-caption-text">Query to Gmail information in MicroStrategy</p></div></li>
</ol>
<h3>Problems with the boolean data type in MicroStrategy</h3>
<p>In addition, there is known issue related to boolean data in Microstrategy:</p>
<p>Error in accessing information from the external data source. Database Instance: (DataImport) Error Fetch Failed Error type: Invalid operation. Data of a string cell was truncated.</p>
<p><a href="https://community.microstrategy.com/s/article/KB20514-How-to-map-a-boolean-datatype-as-integer-with-PostgreSQL" rel="noreferrer">https://community.microstrategy.com/s/article/KB20514-How-to-map-a-boolean-datatype-as-integer-with-PostgreSQL</a></p>
<p>We have a workaround for this situation.</p>
<ol>
<li>First of all, you will need to change the metadata. The following article shows how to change the metadata:<a href="https://zappysys.com/blog/metadata-odbc-api-drivers-query/" rel="noreferrer">https://zappysys.com/blog/metadata-odbc-api-drivers-query/</a>Also, in order to fix, save your current metadata:
<div id="attachment_5229" style="width: 553px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-driver-generate-metadata-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5229" class="size-full wp-image-5229" src="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-driver-generate-metadata-1.png" alt="generate metadata" width="543" height="526" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-driver-generate-metadata-1.png 543w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-driver-generate-metadata-1-300x291.png 300w" sizes="(max-width: 543px) 100vw, 543px" /></a><p id="caption-attachment-5229" class="wp-caption-text">Driver ODBC metadata</p></div></li>
<li>Additionally, modify your data from Boolean to String:
<div id="attachment_5230" style="width: 317px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/metadata.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5230" class="size-full wp-image-5230" src="https://zappysys.com/blog/wp-content/uploads/2018/10/metadata.png" alt="change metadata microstrategy" width="307" height="101" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/metadata.png 307w, https://zappysys.com/blog/wp-content/uploads/2018/10/metadata-300x99.png 300w" sizes="(max-width: 307px) 100vw, 307px" /></a><p id="caption-attachment-5230" class="wp-caption-text">MicroStrategy boolean to string metadata</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>REST API / SOAP API Pagination Settings for MicroStrategy</h2>
<div class="content_block" id="custom_post_widget-3892"><div style="margin-bottom: 1em;">Even we set up ODBC Data Source to get the data, it may not be enough. Usually, if you are getting a huge data set from API provider, it won't give it to you in one HTTP response. Instead, it gives back only a subset of data and provides a mechanism for data pagination. The good news is that <em>ZappySys ODBC Driver</em> includes many options to cover virtually any pagination method.</div>
<div><span style="font-size: 16px;">Below you will find a few examples of API pagination. If you need something more sophisticated check the below link (the article was written for SSIS PowerPack but UI options and concepts apply to ODBC Driver too):</span></div>
<div style="margin-bottom: 1em;"><a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/</a></div>
<h3>Paginate by Response Attribute</h3>
This example shows how to paginate API calls where you need to paginate until the last page detected. In this example, next page is indicated by some attribute called nextlink (found in response). If this attribute is missing or null then it stops fetching the next page.
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH(
SRC=@'https://zappysys.com/downloads/files/test/pagination_nextlink_inarray_1.json'
,NextUrlAttributeOrExpr = '$.nextlink'  --keep reading until this attribute is missing. If attribute name contains dot then use brackets like this $.['my.attr.name']
)</pre>
<h3>Paginate by URL Parameter (Loop until certain StatusCode)</h3>
This example shows how to paginate API calls where you need to pass page number via URL. The driver keeps incrementing page number and calls next URL until the last page detected (401 error). There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/page-xml.aspx?page=1&amp;mode=DetectBasedOnResponseStatusCode'
,PagingMode='ByUrlParameter'
,PagingByUrlAttributeName='page'
,PagingByUrlEndStrategy='DetectBasedOnResponseStatusCode'
,PagingByUrlCheckResponseStatusCode=401
,IncrementBy=1
)</pre>
<h3>Paginate by URL Path (Loop until no record)</h3>
This example shows how to paginate API calls where you need to pass page number via URL Path. The driver keeps incrementing page number and calls next URL until the last page is detected. There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/cust-&lt;%page%&gt;.xml'
,PagingMode='ByUrlPath'
,PagingByUrlAttributeName='&lt;%page%&gt;'
,PagingByUrlEndStrategy='DetectBasedOnRecordCount'
,IncrementBy=1
)</pre>
<h3>Paginate by Header Link (RFC 5988)</h3>
API like GitHub / Wordpress use Next link in Headers (<a href="https://tools.ietf.org/html/rfc5988" target="_blank" rel="noopener">RFC 5988</a>)
<pre class="lang:default decode:true ">SELECT * FROM $
LIMIT 25
WITH(
	 Src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)</pre>
&nbsp;</div>
<h2>REST API / SOAP Web Service Connection Settings for MicroStrategy</h2>
<div class="content_block" id="custom_post_widget-3896"><div style="margin-bottom: 1em;">If you need to authenticate or authorize your user to access a web resource, you will need to use one of the <em>Connections:</em></div>
<ul>
 	<li>HTTP</li>
 	<li>OAuth</li>
</ul>
<img loading="lazy" decoding="async" class="wp-image-4078 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png" alt="ZappySys XML Driver - HTTP and OAuth Connection Types" width="577" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png 577w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252-300x157.png 300w" sizes="(max-width: 577px) 100vw, 577px" />
<h3>HTTP Connection</h3>
<div style="margin-bottom: 1em;">Use <em>HTTP Connection</em> for simple Windows, Basic, NTLM or Kerberos authentication. Just fill in a username and a password and you are good to go!</div>
<div style="margin-bottom: 1em;">You can also use <em>HTTP Connection</em> for more sophisticated authentication like:</div>
<ul>
 	<li><strong>SOAP WSS</strong> (when accessing a SOAP WebService)</li>
 	<li><strong>Static Token / API Key</strong> (when need to pass an API key in HTTP header)</li>
 	<li><strong>Dynamic Token</strong> (same as Static Token method except that each time you need to log in and retrieve a fresh API key)</li>
 	<li><strong>JWT Token</strong> (As per RFC 7519)</li>
</ul>
<img loading="lazy" decoding="async" class="alignnone wp-image-4091 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-1.png" alt="" width="622" height="570" />
<h3>OAuth</h3>
If you are trying to access REST API resource, it is a huge chance, you will need to use <em>OAuth Connection</em>. <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">Read this article</a> to understand how OAuth authentication and authorization works and how to use it (article originally was written for <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>, but the concepts and UI stay the same): <br/>
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/</a>
<img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-2.png" width="721" height="708" /></div>
<h2>Other settings for REST API / SOAP XML Call in MicroStrategy</h2>
<div class="content_block" id="custom_post_widget-3901">There are few settings you can coder while calling Web API
<h3><strong>API Limit / Throttling</strong></h3>
While calling public API or other external web services one important aspect you have to check,  how many requests are allowed by your API. Especially when you use API pagination options to pull many records you have to slow down based on API limits. For example, your API may allow you only 5 requests per second. Use Throttling Tab on Driver UI to set delay after each request.
<h3><strong>2D Array Transformation</strong></h3>
If you are using JSON or XML API Driver then possible you may have to transform your data using 2D array transformation feature. <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Check this link</a> for more information.

&nbsp;</div>
<h2>REST API / XML SOAP Performance Tips for MicroStrategy</h2>
<div class="content_block" id="custom_post_widget-4455">While calling APIs you may face some performance issues. There are a few tips you can consider to speed up things.
<h4><span style="font-size: 14pt;"><strong>Use Server-side filtering if possible in URL or Body Parameters</strong></span></h4>
Many API supports filtering your data by URL parameters or via Body. Whenever possible try to use such features.  Here is an example of <a href="http://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">odata API</a>, In the below query the first query is faster than the second query because in the first query we filter at the server.
<pre class="lang:tsql decode:true">SELECT * FROM value
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json&amp;$filter=Country eq ''USA'''
	,DataFormat='Odata'
)

-- Slow query - Client-side filtering
SELECT * FROM value
WHERE Country ='USA'
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json'
	,DataFormat='Odata'
)</pre>
<h4><span style="font-size: 14pt;"><strong>Avoid Special features in SQL Query (e.g. WHERE, Group By, Order By)</strong></span></h4>
ZappySys API engine triggers client-side processing if special features are used in Query. Following SQL Features will trigger Client-Side processing which is several times slower than server-side processing. So always try to use simple query (Select col1, col2 .... from mytable )
<ul>
 	<li>WHERE Clause</li>
 	<li>GROUP BY Clause</li>
 	<li>HAVING Clause</li>
 	<li>ORDER BY</li>
 	<li>FUNCTIONS (e.g. Math, String, DateTime, Regex... )</li>
</ul>
LIMIT clause does not trigger client-side processing.
<h4><span style="font-size: 14pt;"><strong>Consider using pre-generated Metadata / Cache File</strong></span></h4>
Use META option in WITH Clause to use static metadata (Pre-Generated)There are two more options to speedup query processing time. Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details.
<ol>
 	<li>
<pre class="lang:default decode:true">select * from value WITH( meta='c:\temp\meta.txt' )
--OR--
select * from value WITH( meta='my-meta-name' )
--OR--
select * from value WITH( meta='[ {"Name": "col1",&amp;nbsp;"Type": "String", Length: 100},&amp;nbsp;{"Name": "col2",&amp;nbsp;"Type": "Int32"} ...... ]' )</pre>
</li>
 	<li>Enable Data Caching Options (Found on <strong>Property Grid</strong> &gt; <strong>Advanced</strong> Mode Only )</li>
</ol>
<h4><span style="font-size: 14pt;"><strong>Consider using Metadata / Data Caching Option</strong></span></h4>
ZappySys API drivers support Caching Metadata and Data rows to speed up query processing. If your data doesn't change often then you can enable this option to speed up processing significantly.

Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details how to enable Data cache / metadata cache feature for datasource level or query level.

To define cache option at query level you can use like below.
<pre class="">SELECT * FROM $
WITH 
(  SRC='https://myhost.com/some-api'
  ,CachingMode='All'  --cache metadata and data rows both
  ,CacheStorage='File' --or Memory
  ,CacheFileLocation='c:\temp\myquery.cache'
  ,CacheEntryTtl=300 --cache for 300 seconds
)
</pre>
&nbsp;

&nbsp;
<h4><strong><span style="font-size: 14pt;">Use --FAST Option to enable Stream Mode</span></strong></h4>
ZappySys JSON / XML drivers support <strong>--FAST</strong> suffix for Filter. By using this suffix after Filter driver enables Stream Mode, <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/#Reading_Large_Files_Streaming_Mode_for_XML_JSON" target="_blank" rel="noopener">Read this article</a> to understand how this works.
<pre class="lang:default decode:true">SELECT * FROM $ 
LIMIT 10 --//add this just to test how fast you can get 10 rows
WITH(
  Filter='$.LargeArray[*]--FAST' --//Adding --FAST option turn on STREAM mode (large files)
 ,SRC='https://zappysys.com/downloads/files/test/large_file_100k_largearray_prop.json.gz'
 --,SRC='c:\data\large_file.json.gz'
 ,IncludeParentColumns='False'  --//This Must be OFF for STREAM mode (read very large files)
 ,FileCompressionType='GZip' --Zip or None (Zip format only available for Local files)
)</pre>
&nbsp;</div>
<h2>Calling SOAP Web Service in MicroStrategy</h2>
<div class="content_block" id="custom_post_widget-3870">To call SOAP API you need to know Request XML Body Structure. If you are not sure how to create SOAP Request body then no worries. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn how to generate SOAP Request body using the Free tool <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a>. Basically, you have to use SoapUI to generate Request XML and after that, you can replace parameters as needed in the generated body.
<h3>What is SOAP Web Service?</h3>
If you are new to SOAP Web Service sometimes referred as XML Web Service then please read some concept about SOAP Web service standard <a href="https://msdn.microsoft.com/en-us/library/ms996507.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener">from this link</a>

There are two important aspects in SOAP Web service.
<ol>
 	<li>Getting WSDL file or URL</li>
 	<li>Knowing exact Web Service URL</li>
</ol>
<h3>What is WSDL</h3>
In very simple term WSDL (often pronounced as whiz-dull) is nothing but a document which describes Service metadata (e.g. Functions you can call, Request parameters, response structure etc). Some service simply give you WSDL as xml file you can download on local machine and then analyze or sometimes you may get direct URL (e.g. http://api.mycompany.com/hr-soap-service/?wsdl )
<h3>Example SQL Query for SOAP API call using ZappySys XML Driver</h3>
Here is an example SQL query you can write to call SOAP API. If you not sure about many details then check next few sections on how to use XML Driver User Interface to build desired SQL query to POST data to XML SOAP Web Service without any coding.
<pre class="lang:tsql decode:true">SELECT * FROM $
WITH(
	 Src='http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx'
	,DataConnectionType='HTTP'
	,CredentialType='Basic' --OR SoapWss
	,SoapWssPasswordType='PasswordText'
	,UserName='myuser'
	,Password='pass$$w123'
	,Filter='$.soap:Envelope.soap:Body.GetHolidaysAvailableResponse.GetHolidaysAvailableResult.HolidayCode[*]'
	,ElementsToTreatAsArray='HolidayCode'	
	,RequestMethod='POST'	
	,Header='Content-Type: text/xml;charset=UTF-8 || SOAPAction: "http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable"'
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hol="http://www.holidaywebservice.com/HolidayService_v2/"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;hol:GetHolidaysAvailable&gt;
         &lt;!--type: Country - enumeration: [Canada,GreatBritain,IrelandNorthern,IrelandRepublicOf,Scotland,UnitedStates]--&gt;
         &lt;hol:countryCode&gt;UnitedStates&lt;/hol:countryCode&gt;
      &lt;/hol:GetHolidaysAvailable&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
Now let's look at steps to create SQL query to call SOAP API. Later we will see how to generate code for your desired programming language (e.g. C# or SQL Server)
<h3>Video Tutorial - Introduction to SOAP Web Service and SoapUI tool</h3>
Before we dive into details about calling SOAP API using ZappySys XML Driver, lets first understand what is SOAP API and how to create SOAP requests using SoapUI tool. You will learn more about this process in the later section. The video contains some fragment about using SOAP API in SSIS but just ignore that part because we will be calling Soap API using ZappySys ODBC Driver rather than SSIS Components.

&nbsp;

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/d_x5bgGjg0Y?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe>
<h3>Using SoapUI to test SOAP API call / Create Request Body XML</h3>
Assuming you have downloaded and installed <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI from here</a>, now we are ready to use WSDL for your SOAP Web Service Calls. If you do not have WSDL file or URL handy then contact your API provider (sometimes you just have to add <strong>?wsdl </strong>at the end of your Service URL to get WSDL so try that. Example: http://mycompany/myservice?wsdl ).

If you don't know what is WSDL then in short, WSDL is <strong>Web service Description Language</strong> (i.e. XML file which describes your SOAP Service). WSDL helps to craft SOAP API request Body for ZappySys XML Driver. So Let's get started.
<ol>
 	<li>Open SoapUI and click SOAP button to create new SOAP Project</li>
 	<li>Enter WSDL URL or File Path of WSDLFor example WSDL for our sample service can be accessed via this URL
<pre class="lang:default highlight:0 decode:true">http://www.dneonline.com/calculator.asmx?wsdl</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-import-wsdl-new-soapui-project.png"><img loading="lazy" decoding="async" class="size-full wp-image-3871" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-14.png" alt="Create new SOAP API Project in SoapUI tool for SOAP API Testing" width="486" height="349" /></a>
<div style="margin-bottom: 1em;">Create new SOAP API Project in SoapUI tool for SOAP API Testing</div></li>
 	<li>Once WSDL is loaded you will see possible operations you can call for your SOAP Web Service.</li>
 	<li>If your web service requires credentials then you have to configure it. There are two common credential types for public services (<strong>SOAP WSS</strong> or <strong>BASIC</strong> )
<ol>
 	<li>
<div style="margin-bottom: 1em;">To use <strong>SOAP WSS Credentials</strong> select request node and enter UserId, Password, and <strong>WSS-PasswordType</strong> (PasswordText or PasswordHash)</div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-soap-wss-credentials-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3872 alignnone" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)" width="294" height="544" /></a>
<div style="display: block;">Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)</div></li>
 	<li>To use <strong>BASIC Auth</strong> Credentials select request node and double-click it. At the bottom click on Auth (Basic) and From Authorization dropdown click Add New and Select Basic.<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-basic-authentication-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3873" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure Basic Authorization for SoapUI (SOAP API Testing Tool)" width="616" height="653" /></a>
<div style="margin-bottom: 1em;">Configure Basic Authorization for SoapUI (SOAP API Testing Tool)</div></li>
</ol>
</li>
 	<li>Now you can test your request first Double-click on the request node to open request editor.</li>
 	<li>Change necessary parameters, remove optional or unwanted parameters. If you want to regenerate request you can click on <strong>Recreate default request toolbar icon</strong>.
<a href="https://zappysys.com/blog/wp-content/uploads/2016/06/create-soap-request-with-optional-parameters-soapui.png"><img loading="lazy" decoding="async" class="size-full wp-image-2812" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-4.png" alt="Create SOAP Request XML (With Optional Parameters)" width="807" height="315" /></a>
<div style="margin-bottom: 1em;">Create SOAP Request XML (With Optional Parameters)</div></li>
 	<li>Once your SOAP Request XML is ready, <strong>Click the Play button</strong> in the toolbar to execute SOAP API Request and Response will appear in Right side panel.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soapui-test-soap-api-request-response-edit-xml-body.png"><img loading="lazy" decoding="async" class="size-full wp-image-3874" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-5.png" alt="Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)" width="1216" height="511" /></a>
Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)</li>
</ol>
<h3>Create DSN using ZappySys XML Driver to call SOAP API</h3>
Once you have tested your SOAP API in SoapUI tool, we are ready to use ZappySys XML driver to call SOAP API in your preferred BI tool or Programming language.
<ol>
 	<li>First open <strong>ODBC Data Sources</strong> (search ODBC in your start menu or go under ZappySys &gt; ODBC PowerPack &gt; <strong>ODBC 64 bit</strong>)</li>
 	<li>Goto <strong>System DSN</strong> Tab (or User DSN which is not used by Service account)</li>
 	<li>Click <strong>Add</strong> and Select ZappySys XML Driver
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-6.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" /></a>
ZappySys ODBC Driver for XML / SOAP API</li>
 	<li>Configure API URL, Request Method and Request Body as below
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3876" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-7.png" alt="ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body" width="916" height="874" /></a>
ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body</li>
 	<li><strong>(This step is Optional)</strong> If your SOAP API requires credentials then Select Connection Type to HTTP and configure as below.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-call-credential-basic-soap-wss-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3877" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-8.png" alt="ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)" width="564" height="483" /></a>
<div style="display: block;">ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)</div></li>
 	<li>Configure-Request Headers as below (You can get it from Request &gt; Raw tab from SoapUI after you test the request by clicking the Play button)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/set-soap-api-request-headers-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3881" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-9.png" alt="Configure SOAP API Request Headers - ZappySys XML Driver" width="1009" height="747" /></a>
Configure SOAP API Request Headers - ZappySys XML Driver</li>
 	<li>Once credentials entered you can select Filter to extract data from the desired node. Make sure to select array node (see special icon) or select the node which contains all necessary columns if you don't have array node.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-query-select-filter-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3882" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-10.png" alt="Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)" width="809" height="594" /></a>
Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)</li>
 	<li>If prompted select yes to treat selected node as Array (This is helpful when you expect one or more record for selected node)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/xml-api-array-handling-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3883" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-11.png" alt="Treat selected node as XML Array Option for SOAP API Response XML" width="655" height="572" /></a>
Treat selected node as XML Array Option for SOAP API Response XML</li>
</ol>
<h3>Preview SOAP API Response / Generate SQL Code for SOAP API Call</h3>
Once you configure settings for XML Driver now you can preview data or generate example code for desired language (e.g. C#, Python, Java, SQL Server).

Go to Preview tab and you will see default query generated based on settings you entered in previous sections. Attributes listed in WITH clause are optional. If you omit attribute in WITH clause it will use it from Properties tab.
<h3>Preview Data</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3884" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-12.png" alt="Preview SOAP API Response in ZappySys XML Driver" width="808" height="780" /></a>
Preview SOAP API Response in ZappySys XML Driver
<h3>Generate Code Option</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-driver-code-generator.png"><img loading="lazy" decoding="async" class="size-full wp-image-3885" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-13.png" alt="Generate Example Code for ZappySys Driver" width="572" height="618" /></a>
<div style="display: block;">Generate Example Code for ZappySys Driver</div></div>
<h2>Conclusion</h2>
<p>To conclude, we can say that the process to call REST API in MicroStrategy using ZappySys ODBC PowerPack is straightforward. With the REST API and Web service support, Microstrategy can connect to almost any source. If you liked this article and you want to try our product, you can download it <a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">here</a>.</p>
<h2>References</h2>
<p>Finally, if you need more information about the process to call REST API in MicroStrategy, refer to the following links:</p>
<ul>
<li><a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC PowerPack – Drivers for REST API, JSON, XML, SOAP</a></li>
<li><a href="https://www.microstrategy.com/us/get-started/desktop" target="_blank" rel="noopener">Get started with MicroStrategy Desktop</a></li>
<li><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/json-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">SQL Query Examples with ODBC ZappySys PowerPack</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/">How to call REST API in MicroStrategy (JSON / XML SOAP)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
