<?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>import Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/import/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/import/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 06 Mar 2024 23:53:14 +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>import Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/import/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to export REST API  to CSV using c# or Python</title>
		<link>https://zappysys.com/blog/how-to-export-rest-api-to-csv/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Sat, 30 Jun 2018 03:02:59 +0000</pubDate>
				<category><![CDATA[C# (CSharp)]]></category>
		<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4250</guid>

					<description><![CDATA[<p>Introduction to export REST API to CSV Export REST API to CSV is in some cases necessary to process the data because many tools can handle CSV files. In this new article, we will show different ways to export the data. The first example will do it using C#. The second example with use Python. Let&#8217;s take a [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/how-to-export-rest-api-to-csv/">How to export REST API  to CSV using c# or Python</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction to export REST API to CSV</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/REST-API-icon.jpg"><img decoding="async" class=" wp-image-4254 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/06/REST-API-icon-150x150.jpg" alt="Logo REST API" width="82" height="82" /></a>Export REST API to CSV is in some cases necessary to process the data because many tools can handle CSV files. In this new article, we will show different ways to export the data. The first example will do it using C#. The second example with use Python. Let&#8217;s take a look at these examples.</p>
<h2></h2>
<h2>Requirements to export REST API to CSV</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, you will require Visual Studio installed for the C# example.</li>
<li>Finally, it is necessary Python installed for the Python example.</li>
</ol>
<h3>Export REST API to CSV using C#</h3>
<p>C# is a pretty popular programing language. In the first example, we will show how to display the REST API information to a CSV file named. Let&#8217;s take a look at the code:</p>
<ol>
<li>First of all, we will connect to REST API using a connection to the following Data Path:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json</pre>
<pre class="crayon-plain-tag">using (OdbcConnection conn = 
      new OdbcConnection("Driver={ZappySys JSON Driver};DataPath='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json';"))</pre>
</li>
<li>Secondly, we create a connection using a file stream. We will save the results to a file in the c:\sql\sample.csv:<br />
<pre class="crayon-plain-tag">FileStream fs = new FileStream("C:\\sql\\sample.txt", FileMode.Create);
StreamWriter writer = new StreamWriter(fs);
StringBuilder output = new StringBuilder();</pre>
</li>
<li>Also, we will add a query to REST API. Note that with the ZappySys ODBC PowerPack, you can do a simple SQL query to get REST API data. This is pretty simple and intuitive:<br />
<pre class="crayon-plain-tag">OdbcCommand cmd = new OdbcCommand(
     @"SELECT  CustomerID,CompanyName FROM value", conn);</pre>
</li>
<li>In addition, we will read the data and close the connections:<br />
<pre class="crayon-plain-tag">conn.Close();  
writer.Close(); 
fs.Close();</pre>
</li>
<li>The complete code will be the following:<br />
<pre class="crayon-plain-tag">using System;
using System.IO;
using System.Data.Odbc;

public class Program
{
    public static void Main()
    {
        var outpath = @"C:\temp\sample.txt";

        using (var conn = new OdbcConnection("Driver={ZappySys JSON Driver};DataPath='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json';"))
        {
            conn.Open();
            var cmd = new OdbcCommand(@"SELECT CustomerID,CompanyName FROM $ WITH(Filter='$.value[*]')", conn);
            
            //Increases the timeout duration from the default 30 seconds, which may be insufficient in certain scenarios.
            cmd.CommandTimeout=600; // 600-seconds
            
            var rdr = cmd.ExecuteReader();

            using (var fs = new FileStream(outpath, FileMode.Create))
            {
                using (var writer = new StreamWriter(fs))
                {
                    //write file header
                    writer.WriteLine("CustomerID,CompanyName");

                    while (rdr.Read())
                    {
                        //write file row
                        writer.WriteLine("{0},{1}", rdr["CustomerID"], rdr["CompanyName"]);
                    }
                    conn.Close(); //close connection
                    writer.Close();
                    fs.Close();
                }
            }
        }

        //Read from file and display the content
        Console.Write(File.ReadAllText(outpath));

        Console.WriteLine("\r\n===== Press any key to end the program =====\r\n");
        Console.Read();
    }
}</pre>
&nbsp;</li>
<li>Finally, you will be able to see the file created:
<div id="attachment_4258" style="width: 160px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/REST-API-exported-to-CSV-file.png"><img decoding="async" aria-describedby="caption-attachment-4258" class="size-thumbnail wp-image-4258" src="https://zappysys.com/blog/wp-content/uploads/2018/06/REST-API-exported-to-CSV-file-150x150.png" alt="Export REST API to CSV" width="150" height="150" /></a><p id="caption-attachment-4258" class="wp-caption-text">REST API into CSV</p></div></li>
</ol>
<h3>Export REST API to CSV using Python</h3>
<p>Python is another really popular programming language. The popularity is growing a lot. In this example, we will learn how to Export REST API to CSV using Python.</p>
<ol>
<li>First of all, you will need to install Pip if not included in Python. Pip is Package Installer.<br />
For instructions about the installation, refer to <a href="https://pip.pypa.io/en/stable/installing/" target="_blank" rel="noopener">this link.</a></li>
<li>Secondly, you will also need the pyodbc. The pyodbc allows connecting to ODBC using Python. To install it go to the scripts folder of Python where Python is installed and run this command:pip install pyodbc.</li>
<li>Once that pyodbc is installed, we will run the following code:<strong>Full Code</strong><br />
<pre class="crayon-plain-tag">import csv
import pyodbc

conn = pyodbc.connect(
    r'DRIVER={ZappySys JSON Driver};'
    )
cursor = conn.cursor()	
rows = cursor.execute("SELECT CustomerID,CompanyName FROM value WHERE COUNTRY='Germany' WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json')") 
with open(r'C:\sql\cus2.csv', 'w', newline='') as csvfile:
    writer = csv.writer(csvfile)
    writer.writerow([x[0] for x in cursor.description])  
    for row in rows:
        writer.writerow(row)</pre>
</li>
<li>Now lets&#8217;s understand parts of above code. We have used the csv and pyodbc modules in the code:<br />
<pre class="crayon-plain-tag">import csv
import pyodbc</pre>
</li>
<li>Also, we connect to the <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC Driver</a>:<br />
<pre class="crayon-plain-tag">conn = pyodbc.connect(
r'DRIVER={ZappySys JSON Driver};'
)</pre>
</li>
<li>In addition, we have used a cursor to get the rows and send a SQL query to get data from the REST API:<br />
<pre class="crayon-plain-tag">cursor = conn.cursor() 
rows = cursor.execute("SELECT CustomerID,CompanyName FROM value 
WHERE Country='Germany' WITH 
(SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json')")</pre>
</li>
<li>Following code is to open the CSV file stream:<br />
<pre class="crayon-plain-tag">with open(r'C:\sql\customer.csv', 'w', newline='') as csvfile:</pre>
</li>
<li>Finally, we will write the data from REST API into the CSV file:<br />
<pre class="crayon-plain-tag">writer = csv.writer(csvfile)
writer.writerow([x[0] for x in cursor.description]) 
for row in rows:
writer.writerow(row)</pre>
</li>
<li>To conclude, if everything is OK, you will be able to see the created CSV file:
<div id="attachment_4264" style="width: 160px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/CSV-file-created.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4264" class="size-thumbnail wp-image-4264" src="https://zappysys.com/blog/wp-content/uploads/2018/06/CSV-file-created-150x106.png" alt="REST API ODBC Python" width="150" height="106" /></a><p id="caption-attachment-4264" class="wp-caption-text">Python code REST API</p></div>
<div class="mceTemp"></div>
</li>
</ol>
<h2></h2>
<h2>Using ODBC DSN in Connection String</h2>
<p>So far we have seen DSN less connection string approach for ODBC Driver but now lets look at another way to use ODBC Driver in your C# or Python code. You can define many settings on DSN Datasource rather than setting in the ConnectionString.</p>
<h3>Configure DSN for REST API Connection</h3>
<ol>
<li>First of all, we will access the following URL:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Orders?$format=json</pre>
</li>
<li>Secondly, in the windows start menu, Search for “ODBC” open the ODBC Data Sources.</li>
<li>Also, in the ODBC Administrator, press Add and select the ZappySys JSON<br />
Driver:</p>
<div id="attachment_4421" style="width: 471px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4421" class="wp-image-4421 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver.png" alt="REST API ODBC " width="461" height="346" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver.png 461w, https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver-300x225.png 300w" sizes="(max-width: 461px) 100vw, 461px" /></a><p id="caption-attachment-4421" class="wp-caption-text">Add ODBC JSON</p></div></li>
<li>Finally, specify the URL of step 1 and save the configuration:
<div id="attachment_4422" style="width: 812px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/Qlik-odata-url-odbc.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4422" class="size-full wp-image-4422" src="https://zappysys.com/blog/wp-content/uploads/2018/07/Qlik-odata-url-odbc.png" alt="REST API" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/Qlik-odata-url-odbc.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/07/Qlik-odata-url-odbc-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/Qlik-odata-url-odbc-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a><p id="caption-attachment-4422" class="wp-caption-text">URL ODBC</p></div></li>
</ol>
<h3>Using ODBC DSN in C# Code</h3>
<p>Now to use ODBC DSN you created simply change our previous C# Code as below (Just one line)</p><pre class="crayon-plain-tag">using (var conn = new OdbcConnection("DSN=Your-DSN-Name-Goes-Here"))
{
    conn.Open();
    ...........
    ...........
    ...........</pre><p>
<div id="attachment_4467" style="width: 883px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/call-rest-api-in-csharp-odbc-json-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4467" class="size-full wp-image-4467" src="https://zappysys.com/blog/wp-content/uploads/2018/06/call-rest-api-in-csharp-odbc-json-driver.png" alt="Using ODBC DSN in C# code to call REST API" width="873" height="598" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/call-rest-api-in-csharp-odbc-json-driver.png 873w, https://zappysys.com/blog/wp-content/uploads/2018/06/call-rest-api-in-csharp-odbc-json-driver-300x205.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/call-rest-api-in-csharp-odbc-json-driver-768x526.png 768w" sizes="(max-width: 873px) 100vw, 873px" /></a><p id="caption-attachment-4467" class="wp-caption-text">Using ODBC DSN in C# code to call REST API</p></div>
<h3>Using ODBC DSN in Python Code</h3>
<p>Now to use ODBC DSN you created simply change our previous C# Code as below (Just one line)</p><pre class="crayon-plain-tag">conn = pyodbc.connect(
    r'DSN=Your-DSN-name-Goes-Here;'
    )
	
	...........
	...........
	...........</pre><p>
&nbsp;</p>
<h2><span id="ZappySys_JSON_REST_API_Driver_Query_Examples">ZappySys JSON /REST API Driver Query Examples</span></h2>
<p>Reading from XML files or API can be done using the same way as previous sections except you have to use ZappySys XML Driver. Read help file here to <a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/json-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">see json query examples</a>.</p>
<h2><span id="ZappySysXML_SOAP_Driver_Query_Examples">ZappySys XML / SOAP Driver Query Examples</span></h2>
<p>Reading from XML files or API can be done using the same way as previous sections except you have to use ZappySys XML Driver. Read help file here to <a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/xml-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">see xml query examples</a>.</p>
<h2></h2>
<h2>Conclusion</h2>
<p>To conclude, in this article, we show how to access REST API using C# and Python. We used the ZappySys ODBC PowerPack that allows accessing to REST API data and JSON files using SQL queries. It is possible to create simple SQL queries and access the data. It is also possible to access to XML files and Web API with this tool. If you liked this tool you can test the <a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">ZappySys ODBC PowerPack here</a>.</p>
<h2>References</h2>
<p>Finally, if you want to read more about this topic, refer to these links:</p>
<ul>
<li><a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">Download ZappySys ODBC PowerPack Installer</a></li>
<li><a href="https://support.microsoft.com/en-us/help/310988/how-to-use-the-odbc-net-managed-provider-in-visual-c-net-and-connectio" target="_blank" rel="noopener">How To Use the ODBC .NET Managed Provider in Visual C# .NET and Connection Strings</a></li>
<li><a href="https://wiki.python.org/moin/ODBC" target="_blank" rel="noopener">Python ODBC Wiki</a></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/how-to-export-rest-api-to-csv/">How to export REST API  to CSV using c# or Python</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to import REST API in Power BI (Load JSON / SOAP XML)</title>
		<link>https://zappysys.com/blog/howto-import-json-rest-api-power-bi/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 07 Mar 2018 03:38:27 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Power BI]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[power bi]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=2822</guid>

					<description><![CDATA[<p>Introduction In this article, we will learn how to import REST API in Power BI. 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 [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/">How to import REST API in Power BI (Load JSON / SOAP XML)</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/03/json-to-power-biimport-export.png"><img loading="lazy" decoding="async" class="alignleft wp-image-2900 size-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-power-biimport-export-150x150.png" alt="Introduction icon json to power bi" width="150" height="150" /></a></p>
<p>In this article, we will learn how to <strong>import REST API in Power BI</strong>.</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>The following video will show how to import REST API in Power BI (JSON or XML Data):<br />
[youtube https://www.youtube.com/watch?v=-3OPfhMY1aI&amp;w=720&amp;h=405]
<h2 style="text-align: left;">Requirements</h2>
<ol>
<li>First, you will need to have <a href="https://powerbi.microsoft.com/en-us/desktop/" target="_blank" rel="noopener">Power BI Desktop (FREE)</a> installed</li>
<li>In the second place, you will need to have internet access</li>
<li>On third place, our <a href="https://zappysys.com/products/odbc-powerpack/">ZappySys ODBC Power Pack</a></li>
</ol>
<h2>Step-by-Step: Import REST API into Power BI</h2>
<p>We&#8217;ll walk through the steps to import a REST API into Power BI. The steps outlined below focus on working with JSON APIs, but the same principles can be applied when importing SOAP XML Web Services or local JSON/XML files.</p>
<p>For demonstration purposes, we will utilize a REST API to retrieve data in JSON format. The example URL we&#8217;ll use is:</p><pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json</pre><p>
This URL leverages OData and presents information in JSON format. Our objective is to use the ZappySys ODBC Power Pack to establish a connection to this URL and retrieve the information seamlessly into Power BI.</p>
<h3>Create ODBC DSN &#8211; JSON Driver</h3>
<div class="content_block" id="custom_post_widget-3331">Once <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> is installed our next step is to Create and configure ODBC DSN. For example purpose, we will use ZappySys JSON Driver but steps are identical for most of ZappySys ODBC Drivers (e.g. XML Driver or CSV Driver)
<ol>
 	<li>Search for "odbc" in your start menu and click on ODBC (64 bits).
* If you cant find this then you can also go to <span class="lang:default highlight:0 decode:true crayon-inline">Start Menu &gt; ZappySys &gt; ODBC PowerPack &gt; Click on ODBC Data Sources (64-Bit)</span>. If you don't see ODBC 64 bit then most likely you are running 32-bit OS (So just click first ODBC Data Source)
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/odbc-data-source-64-bits.png"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/blog/wp-content/uploads/2018/03/odbc-data-source-64-bits.png" alt="Open ODBC Data Source" width="340" height="434" /></a>
<p class="wp-caption-text">Open ODBC Data Source</p>

</div></li>
 	<li>Go to <strong>User DSN Tab</strong> and press <strong>Add</strong>. If your DSN needs to be accessed by all users or some service account (like SQL Task Scheduler) then click on <a href="https://zappysys.com/blog/wp-content/uploads/2018/03/odb-data-source-administrator-add.png" target="_blank" rel="noopener">System Tab</a> rather than User Tab.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/add-new-data-source-odbc-administrator.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-new-data-source-odbc-administrator.png" alt="Create new ODBC DSN (User DSN Tab)" />
</a>
<p class="wp-caption-text">Create new ODBC DSN (User DSN Tab)</p>

</div></li>
 	<li>Add the ZappySys JSON Driver. It is installed with the ZappySys ODBC PowerPack.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/add-zappysys-json-driver.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-zappysys-json-driver.png" alt="Add ZappySys JSON / REST Driver Connection" />
</a>
<p class="wp-caption-text">Add ZappySys JSON / REST Driver Connection</p>

</div></li>
 	<li>Enter a name for the Data source and configure other necessary properties (e.g. URL / Credentials). You can configure properties in two different modes (<strong>Simple Mode (Default)</strong> or <strong>Advanced Mode</strong>). For Our JSON Driver Example enter URL and Set Data Format as <strong>OData</strong> (For Simple Mode Check Input / Output Format Tab, For Advanced Mode Check. HTTP Advanced Settings). <strong> If your API is not OData compliant or you are not sure then keep it DEFAULT</strong>.
<pre class="lang:default highlight:0 decode:true">https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json</pre>
&nbsp;
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/configure-odbc-dsn-rest-api-connection-simple-view.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/05/powerbi1.png" alt="Configure API Connection - Simple Mode (User Interface Mode)" />
</a>
<p class="wp-caption-text">Configure API Connection - Simple Mode (User Interface Mode)</p>

</div>
&nbsp;</li>
 	<li>Here is the Advanced view with all properties in Grid mode.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/configure-odbc-dsn-rest-api-connection-advanced-view.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/05/powerbi2.png" alt="Configure API Connection - Advanced Mode (Property Grid Mode)" />
</a>
<p class="wp-caption-text">Configure API Connection - Advanced Mode (Property Grid Mode)</p>

</div></li>
 	<li>Finally, you can go to preview tab. Click on the select table to generate your default SQL Query for API service and press <strong>Preview data</strong> to see the magic :).When you click Preview data it parses your SQL Query and sends HTTP Request to fetch Data from JSON service. Once the response is returned it parse nested JSON structure and turns into rows/columns.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-select-table-preview.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/05/powerbi4.png" alt="Select Table for preview" />
</a>
<p class="wp-caption-text">Select Table for preview</p>

</div>
&nbsp;</li>
 	<li>
<div style="display: block; margin-bottom: 1em;">Once you select Table name from drop down, UI generates default query for you with all possible column names for selected table like below.</div>
<div style="margin-bottom: 1em;"><strong>Sample Query</strong></div>
<pre class="lang:tsql decode:true">select 
	"CustomerID",
	"CompanyName",
	"ContactName",
	"ContactTitle",
	"Address",
	"City",
	"Region",
	"PostalCode",
	"Country",
	"Phone",
	"Fax"
 from [value]</pre>
&nbsp;</li>
 	<li>To review more examples, make sure to <strong>click on View Examples</strong> button to see many more ways to call API services and extract/transform data
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/examples-call-rest-api-json-sql-server-zappysys-odbc-driver.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/05/powerbi3.png" alt="ZappySys ODBC Driver Examples - Call JSON / REST API" />
</a>
<p class="wp-caption-text">ZappySys ODBC Driver Examples - Call JSON / REST API</p>

</div></li>
 	<li>Now last thing you can try is use Query Builder. Query Builder is an easy way to Build Queries by Overriding certain setting defined on DSN. ZappySys API SQL Query language support WITH Clause which can override settings defined on DSN UI. Usually you can Define Connection related settings on DSN and override Dynamic Settings in your SQL Query so you dont have to create many DSN for each API URL.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/zappysys-api-sql-query-builder.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/05/powerbi5.png" alt="Using API SQL Query Builder" />
</a>
<p class="wp-caption-text">Using API SQL Query Builder</p>

</div></li>
</ol>
<strong>Transfer DSN settings</strong>

There will be a time when you like to create similar ODBC DSN on a totally different machine. If you wish to copy settings of one DSN to different DSN then you can use Load Connection String Feature.

First copy Connection string produced by UI settings on DSN configuration by clicking <strong>Copy Connection String Button</strong> (Found at the bottom of UI). Then you can go to new DSN and click Load connection string to new DSN by clicking <strong>Load Connection String Button</strong>.

<strong>Understanding ODBC Connection String Format</strong>

ZappySys ODBC Drivers can be called in two different ways from your Application (e.g. <a href="https://zappysys.com/blog/calling-rest-api-in-c/" target="_blank" rel="noopener">C#</a>, <a href="https://zappysys.com/blog/set-rest-python-client/" target="_blank" rel="noopener">Python</a>, <a href="https://zappysys.com/blog/connect-java-to-rest-api-json-soap-xml/" target="_blank" rel="noopener">JAVA</a> )
<ol>
 	<li>Using <strong>Driver Name</strong> in the Connection String (You can use Copy Connection String option)</li>
 	<li>Using <strong>DSN Name</strong> in the Connection String</li>
</ol>
<strong>Using Driver Name in the Connection String</strong>

<strong>Syntax:</strong>
<pre class="lang:default highlight:0 decode:true">DRIVER={DRIVER-NAME-GOES-HERE}[;Prop1=xxxxxx][;Prop2=xxxxxx] .... [;PropN=xxxxxx]</pre>
<strong>Examples:</strong>
<pre class="lang:default highlight:0 decode:true">DRIVER={ZappySys JSON Driver}
DRIVER={ZappySys JSON Driver};DataPath='c:\mydata.json'
DRIVER={ZappySys XML Driver};DataPath='http://myserver/api/xml/getOrders'
DRIVER={ZappySys XML Driver};DataPath='c:\mydata.xml'</pre>
<strong>Using DSN Name in the Connection String</strong>

<strong>Syntax:</strong>
<pre class="lang:default highlight:0 decode:true">DRIVER={DRIVER-NAME-GOES-HERE}[;Prop1=xxxxxx][;Prop2=xxxxxx] .... [;PropN=xxxxxx]</pre>
<strong>Examples:</strong>
<pre class="lang:default highlight:0 decode:true">DSN=MyJsonAPI_DSN
DSN=MyJsonAPI_DSN;DataPath='http://myserver/api/json/getOrders'</pre></div>
<h3>Connect to REST API data source in Power BI (Connect JSON / XML data)</h3>
<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>
<h3>Publish Power BI dashboard</h3>
<ol>
<li>In order to publish the report, press <strong>Publish</strong></li>
<li>Press <strong>Save</strong>
<div id="attachment_2839" style="width: 467px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/save-power-bi-report.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2839" class="size-full wp-image-2839" src="https://zappysys.com/blog/wp-content/uploads/2018/03/howto-import-json-rest-api-power-bi-1.png" alt="Save changes in power bi" width="457" height="159" /></a><p id="caption-attachment-2839" class="wp-caption-text">Save changes in Power BI<span style="font-size: 16px;">:</span></p></div>
<p>&nbsp;</li>
<li><span style="font-size: 16px;">Select a workspace for the report</span>
<div id="attachment_2838" style="width: 604px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/publish-Power-bi-select-workplace.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2838" class="size-full wp-image-2838" src="https://zappysys.com/blog/wp-content/uploads/2018/03/howto-import-json-rest-api-power-bi-2.png" alt="choose power bi workplace" width="594" height="340" /></a><p id="caption-attachment-2838" class="wp-caption-text">Select Power BI workplace<span style="font-size: 16px;">.</span></p></div></li>
<li>And that is all. You have now your report ready.</li>
</ol>
<h2></h2>
<h2>Import data using ODBC ConnectionString (DSN-less)</h2>
<p>Let&#8217;s explore the process of importing data using the ODBC Driver without the need for configuring an ODBC DSN.</p>
<p>When importing data, you have the option to either use an ODBC DSN or a Direct ConnectionString. This section will guide you through the steps of utilizing the ODBC ConnectionString.</p>
<p>After opting for the ODBC option to retrieve data, you will encounter the &#8220;Select ODBC Data Source&#8221; screen. To proceed without a DSN, follow these steps:</p>
<ol>
<li>Change the DSN dropdown to &#8220;(none).&#8221;</li>
<li>Enter the full ODBC ConnectionString, adhering to the syntax below. You can construct your own connection string using the ODBC Driver UI and utilize the &#8220;Copy ConnectionString&#8221; option.<br />
<strong>Syntax:</strong>  <pre class="crayon-plain-tag">Driver={Your Driver Name}[;Property1=value][;Property2=value]......</pre></li>
<li>Here is a screenshot with ConnectionString Setting
<div id="attachment_9388" style="width: 824px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-dsnless-import-odbc-connectionstring.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9388" class="size-full wp-image-9388" src="https://zappysys.com/blog/wp-content/uploads/2018/03/howto-import-json-rest-api-power-bi-3-1.png" alt="Import Data from ODBC Driver - DSN less mode (Use Connection String)" width="814" height="716" /></a><p id="caption-attachment-9388" class="wp-caption-text">Import Data from ODBC Driver &#8211; DSN less mode (Use Connection String)</p></div></li>
<li>Click &#8220;Next&#8221; to select the authentication method. Choose &#8220;Windows&#8221; and input the password value if necessary. If your connection string already includes the Password attribute, there&#8217;s no need to worry.
<div id="attachment_9389" style="width: 718px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-odbc-connectionstring-enter-password.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9389" class="size-full wp-image-9389" src="https://zappysys.com/blog/wp-content/uploads/2018/03/howto-import-json-rest-api-power-bi-4.png" alt="Import Data from ODBC Driver - using Connection String - With Password Attribute" width="708" height="383" /></a><p id="caption-attachment-9389" class="wp-caption-text">Import Data from ODBC Driver &#8211; using Connection String &#8211; With Password Attribute</p></div></li>
</ol>
<h2>POST data to REST API URL</h2>
<p>Up until now, we&#8217;ve explored the process of fetching data from URLs and importing it into Power BI. However, in certain scenarios, APIs may necessitate the use of the PUT or POST method. These methods involve submitting parameters in the body and receiving a response.</p>
<p>For a more in-depth understanding of how to seamlessly POST data to a URL in Power BI, watch the informative video below.</p>
<a href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FK7qV_PJup1g%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<h2>Calling XML SOAP Web Service in Power BI</h2>
<p>So far, we have looked at examples to consume data using JSON driver. Now let&#8217;s look at an example, to call XML SOAP Web Service in Power BI.</p>
<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>SOAP / REST API pagination in Power BI</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>SOAP / REST API Error Handling in Power BI</h2>
<div class="content_block" id="custom_post_widget-3894">Sometimes errors occur... they just do and there is nothing you can do! Or can you? Actually, in ODBC PowerPack you can handle them in two ways.
<h3>METHOD 1 - Using Error Handling Options</h3>
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3949" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-error-handling-1.png" alt="" width="668" height="702" />
<h4>When to use?</h4>
You may want to use them when your source is a resource located on the Internet; e.g. a file on a website, a file on an FTP server or just a plain API HTTP response. By default, when a remote server returns an error, data retrieval is stopped, an error is raised and no data is given back to you. This might not be always desirable.
<h4>Scenario 1</h4>
Imagine a scenario, that there is a web server which each day at 12 AM releases a new JSON file with that day's date as filename, e.g. <span style="text-decoration: underline;"><em>http://www.some-server.com/data/2018-06-20.json</em></span>. And, of course, you want to download it and use it daily in your Power BI report. But you have a problem: Power BI report data sources are refreshed each hour and you may get <a href="https://en.wikipedia.org/wiki/HTTP_404" target="_blank" rel="noopener">HTTP 404 status code</a> (no file was found) when a file is not released yet. Which consequentially means other data sources won't be updated as well and you will see old and cached data on the report. That's where you could use <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue on any error</span></strong> or <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue when Url is invalid or missing (404 Errors)</span></strong> to avoid an error being raised and let other data sources to be updated.
<h4>Scenario 2</h4>
Another scenario is when you expect a web server to raise some kind of HTTP error when accessing a URL. You don't want ODBC Data Source to raise an error but instead, you want to get response data. That's where you can use <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue on any error</span></strong> or alike together with  <strong><span class="lang:default highlight:0 decode:true crayon-inline">Get response data on error</span></strong> to continue on an error and get the data:

<img loading="lazy" decoding="async" class="alignnone wp-image-3961 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error.png" alt="" width="547" height="235" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error.png 547w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error-300x129.png 300w" sizes="(max-width: 547px) 100vw, 547px" />
<h3>METHOD 2 - Using Connection [Retry Settings]</h3>
Another scenario you may run into is a buggy web server. You ask it to give you some file or data and it, like a snotty kid, just doesn't give it to you! You have to ask twice or thrice before it does its job. If that's the case, you have to retry HTTP requests using <em>Connection</em>:

<img loading="lazy" decoding="async" class="alignnone wp-image-3963 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-error-handling-3.png" alt="" width="671" height="572" /></div>
<h2>Security / Connection Types (Options for HTTP, OAuth, SOAP) in Power BI</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>
<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>Import data into Power BI from SQL Query</h2>
<p>If you prefer to import data from an SQL query instead of selecting a table name, you can leverage advanced options during the import steps. Here&#8217;s a step-by-step guide:</p>
<ol>
<li>After selecting the DSN, proceed to the import steps.</li>
<li>Click on the &#8220;Advanced Options&#8221; to access the SQL Query editor.</li>
</ol>
<p>By utilizing these advanced options, you gain the flexibility to tailor your import process by specifying custom SQL queries to retrieve the exact data you need.</p>
<div id="attachment_3120" style="width: 395px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-rest-api-sql-query-odbc-data-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3120" class="size-full wp-image-3120" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-rest-api-sql-query-odbc-data-source.png" alt="Import data into Power BI using SQL Query (ODBC Data source)" width="385" height="316" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-rest-api-sql-query-odbc-data-source.png 385w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-rest-api-sql-query-odbc-data-source-300x246.png 300w" sizes="(max-width: 385px) 100vw, 385px" /></a><p id="caption-attachment-3120" class="wp-caption-text">Import data into Power BI using SQL Query (ODBC Data source)</p></div>
<h2>Edit Query / Using Parameters in Power BI (Dynamic Query)</h2>
<div class="content_block" id="custom_post_widget-3954">In the real world, many values of your REST / SOAP API call may be coming from Parameters. If that's the case for you can try to edit script manually as below. In below example its calling SQL Query with POST method and passing some parameters. Notice below where paraAPIKey is Power BI Parameter (string type). You can use parameters anywhere in your script just like the normal variable.
<p />
<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-odbc-sql-query-pass-parameters-dynamically.png"><img loading="lazy" decoding="async" class="wp-image-3121 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-odbc-sql-query-pass-parameters-dynamically.png" alt="Import REST API in Power BI - Using parameters in SQL Query (Edit code - Advanced Mode)" width="629" height="467" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-odbc-sql-query-pass-parameters-dynamically.png 629w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-import-odbc-sql-query-pass-parameters-dynamically-300x223.png 300w" sizes="(max-width: 629px) 100vw, 629px" /></a>
<p />
&nbsp;
<pre class="lang:default highlight:0 decode:true">let
    vKey=paraAPIKey,
    Source = Odbc.Query(
"dsn=ZS - OData Customers", 
"SELECT * FROM $ WITH (SRC='http://httpbin.org/post'," 
&amp; "METHOD='POST'," 
&amp; "HEADER='Content-Type:application/json'," 
&amp; "BODY=@'{""CallerId"":1111, ""ApiKey"":""" &amp; vKey &amp; """}')")
in
    Source</pre>
&nbsp;
</div>
<h2>Edit Query Settings after Import</h2>
<p>There will be a time you need to change initial Query after dataset import in Power BI. Not to worry, just follow these steps to edit your SQL.</p>
<div id="attachment_3947" style="width: 829px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3947" class="size-full wp-image-3947" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import.png" alt="Edit Power BI Data Source SQL after SOAP Web Service Import" width="819" height="502" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import.png 819w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import-300x184.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-edit-data-source-query-after-import-768x471.png 768w" sizes="(max-width: 819px) 100vw, 819px" /></a><p id="caption-attachment-3947" class="wp-caption-text">Edit Power BI Data Source SQL after REST / SOAP Web Service Import</p></div>
<div class="content_block" id="custom_post_widget-7081"><h2>Using DirectQuery Option rather than Import</h2>
So far we have seen how to Import REST API data into Power BI but what if you have too much data and you dont want to import but link it. Power BI Offers very useful feature for this scenario. Its  called <a href="https://docs.microsoft.com/en-us/power-bi/desktop-use-directquery" target="_blank" rel="noopener">DirectQuery</a> Option. In this section we will explore how to use DirectQuery along with ZappySys Drivers.

Out of the box ZappySys Drivers wont work in ODBC Connection Mode so you have to use SQL Server Connection rather than ODBC if you wish to use Live data using DirectQuery option. See below step by step instructions to enable DirectQuery mode in Power BI for REST API data.

Basically we will use <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/">ZappySys Data Gateway</a> its part of ODBC PowerPack. We will then use Linked Server in SQL Server to Link API Service and then we will issue OPENROWSET queries from Power BI to SQL Server and it will then call REST API via ZappySys Data Gateway.
<h3>Step-By-Step</h3>
<ol>
 	<li>First <a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">read this article carefully</a> how to query REST API in SQL Server.</li>
 	<li>Once linked server is configured we are ready to issue API query in Power BI.</li>
 	<li>Click <strong>Get Data</strong> in Power BI, select <strong>SQL Server Database</strong></li>
 	<li>Enter your server name and any database name</li>
 	<li>Select Mode as <strong>DirectQuery</strong></li>
 	<li>Click on <strong>Advanced</strong> and enter query like below (we are assuming you have created JSON Data Source in Data Gateway and defined linked server (Change name below).
<pre>select * from OPENQUERY(YOUR_LINKED_SERVER_NAME,
'SELECT * FROM value WITH( SRC=''https://services.odata.org/V3/Northwind/Northwind.svc/Orders?$format=json''  )'
)</pre>

<div class="wp-caption alignnone">
 <a   href="https://zappysys.com/blog/wp-content/uploads/2019/05/power-bi-directquery-option-import-rest-api.png">
  <img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/05/power-bi-directquery-option-import-rest-api.png"
         alt="DirectQuery option for Power BI (Read REST API Data Example using SQL Server Linked Server and ZappySys Data Gateway)" >
 </a> 
<p class="wp-caption-text">DirectQuery option for Power BI (Read REST API Data Example using SQL Server Linked Server and ZappySys Data Gateway)</p>
</div>

</li>
 	<li>Click OK and Load data ... That's it. Now your REST API data is linked rather than imported.</li>
</ol></div>
<h2>Performance Tips for REST API / XML SOAP Calls</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>
<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>In this article, we guide you through the process of configuring the ZappySys Power Pack, focusing on the ZappySys driver for JSON. This driver is instrumental in extracting data from REST APIs or JSON files. Follow these steps to seamlessly add the extracted data to Power BI and generate insightful reports.</p>
<p>Additionally, we&#8217;ll walk you through the configuration of the Power BI gateway, ensuring that the data is refreshed on a specified schedule for up-to-date and accurate reporting. To try this configuration yourself, <a href="//zappysys.com/products/odbc-powerpack/download/">download ODBC PowerPack</a> and embark on a journey of efficient data extraction and reporting.</p>
<h2>References</h2>
<ul>
<li><a href="https://powerbi.microsoft.com/en-us/">What is Power BI?</a></li>
<li><a href="https://powerbi.microsoft.com/en-us/gateway/">Keep your dashboards and reports up-to-date with your on-premises data sources</a></li>
<li><a href="https://www.youtube.com/watch?v=PL7wffKeOrc">Power BI &#8211; Read REST API / JSON File / XML File / SOAP (Pagination, OAuth, OData)</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/">How to import REST API in Power BI (Load JSON / SOAP XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to import JSON to Excel (Load File, REST API, SOAP XML)</title>
		<link>https://zappysys.com/blog/import-json-excel-load-file-rest-api/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 02 Mar 2018 13:41:33 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Excel]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[rest]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=2677</guid>

					<description><![CDATA[<p>Introduction In this post, we will learn how to import JSON to Excel.  We will use ODBC PowerPack to connect and query a JSON file. This article also covers creating Excel from SOAP XML Web Service so read full article to learn about SOAP API Export. JSON stands for Java Script Object Notation and it [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/">How to import JSON to Excel (Load File, REST API, SOAP XML)</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/03/json-to-excel-import-export.png"><img loading="lazy" decoding="async" class="alignleft wp-image-2845" src="https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export-300x300.png" alt="json to excel" width="130" height="130" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export.png 343w" sizes="(max-width: 130px) 100vw, 130px" /></a></p>
<p>In this post, we will learn how to import JSON to Excel.  We will use <a href="https://zappysys.com/products/odbc-powerpack/">ODBC PowerPack</a> to connect and query a JSON file. This article also covers creating Excel from <strong>SOAP XML Web Service</strong> so read full article to learn about SOAP API Export.</p>
<p>JSON stands for Java Script Object Notation and it is an Open and Standard format to read object with attributes and values.  JSON is replacing XML because it is faster to read data, it is easier to parse data, it does not require end tags, it is shorter and it can use arrays.</p>
<p>We will load the data using the ZappySys JSON driver and then upload the data in Excel.</p>
<h2></h2>
<h2>Requirements</h2>
<p>This article assumes following requirements are met before you can follow the steps listed in this article.</p>
<ol>
<li>Make sure that Microsoft Excel installed</li>
<li>Also, the driver <a href="https://zappysys.com/products/odbc-powerpack/download/">ODBC PowerPack</a> installed</li>
</ol>
<h2>Video Tutorial</h2>
<p>Let’s take a look to this step by step tutorial.<br />
<a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2Fiwezz0Z3D4U%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<h2>An introduction to Rest API and OData</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 to handle the interoperability betwee computers and 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><pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc</pre><p>
<ol>
<li>By default the data is displayed in XML format. To show the data in JSON use this URL:</p><pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/?$format=json</pre><p>
</li>
<li>There are collections of data like Categories, CustomerDemographic, Customers, etc. For example the following URL will show the data of the categories collection:</p><pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Categories?$format=json</pre><p>
</li>
<li>In the next steps, we will use ZappySys drivers to connect to this URL and query using OData.</li>
</ol>
<p>&nbsp;</p>
<h2>Configure ODBC DSN for ZappySys JSON Driver</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}; &#8230;&#8230;..</strong> )</li>
</ol>
<p>In this article, we will use 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><strong><strong><strong><strong>ODBC Data sources (32 bits)</strong></strong></strong></strong></strong>
<div id="attachment_2780" style="width: 403px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2780" class="wp-image-2780 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png" alt="Open ODBC Data source" width="393" height="531" /></a><p id="caption-attachment-2780" class="wp-caption-text">Open ODBC Data Source</p></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 alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png"><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>
<p>&nbsp;</li>
<li>In this step, create new data source, select <strong><strong>ZappySys ODBC Driver.</strong></strong>
<div id="attachment_2772" style="width: 310px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2772" class="size-medium wp-image-2772" src="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver-300x225.png" alt="add new zappysys" width="300" height="225" /></a><p id="caption-attachment-2772" class="wp-caption-text">Add new zappysys json driver</p></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 local file path as Data Source</p>
<p>For single file:  c:\data\myfile_1.json<br />
For multiple files: c:\data\myfile_*.json</li>
<li>Expand <strong>Other settings</strong> and in Data Format, select <strong>OData. </strong>Press <strong><strong><strong><strong><strong>OK.</strong></strong></strong></strong></strong>
<div id="attachment_2768" style="width: 621px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-json-driver-properties-odata.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2768" class="wp-image-2768 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-json-driver-properties-odata.png" alt="" width="611" height="623" /></a><p id="caption-attachment-2768" class="wp-caption-text">OData properties json driver</p></div></li>
</ol>
<h2>How to import REST API data to Excel</h2>
<ol>
<li>In Excel, go to <strong>Data</strong> Ribbon and select <strong>From Other Sources</strong> and <strong>From Microsoft Query</strong>.
<div id="attachment_2738" style="width: 545px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/open-microsoft-query.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2738" class="wp-image-2738 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/open-microsoft-query.png" alt="Open Excel and create queries" width="535" height="451" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/open-microsoft-query.png 535w, https://zappysys.com/blog/wp-content/uploads/2018/03/open-microsoft-query-300x253.png 300w" sizes="(max-width: 535px) 100vw, 535px" /></a><p id="caption-attachment-2738" class="wp-caption-text">Excel Data Ribbon</p></div></li>
<li>In Choose Data Source, select <strong>ZappySys JSON for Excel</strong> and press OK.
<div id="attachment_2726" style="width: 464px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-zappy-data-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2726" class="wp-image-2726 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-zappy-data-source.png" alt="Select zappysys data source" width="454" height="236" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-zappy-data-source.png 454w, https://zappysys.com/blog/wp-content/uploads/2018/03/choose-zappy-data-source-300x156.png 300w" sizes="(max-width: 454px) 100vw, 454px" /></a><p id="caption-attachment-2726" class="wp-caption-text">Select zappysys data source</p></div></li>
<li>Click <strong>Value</strong> and press the <strong>&gt;</strong> to display all the attributes and press<strong><strong> next.</strong></strong>
<div id="attachment_2731" style="width: 502px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/Excel-query-wizard.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2731" class="wp-image-2731 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/Excel-query-wizard.png" alt="Create json query in excel" width="492" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/Excel-query-wizard.png 492w, https://zappysys.com/blog/wp-content/uploads/2018/03/Excel-query-wizard-300x184.png 300w" sizes="(max-width: 492px) 100vw, 492px" /></a><p id="caption-attachment-2731" class="wp-caption-text">Create json query in excel</p></div></li>
<li>You can filter data and select columns and check if a columns is equal to, greater than or less than a specific value. In this example, we will not apply filters. Press <strong><strong>next.</strong></strong>
<div id="attachment_2732" style="width: 498px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/filter-data-in-excel.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2732" class="wp-image-2732 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/filter-data-in-excel.png" alt="filter json data in excel" width="488" height="301" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/filter-data-in-excel.png 488w, https://zappysys.com/blog/wp-content/uploads/2018/03/filter-data-in-excel-300x185.png 300w" sizes="(max-width: 488px) 100vw, 488px" /></a><p id="caption-attachment-2732" class="wp-caption-text">filter json data in excel</p></div></li>
<li>Now if you want to export data to sheet without using custom Query then select first option. If you like to enter custom query then select  <strong>Microsoft Query (second option) </strong>once you close the wizard you may get an option to enter custom SQL (see the toolbar of Graphical Designer)We will use first option for now.
<div id="attachment_2739" style="width: 502px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/return-data-in-excel.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2739" class="wp-image-2739 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/return-data-in-excel.png" alt="Return data in Excel" width="492" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/return-data-in-excel.png 492w, https://zappysys.com/blog/wp-content/uploads/2018/03/return-data-in-excel-300x184.png 300w" sizes="(max-width: 492px) 100vw, 492px" /></a><p id="caption-attachment-2739" class="wp-caption-text">Return data in Excel</p></div></li>
<li>In this step, Excel will show the <strong>Import Data </strong>window. Excel will let you select the sheet to insert the data. We will choose the existing sheet.
<div id="attachment_2741" style="width: 313px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/select-excel-sheet.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2741" class="wp-image-2741 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/select-excel-sheet.png" alt="select excel sheet" width="303" height="267" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/select-excel-sheet.png 303w, https://zappysys.com/blog/wp-content/uploads/2018/03/select-excel-sheet-300x264.png 300w" sizes="(max-width: 303px) 100vw, 303px" /></a><p id="caption-attachment-2741" class="wp-caption-text">Choose excel sheet</p></div></li>
<li>If everything is OK, you will be able to see the data.
<div id="attachment_2730" style="width: 1014px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/excel-data-displayed.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2730" class="wp-image-2730 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/excel-data-displayed.png" alt="json data extracted" width="1004" height="570" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/excel-data-displayed.png 1004w, https://zappysys.com/blog/wp-content/uploads/2018/03/excel-data-displayed-300x170.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/excel-data-displayed-768x436.png 768w" sizes="(max-width: 1004px) 100vw, 1004px" /></a><p id="caption-attachment-2730" class="wp-caption-text">Excel rows with data</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>How to import data from REST API to CSV</h2>
<p>If you already have your data in Excel with the previous steps, converting the data extracted from Rest API to Excel to a CSV is a straight forward process.</p>
<ol>
<li>Using Excel, go to the<strong> File</strong> menú and select <strong>Save as</strong> and select a folder to store it.
<div id="attachment_2740" style="width: 744px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/save-as-in-Excel.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2740" class="wp-image-2740 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/save-as-in-Excel.png" alt="Save as in Excel" width="734" height="306" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/save-as-in-Excel.png 734w, https://zappysys.com/blog/wp-content/uploads/2018/03/save-as-in-Excel-300x125.png 300w" sizes="(max-width: 734px) 100vw, 734px" /></a><p id="caption-attachment-2740" class="wp-caption-text">Save as in Excel</p></div></li>
<li>In order to save the data in CSV, save as type select CSV (Comma delimited)
<div id="attachment_2729" style="width: 680px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/csv-format.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2729" class="wp-image-2729 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/csv-format.png" alt="save file as csv" width="670" height="474" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/csv-format.png 670w, https://zappysys.com/blog/wp-content/uploads/2018/03/csv-format-300x212.png 300w" sizes="(max-width: 670px) 100vw, 670px" /></a><p id="caption-attachment-2729" class="wp-caption-text">convert excel to csv</p></div></li>
</ol>
<h2>How to import JSON to Excel (From Local file)</h2>
<ol>
<li>To import data in Excel, the steps are the same for Rest API that for a physical json file. The only difference is that a local path is used instead of a URL. In order to get JSON data into Excel, you need to repeat the steps to add the ZappySys ODBC Driver in the ODBC Data source, but instead of specifying a URL, we just need to specify the local path.</li>
<li>To test the driver, let&#8217;s say that we have the following named sample.json file:<br />
<pre class="crayon-plain-tag">{
  "odata.metadata": "https://services.odata.org/V3/Northwind/Northwind.svc/$metadata#Customers",
  "odata.nextLink": "Customers?$skiptoken='ERNSH'",
  "value": [
    {
      "CustomerID": "ALFKI",
      "CompanyName": "Alfreds Futterkiste",
      "ContactName": "Maria Anders",
      "ContactTitle": "Sales Representative",
      "Address": "Obere Str. 57",
      "City": "Berlin",
      "Region": null,
      "PostalCode": "12209",
      "Country": "Germany",
      "Phone": "030-0074321",
      "Fax": "030-0076545"
    },
    {
      "CustomerID": "ANATR",
      "CompanyName": "Ana Trujillo Emparedados y helados",
      "ContactName": "Ana Trujillo",
      "ContactTitle": "Owner",
      "Address": "Avda. de la Constitución 2222",
      "City": "México D.F.",
      "Region": null,
      "PostalCode": "05021",
      "Country": "Mexico",
      "Phone": "(5) 555-4729",
      "Fax": "(5) 555-3745"
    },
    {
      "CustomerID": "ANTON",
      "CompanyName": "Antonio Moreno Taquería",
      "ContactName": "Antonio Moreno",
      "ContactTitle": "Owner",
      "Address": "Mataderos 2312",
      "City": "México D.F.",
      "Region": null,
      "PostalCode": "05023",
      "Country": "Mexico",
      "Phone": "(5) 555-3932",
      "Fax": null
    },
    {
      "CustomerID": "AROUT",
      "CompanyName": "Around the Horn",
      "ContactName": "Thomas Hardy",
      "ContactTitle": "Sales Representative",
      "Address": "120 Hanover Sq.",
      "City": "London",
      "Region": null,
      "PostalCode": "WA1 1DP",
      "Country": "UK",
      "Phone": "(171) 555-7788",
      "Fax": "(171) 555-6750"
    },
    {
      "CustomerID": "BERGS",
      "CompanyName": "Berglunds snabbköp",
      "ContactName": "Christina Berglund",
      "ContactTitle": "Order Administrator",
      "Address": "Berguvsvägen 8",
      "City": "Luleå",
      "Region": null,
      "PostalCode": "S-958 22",
      "Country": "Sweden",
      "Phone": "0921-12 34 65",
      "Fax": "0921-12 34 67"
    },
    {
      "CustomerID": "BLAUS",
      "CompanyName": "Blauer See Delikatessen",
      "ContactName": "Hanna Moos",
      "ContactTitle": "Sales Representative",
      "Address": "Forsterstr. 57",
      "City": "Mannheim",
      "Region": null,
      "PostalCode": "68306",
      "Country": "Germany",
      "Phone": "0621-08460",
      "Fax": "0621-08924"
    },
    {
      "CustomerID": "BLONP",
      "CompanyName": "Blondesddsl père et fils",
      "ContactName": "Frédérique Citeaux",
      "ContactTitle": "Marketing Manager",
      "Address": "24, place Kléber",
      "City": "Strasbourg",
      "Region": null,
      "PostalCode": "67000",
      "Country": "France",
      "Phone": "88.60.15.31",
      "Fax": "88.60.15.32"
    },
    {
      "CustomerID": "BOLID",
      "CompanyName": "Bólido Comidas preparadas",
      "ContactName": "Martín Sommer",
      "ContactTitle": "Owner",
      "Address": "C/ Araquil, 67",
      "City": "Madrid",
      "Region": null,
      "PostalCode": "28023",
      "Country": "Spain",
      "Phone": "(91) 555 22 82",
      "Fax": "(91) 555 91 99"
    },
    {
      "CustomerID": "BONAP",
      "CompanyName": "Bon app'",
      "ContactName": "Laurence Lebihan",
      "ContactTitle": "Owner",
      "Address": "12, rue des Bouchers",
      "City": "Marseille",
      "Region": null,
      "PostalCode": "13008",
      "Country": "France",
      "Phone": "91.24.45.40",
      "Fax": "91.24.45.41"
    },
    {
      "CustomerID": "BOTTM",
      "CompanyName": "Bottom-Dollar Markets",
      "ContactName": "Elizabeth Lincoln",
      "ContactTitle": "Accounting Manager",
      "Address": "23 Tsawassen Blvd.",
      "City": "Tsawassen",
      "Region": "BC",
      "PostalCode": "T2F 8M4",
      "Country": "Canada",
      "Phone": "(604) 555-4729",
      "Fax": "(604) 555-3745"
    },
    {
      "CustomerID": "BSBEV",
      "CompanyName": "B's Beverages",
      "ContactName": "Victoria Ashworth",
      "ContactTitle": "Sales Representative",
      "Address": "Fauntleroy Circus",
      "City": "London",
      "Region": null,
      "PostalCode": "EC2 5NT",
      "Country": "UK",
      "Phone": "(171) 555-1212",
      "Fax": null
    },
    {
      "CustomerID": "CACTU",
      "CompanyName": "Cactus Comidas para llevar",
      "ContactName": "Patricio Simpson",
      "ContactTitle": "Sales Agent",
      "Address": "Cerrito 333",
      "City": "Buenos Aires",
      "Region": null,
      "PostalCode": "1010",
      "Country": "Argentina",
      "Phone": "(1) 135-5555",
      "Fax": "(1) 135-4892"
    },
    {
      "CustomerID": "CENTC",
      "CompanyName": "Centro comercial Moctezuma",
      "ContactName": "Francisco Chang",
      "ContactTitle": "Marketing Manager",
      "Address": "Sierras de Granada 9993",
      "City": "México D.F.",
      "Region": null,
      "PostalCode": "05022",
      "Country": "Mexico",
      "Phone": "(5) 555-3392",
      "Fax": "(5) 555-7293"
    },
    {
      "CustomerID": "CHOPS",
      "CompanyName": "Chop-suey Chinese",
      "ContactName": "Yang Wang",
      "ContactTitle": "Owner",
      "Address": "Hauptstr. 29",
      "City": "Bern",
      "Region": null,
      "PostalCode": "3012",
      "Country": "Switzerland",
      "Phone": "0452-076545",
      "Fax": null
    },
    {
      "CustomerID": "COMMI",
      "CompanyName": "Comércio Mineiro",
      "ContactName": "Pedro Afonso",
      "ContactTitle": "Sales Associate",
      "Address": "Av. dos Lusíadas, 23",
      "City": "Sao Paulo",
      "Region": "SP",
      "PostalCode": "05432-043",
      "Country": "Brazil",
      "Phone": "(11) 555-7647",
      "Fax": null
    },
    {
      "CustomerID": "CONSH",
      "CompanyName": "Consolidated Holdings",
      "ContactName": "Elizabeth Brown",
      "ContactTitle": "Sales Representative",
      "Address": "Berkeley Gardens 12 Brewery",
      "City": "London",
      "Region": null,
      "PostalCode": "WX1 6LT",
      "Country": "UK",
      "Phone": "(171) 555-2282",
      "Fax": "(171) 555-9199"
    },
    {
      "CustomerID": "DRACD",
      "CompanyName": "Drachenblut Delikatessen",
      "ContactName": "Sven Ottlieb",
      "ContactTitle": "Order Administrator",
      "Address": "Walserweg 21",
      "City": "Aachen",
      "Region": null,
      "PostalCode": "52066",
      "Country": "Germany",
      "Phone": "0241-039123",
      "Fax": "0241-059428"
    },
    {
      "CustomerID": "DUMON",
      "CompanyName": "Du monde entier",
      "ContactName": "Janine Labrune",
      "ContactTitle": "Owner",
      "Address": "67, rue des Cinquante Otages",
      "City": "Nantes",
      "Region": null,
      "PostalCode": "44000",
      "Country": "France",
      "Phone": "40.67.88.88",
      "Fax": "40.67.89.89"
    },
    {
      "CustomerID": "EASTC",
      "CompanyName": "Eastern Connection",
      "ContactName": "Ann Devon",
      "ContactTitle": "Sales Agent",
      "Address": "35 King George",
      "City": "London",
      "Region": null,
      "PostalCode": "WX3 6FW",
      "Country": "UK",
      "Phone": "(171) 555-0297",
      "Fax": "(171) 555-3373"
    },
    {
      "CustomerID": "ERNSH",
      "CompanyName": "Ernst Handel",
      "ContactName": "Roland Mendel",
      "ContactTitle": "Sales Manager",
      "Address": "Kirchgasse 6",
      "City": "Graz",
      "Region": null,
      "PostalCode": "8010",
      "Country": "Austria",
      "Phone": "7675-3425",
      "Fax": "7675-3426"
    }
  ]
}</pre>
</li>
<li>Finally, in the ZappySys driver, in Data Source (URL or File Path), write the path of your json file. In this example, <strong>c:\sql\sample.json. </strong>Also expand Data format and select <strong>Default.<br />
</strong></p>
<div id="attachment_2752" style="width: 618px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-properties.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2752" class="wp-image-2752 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-properties.png" alt="properties json file" width="608" height="550" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-properties.png 608w, https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-properties-300x271.png 300w" sizes="(max-width: 608px) 100vw, 608px" /></a><p id="caption-attachment-2752" class="wp-caption-text">properties to query a local json file</p></div>
<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;">NOTE: When the Data format is set to OData and it is a local json file, the error message is &#8220;Data processing error: URI formats are not supported&#8221;. If the Data format is set to Original, the error message is &#8220;Query execution error: Requested value &#8216;Original&#8217; was not found.&#8221; To solve this issue, make sure that in Other Settings, the Data format is set to Default.</div></div></li>
</ol>
<h2>How to query JSON or REST API</h2>
<p>Our ZappySys driver is a very intuitive tool and you can write queries to data like a simple database table.</p>
<p>Let&#8217;s take a look to some examples:</p>
<p>In the ODBC Data Source Administrator, press <strong>Configure.</strong></p>
<div id="attachment_2727" style="width: 604px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/configure-zappysys-settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2727" class="wp-image-2727 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/configure-zappysys-settings.png" alt="Configure ZappySys settings" width="594" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/configure-zappysys-settings.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/03/configure-zappysys-settings-300x214.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-2727" class="wp-caption-text">Configure ZappySys settings</p></div>
<p>&nbsp;</p>
<p>On Preview page, write this query:</p><pre class="crayon-plain-tag">select 
"CustomerID",
"CompanyName",
"ContactName",
"ContactTitle",
"Address",
"City",
"Region",
"PostalCode",
"Country",
"Phone",
"Fax"
from [value] 
where City='Berlin'</pre><p>
The query will show the customers where the city is Berlin:</p>
<div id="attachment_2769" style="width: 619px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-query-withfilters.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2769" class="wp-image-2769 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-query-withfilters.png" alt="Query json with where clause" width="609" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-query-withfilters.png 609w, https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-query-withfilters-300x189.png 300w" sizes="(max-width: 609px) 100vw, 609px" /></a><p id="caption-attachment-2769" class="wp-caption-text">Query json information using filters</p></div>
<p>&nbsp;</p>
<p>You can use in the where clause with double quotes:</p><pre class="crayon-plain-tag">WHERE City="Berlin"</pre><p>
or simple quotes:</p><pre class="crayon-plain-tag">WHERE City='Berlin'</pre><p>
It is also valid to comment code. The following example shows how to comment a single line (the where clause):</p><pre class="crayon-plain-tag">select "CustomerID", "CompanyName
from [value]
--where City='Berlin'</pre><p>
The following example shows how to comment multiple lines</p><pre class="crayon-plain-tag">/*
This example shows how 
to comment
multiple lines of code
*/

select "CustomerID", "CompanyName from [value]</pre><p>
<h2>Schedule / Automate Excel file creation using command line</h2>
<p>There will be a time when you need to export REST API to Excel in an automated way (Scheduled Task). Possibly via Batch file, Python code, PowerShell script or Scheduler. <a href="https://zappysys.com/posts/sql-server-excel-export-from-table-or-query-data/" target="_blank" rel="noopener">Check this article</a> to learn more.</p>
<p>You can use <a href="https://zappysys.com/products/zappyshell/data-export-command-line-tools-json-excel-csv-pdf/" target="_blank" rel="noopener">ZappyShell for DB</a> (Command Line Tool) to export JSON / SOAP / REST API data to Excel Sheet. It supports any ODBC Connection string as a source and you can export to CSV, Excel, JSON and XML.</p>
<p>Here is a sample command line. You can automate it via Scheduled Job (e.g. Windows Scheduler or SQL Agent Job)</p>
<p><b>First create below file (name it script.txt)</b></p><pre class="crayon-plain-tag">export &quot;SELECT * FROM $ LIMIT 20 WITH(Src='https://httpbin.org/json',Filter='$.slideshow.slides[*]' , RequestMethod='GET')&quot;  -o &quot;c:\data.xlsx&quot; --connstr &quot;DSN=MyAPIConnection;&quot; -y</pre><p>
<b>Then call this (assuming you have zappyshell in c:\zappyshell folder</b></p><pre class="crayon-plain-tag">c:\zappyshell&amp;gt;db.exe exec c:\script.txt</pre><p>
You can also use DSN less connection string such as below</p><pre class="crayon-plain-tag">export &quot;SELECT * FROM $ LIMIT 20 WITH(Src='https://httpbin.org/json',Filter='$.slideshow.slides[*]' , RequestMethod='GET')&quot;  -o &quot;c:\temp\data.xlsx&quot; --connstr &quot;DRIVER={ZappySys JSON Driver};&quot; -y</pre><p>
<div id="attachment_3905" style="width: 838px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/create-export-rest-api-json-to-excel-file-command-line-automate.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3905" class="size-full wp-image-3905" src="https://zappysys.com/blog/wp-content/uploads/2018/03/create-export-rest-api-json-to-excel-file-command-line-automate.png" alt="Export JSON / SOAP XML / REST API to Excel File - Create Excel File using Automated Command Line (Schedule)" width="828" height="600" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/create-export-rest-api-json-to-excel-file-command-line-automate.png 828w, https://zappysys.com/blog/wp-content/uploads/2018/03/create-export-rest-api-json-to-excel-file-command-line-automate-300x217.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/create-export-rest-api-json-to-excel-file-command-line-automate-768x557.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-3905" class="wp-caption-text">Export JSON / SOAP XML / REST API to Excel File &#8211; Create Excel File using Automated Command Line (Schedule)</p></div>
<p>&nbsp;</p>
<h2>Calling XML SOAP Web Service in Excel</h2>
<p>So far we have looked at examples to consume data using JSON driver. Now let&#8217;s look at an example, to call XML SOAP Web Service in Excel.</p>
<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>SOAP / REST API pagination in Excel</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>SOAP / REST API Error Handling in Excel</h2>
<div class="content_block" id="custom_post_widget-3894">Sometimes errors occur... they just do and there is nothing you can do! Or can you? Actually, in ODBC PowerPack you can handle them in two ways.
<h3>METHOD 1 - Using Error Handling Options</h3>
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3949" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-error-handling-1.png" alt="" width="668" height="702" />
<h4>When to use?</h4>
You may want to use them when your source is a resource located on the Internet; e.g. a file on a website, a file on an FTP server or just a plain API HTTP response. By default, when a remote server returns an error, data retrieval is stopped, an error is raised and no data is given back to you. This might not be always desirable.
<h4>Scenario 1</h4>
Imagine a scenario, that there is a web server which each day at 12 AM releases a new JSON file with that day's date as filename, e.g. <span style="text-decoration: underline;"><em>http://www.some-server.com/data/2018-06-20.json</em></span>. And, of course, you want to download it and use it daily in your Power BI report. But you have a problem: Power BI report data sources are refreshed each hour and you may get <a href="https://en.wikipedia.org/wiki/HTTP_404" target="_blank" rel="noopener">HTTP 404 status code</a> (no file was found) when a file is not released yet. Which consequentially means other data sources won't be updated as well and you will see old and cached data on the report. That's where you could use <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue on any error</span></strong> or <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue when Url is invalid or missing (404 Errors)</span></strong> to avoid an error being raised and let other data sources to be updated.
<h4>Scenario 2</h4>
Another scenario is when you expect a web server to raise some kind of HTTP error when accessing a URL. You don't want ODBC Data Source to raise an error but instead, you want to get response data. That's where you can use <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue on any error</span></strong> or alike together with  <strong><span class="lang:default highlight:0 decode:true crayon-inline">Get response data on error</span></strong> to continue on an error and get the data:

<img loading="lazy" decoding="async" class="alignnone wp-image-3961 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error.png" alt="" width="547" height="235" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error.png 547w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error-300x129.png 300w" sizes="(max-width: 547px) 100vw, 547px" />
<h3>METHOD 2 - Using Connection [Retry Settings]</h3>
Another scenario you may run into is a buggy web server. You ask it to give you some file or data and it, like a snotty kid, just doesn't give it to you! You have to ask twice or thrice before it does its job. If that's the case, you have to retry HTTP requests using <em>Connection</em>:

<img loading="lazy" decoding="async" class="alignnone wp-image-3963 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-error-handling-3.png" alt="" width="671" height="572" /></div>
<h2>Security / Connection Types (Options for HTTP, OAuth, SOAP) in Excel</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>
<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>
<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>Conclusion</h2>
<p>In this article, we learned how to use the <a href="https://zappysys.com/products/odbc-powerpack/">ZappySys ODBC PowerPack</a> to import JSON to Excel. We used the OData protocol and then we learned how to import from a JSON file to Excel.  With ZappySys ODBC Power Pack, you can query REST API information or JSON files using SQL and filter the information or write custom queries according to your needs.</p>
<h2>References</h2>
<ul>
<li><a href="https://www.w3schools.com/js/js_json_intro.asp">JSON &#8211; Introduction</a></li>
<li><a href="http://www.restapitutorial.com/">Learn REST: A RESTful Tutorial</a></li>
</ul>
<p>Keywords: How to import JSON to Excel (Load File or REST API), how to convert JSON to Excel, Import JSON to Excel 2016, Load JSON to Excel 2013, Import REST API to Excel 2010</p>
<p>The post <a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/">How to import JSON to Excel (Load File, REST API, SOAP XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
