ODBC JSON / REST API Driver
Query JSON files and REST APIs with SQL, OAuth, pagination, and streaming for large files.
Read local JSON files or call REST APIs with plain SQL. Flatten nested arrays and objects, handle OAuth, JWT and pagination, and query the data from Power BI, Excel, SSIS, Python or SQL Server, all without writing code.
Included in the Standard edition and above
- Any ODBC-compliant tool
- Runs in your environment
- SQL Server via Data Gateway
- 32-bit and 64-bit

At a glance
What the JSON / REST API Driver can do
Query JSON files and REST APIs with SQL, OAuth, pagination, and streaming for large files.
Familiar SQL
Use WHERE, ORDER BY, GROUP BY and built-in math, string, date and JSON functions on top of the data source.
- Standard SELECT syntax
- Custom functions in the SQL dialect
- Driver options in a WITH clause
Nested JSON & large files
Flatten nested objects and arrays into a table. The engine is optimized for large files — the help site shows 3 million rows processed in 3 minutes.
- Array flattening and pivoting
- 2D arrays and complex transformations
- Reads raw JSON or inner array output
REST API calls
Call a Web API with custom headers, body and URL parameters, and loop through pages.
- GET and POST, multipart file upload
- Many REST API pagination options
- Cookies and proxy server support
Security standards
OAuth 1.0 / 2.0, JWT, Basic authentication, X509 certificates and TLS 1.2 for secure HTTPS.
- OAuth connection manager
- Dynamic token authentication
- HTTPS / SSL / TLS 1.2
Multiple files
Read one file or many using a wildcard pattern such as Year??_data*.json.
- Local files and URLs
- Wildcard patterns
- Same structure across files
Works with the tools you have
Any ODBC-compliant tool can use the DSN: Power BI, Tableau, Qlik, SSRS, Informatica, Excel and SSIS.
- Create a DSN once, reuse it everywhere
- 32-bit and 64-bit ODBC
- Stored in the standard ODBC Data Source Administrator
Use it from code
Connect from Java, C#, Python, PowerShell and more with an ODBC connection string that names the DSN.
- Standard ODBC connection strings
- Parameterized queries
- Same SQL as in the UI
SQL Server via Data Gateway
Query the driver from SQL Server (linked server / OPENQUERY) without installing it on the SQL Server machine, through the Data Gateway.
- No driver install on the server
- Works with SQL Server 2012 through 2025 (32/64 bit)
- Same DSN, same SQL
See all features
- Read /write data from Web API / REST API or local JSON files using familiar SQL Query language
- De-normalize nested JSON into a flat document just like a regular database table
- Integrate insight any ODBC Compliant Reporting / ETL tools (e.g. Power BI, Tableau, Qlik, SSRS, Informatica, Excel, SSIS)
- Support for programming languages such as JAVA, C#, Python, PowerShell and more…
- Tight integration with Microsoft SQL Server (With support for Gateway Option – No need to install Driver on Server)
- Familiar SQL Query language support including WHERE, ORDER BY, GROUP BY constructs
- Support for custom math/ string / datetime / JSON functions in SQL query Language
- The unparalleled performance with large file support (See how we processed 3 million rows in 3 mins)
- POST data to API server, Upload File to server (Support MultiPart File Upload).
- Latest security standards such as OData, OAuth and JWT (RFC 7519) (Call services like Google API, Facebook …)
- Call API using Dynamic Token Authenticate or Basic authorization (i.e. UserID / Password)
- Reading from multiple files using wildcard pattern (e.g. Year??_data*.json)
- Support for Array Flattening (Child Array Items as Columns)
- HTTP Request with Custom Headers / Body / URL Parameters.
- REST API Pagination Support to consume multiple requests / loop (many options explained here and here)
- Support for 2D arrays and Complex Transformation (See this article and this for Google BigQuery)
- Option for Pivoting nested data (Convert Columns to Rows)
- Ability to read raw JSON / indent output from inner array
- HTTPS / SSL / TLS 1.2 Support for more secure communication
- Support for passing cookies
- Support for Proxy Server
SQL Server 2012–2025
Ways to use it
Pick how you reach your data.
Configure the DSN once, then query it from any ODBC tool or from SQL Server.
Query JSON files with SQL, including wildcards.
Point SRC at one file or a pattern such as Customer*_??.json.
- Local files and URLs
- Wildcard patterns
- Flatten nested arrays

Call a REST API and read the JSON as rows.
Set the URL, method, headers and body. Add OAuth, pagination and the other options in the API call settings.
- GET or POST
- Pagination options
- OAuth, Basic, JWT

Query it from SQL Server with Data Gateway.
Expose the driver through the ODBC PowerPack Data Gateway and create a linked server in SQL Server. The driver does not have to be installed on the SQL Server machine.
- Linked server or OPENQUERY
- No driver install on the server
- Works with SQL Server 2012 through 2025 (32/64 bit)

Inside the UI
The driver UI, step by step.
Real screens from the ZappySys ODBC driver configuration.
Create the DSN
Add a user or system DSN and pick the JSON / REST API Driver.
SQL example
Write SQL. Get a flat table.
The driver reads local files or Web API responses, flattens the JSON and lets you use WHERE, ORDER BY, GROUP BY and functions on top. Below: a sample document, the SQL query and the rows it returns.
-
Sample JSON data
A small JSON file on disk. Point
SRCat a URL instead and the same query reads a Web API response.{ "Customers": [ { "CustomerID": "C1", "CompanyName": "Company 1", "City": "Atlanta" }, { "CustomerID": "C2", "CompanyName": "Company 2", "City": "Boston" }, { "CustomerID": "C3", "CompanyName": "Company 3", "City": "Atlanta" } ] } -
Run the SQL query
SQL Query
SELECT CustomerID, CompanyName FROM $ WHERE City = 'Atlanta' ORDER BY CompanyName WITH ( SRC = @'C:\Data\customers.json', Filter = '$.Customers[*]' )Paste the statement into the driver’s Query Editor, or run it from any ODBC tool or language.
WITH (…) clause carries driver options, so a single DSN can read many sources.
-
Rows returned to your tool
CustomerID CompanyName C1 Company 1 C3 Company 3 Connect Power BI, Excel, SSIS, Python or SQL Server to the DSN to get the same rows.
Illustrative input and output. More query samples are in the online help.
SQL query examples
Copy a query, change the source, run it.
19 of the 55 examples from the JSON / REST API Driver help. Open one to see the SQL.
Read files, API responses and objects as rows.
Query JSON API Service
This example shows how to query JSON API service. In order to see table list you must populate required connection parameters on the parameter grid
SELECT * FROM value
WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json')
Query Single File
This example shows how to query single JSON file (For multiple file use wildcard (i.e. *.json)). This example selects root level hierarchy (i.e $ as table name). Use table selector from toolbar to exact data from different hierarchy (i.e table).
SELECT * FROM $ WITH (SRC='C:\Data\cust-1.json')
Query Multiple Files
This example shows how to query multiple JSON files using wildcard (i.e. *.json). This example selects root level hierarchy (i.e $ as table name). Use table selector from toolbar to exact data from different hierarchy (i.e table).
SELECT * FROM $
WITH (
SRC='C:\Data\cust*-?.json'
--,RECURSIVE='True' --Include files from sub folder
)
Query direct JSON string (embedded inside query)
This example shows how to query direct JSON string embedded inside query. This is useful for testing purpose. In real world this may not be the case because data may be coming from File or URL (API call).
SELECT * FROM rows
WITH
(DATA='
{
rows : [
{id:1, name: "AAA"},
{id:2, name: "BBB"},
{id:3, name: "CCC"}
]
}'
)
Query Command line Output (Console Capture / MS DOS / PowerShell)
This example shows how to return data from command line output / batch file. To treat Data as command line simply prefix source command line with cmd:>. Here is more information about streaming data from command line output.
SELECT * FROM $
WITH (
Data='cmd:>powershell -executionpolicy bypass -Command "[System.IO.StreamReader]::new((Invoke-WebRequest -URI https://zappysys.com/downloads/files/test/invoices.json).RawContentStream).ReadToEnd()"'
--Data='cmd:>powershell -executionpolicy bypass -Command "echo {{value:[{{id:1}}{{id:2}}]}}|Out-File c:\temp\dump.json ; more c:\temp\dump.json"'
, Filter='$.value[*]')
Escape Sequence (String Literals with new lines, tabs)
This example shows how to use escape sequence in String Literals (Quoted values (single quotes) in WITH, SELECT or some other clause if driver supports). You can use @ symbol before string literal to allow special characters (e.g. \r \n \t \v \u0041 \\).
SELECT * FROM rows
WITH
(DATA=@'{rows : [{id:1, name: "AA\u0041"},\r\n {id:2, name: "BBB"},\r\n {id:3, name: "CCC"}]}'
)
Query Large Compressed File (From URL or Local disk)
This example shows how to read very large file from local disk or URL. You can read uncompressed or compressed file (in our example its GZip compressed file). Using –FAST option in your Filter enables Streaming Mode.
SELECT * FROM $
--LIMIT 10
WITH(
Filter='$.LargeArray[*]--FAST' --//Adding --FAST option turn on STREAM mode (large files)
,SRC='https://zappysys.com/downloads/files/test/large_file_10k_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)
)
Authentication, pagination, POST requests and parent/child URL calls.
Basic Authentication (User Id/Password)
This example shows how to query JSON API service which requires basic authentication. In order to see table list you must populate required connection parameters on the parameter grid
--Credentials via Query
SELECT * FROM $ WITH (SRC='http://httpbingo.org/basic-auth/user1/pass123',DataConnectionType='HTTP', CredentialType='Basic',UserName='user1',Password='pass123')
--Credentials inside connection string [Use Data source setup grid >> Select Connection = HTTP (Click Configure) >> Set Credential type=Basic, UserId=user1, Password=pass123]
--SELECT * FROM $ WITH (SRC='http://httpbingo.org/basic-auth/user1/pass123')
NTLM / Windows Authentication
This example shows how to query JSON API service which requires windows authentication (NTLM).
--Credentials via Query
SELECT * FROM $
WITH (SRC='http://yourhost/some-service',DataConnectionType='HTTP',CredentialType='Ntlm')
--Credentials inside connection string [Use Data source setup grid >> Authentication type=Ntlm]
--SELECT * FROM $ WITH (SRC='http://yourhost/some-service')
OAuth 2.0 Authentication (3-Legged) – Custom API Example
This example shows how to query JSON API service which requires OAuth2 authentication.
--Credentials via Query
SELECT * FROM $ WITH (
SRC='http://yourhost/api/some-service'
,DataConnectionType='OAuth'
,UseCustomApp='True'
,OAuthVersion='OAuth2'
,AuthUrl='https://yourhost/api/authorize'
,TokenUrl='https://yourhost/api/token'
,ClientId='xxxxxxxxxxx'
,ClientSecret='xxxxxxxxxxxxx'
,AccessToken='xxxxxxxxxxx'
,RefreshToken='xxxxxxxxxxx' --//This is only obtained from UI by clicking Generate Token Button
)
--Credentials inside connection string [Use Data source setup grid >> Authentication type=OAuth >> Click OAuth Button to configure connection]
SELECT * FROM $ WITH (SRC='http://yourhost/api/some-service')
Paginate based on URL Path (Loop until no record)
This example shows how to paginate API calls where you need to pass page number via URL Path. Driver keeps incrementing page number and calls next URL until last page is detected. There are few ways to indicate last page (e.g.
SELECT * FROM $
WITH (
SRC='https://zappysys.com/downloads/files/test/cust-<%page%>.json'
,PagingMode='ByUrlPath'
,PagingByUrlAttributeName='<%page%>'
,PagingByUrlEndStrategy='DetectBasedOnRecordCount'
,IncrementBy=1
)
Pass parent URL data to Child URL
This example shows how to perform URL JOIN. Using this pattern you can pass parent URL data to child API URL in one query. You can pass parent data in child URL or Body (for POST). Placeholder syntax is [$parent_alias.parent_col_name$].
SELECT
c.custid,c.name,c.city
,o.orderid,o.orderdate,o.total
/* ,i.itemid,i.qty,i.shipped */
FROM $
WITH(
--1st level (root)--
src='https://zappysys.com/downloads/files/test/join/customers.json'
,NextUrlAttributeOrExpr='$.nextpage'
,filter='$.customers[*]'
,alias='c'
,WaitTimeMs='500'
--2nd level--
--You can pass parent column to child URL using placeholder [$parent_alias.parent_col_name$] syntax (e.g. [$c.custid$] )
,join1_src='https://zappysys.com/downloads/files/test/join/c[$c.custid$]/orders.json'
,join1_filter='$.orders[*]'
,join1_alias='o'
,join1_NextUrlAttributeOrExpr='$.nextpage'
,join1_WaitTimeMs='500'
--Advanced: DISABLE connection for this level only (Valid Options: Default | Http | OAuth).
--,join1_DataConnectionType='Default'
/*
--3rd level--
--You can pass parent column to child URL using placeholder [$parent_alias.parent_col_name$] syntax (e.g. [$c.custid$] and [$o.orderid$])
,join2_src='https://zappysys.com/downloads/files/test/join/c[$c.custid$]/o[$o.orderid$]/items.json'
,join2_filter='$.items[*]'
,join2_alias='i'
,join2_NextUrlAttributeOrExpr='$.nextpage'
,join2_WaitTimeMs='500'
--maximum 7 levels deep you can go. Any attributes allowed in WITH clause can be prefixed by by joinN_xxx
-- join3_xxxxx, join4_xxxxxx .......... join7_xxxxx
*/
)
Download files to local disk
This example shows how to download files to local disk. It first gets records by calling first URL and then pass it to seconds URL.
select a.url,b.data,file_write_binary(base64_to_bytes(b.data) ,'c:\temp\' || name ) as bytes_written
from $
WITH (
SRC='https://zappysys.com/downloads/files/test/imagelist.json',
FILTER='$.list[*]',
ALIAS='a',
JOIN1_SRC='[$a.url$]',
JOIN1_ALIAS='b',
JOIN1_SaveContentAsBinary='true'
)
Functions, GROUP BY, CASE, UNION, temp tables and more.
Handling Large Dataset / Avoid OutOfMemory Error (Using Disk for Query Engine)
Advanced Query can invokes ClientSide query Engine which means entire table is fetched in memory for processing causing OutOfMemory Exception (OOM). To avoid this error you can specify Disk based Temporary storage for query engine.
SELECT * FROM $
WITH(
Src='https://zappysys.com/downloads/files/test/cust-1.json?really-large-file=1'
,TempStorageMode='Disk' --or 'Memory'
--OR
--,TempStorageMode=1 --//Memory=0, Disk=1
)
String Manipulation
This example shows how to use string functions. When you use function your entire dataset is first cached locally and then transformation is applied so you may notice some speed degradation.
SELECT
substr('ZappySys', 1, 5)
, printf('%s %s %.2f', 'v1', CompanyName, CompanyId)
, ('Str1' || CompanyName || 'Str2') as ConcatExample
, upper('ZappySys')
, lower('ZappySys')
, replace('ZappySys', 'Sys', 'XYZ')
, instr('ZappySys', 'Sys')
, trim(' Zappy Sys ') trim1
, trim('@@@ZappySys@@@', '@') trim2
, rtrim(' ZappySys ')
, ltrim(' ZappySys ')
, length( CompanyName )
FROM $ WITH (
FILTER='$.Info.Rows[*]',
DATA='{ Info: { Rows: [ { CompanyId: 1000 , CompanyName: "ZappySys" }, { CompanyId: 1001 , CompanyName: "Microsoft" } ] } }'
)
Control flow
This example shows how to use math functions. When you use function your entire dataset is first cached locally and then transformation is applied so you may notice some speed degradation.
SELECT
COALESCE(10,20) coalesce1 --returns first non-null arg
,COALESCE(null,20) coalesce2 --returns first non-null arg
,COALESCE(null,20,30,40) coalesce3 --returns first non-null arg
,IFNULL(null,20) --returns first non-null arg. Same function as COALESCE but simple (just two arguments allowed)
,NULLIF(20,20) nullif1 --returns null if both argument same
,NULLIF(10,20) nullif2 --returns null if both argument same
FROM $ WITH (
FILTER='$.Info.Rows[*]',
DATA='{ Info: { Rows : [ { CompanyId: 1000 , CompanyName: "ZappySys" }, { CompanyId: 1001 , CompanyName: "Microsoft" }] } }')
Date/Time
This example shows how to use date/time functions. When you use function your entire dataset is first cached locally and then transformation is applied so you may notice some speed degradation. JSON driver supports following 5 datetime functions.
SELECT
DATE('now') date_now
,STRFTIME('%Y-%m-%dT%H:%M:%f','now') formatted_Date_time
,DATETIME('now') datetime_now
,DATE('now','localtime') datetime_now_local
,TIME('now') time_now
,JULIANDAY('now')
,DATE('now', 'start of month', '+1 month' , '-1 day' ) dt_modify1
,DATE('now', '+5 day') dt_modify2
FROM $ WITH (DATA='{ Info: { Rows : [ { CompanyId: 1000 , CompanyName: "ZappySys" }, { CompanyId: 1001 , CompanyName: "Microsoft" } ] } }')
Math
This example shows how to use math functions. When you use function your entire dataset is first cached locally and then transformation is applied so you may notice some speed degradation.
SELECT
abs(-500)
,random()
,round(1000.236, 2)
FROM $ WITH (DATA='{ Info: { Rows: [ { CompanyId: 1000 , CompanyName: "ZappySys" }, { CompanyId: 1001 , CompanyName: "Microsoft" } ] } }')
JSON
This example shows how to use various JSON functions.
select
json_value(j1,"$.V1"),
json_array_first(j2),
json_array_last(j2),
json_array_nth(j2,1)
from array WITH (DATA=
'{"array" : [{"c1": "abc", "c2": "ABC", "j1": "{''V1'':''value1''}", "j2": "[13,22,''31'']"}] }')
Run the same query from SQL Server or your own code.
SQL Server (linked server)
Query the driver from SQL Server through the Data Gateway. The driver does not have to be installed on SQL Server.
-- SQL Server: create a linked server to the ZappySys Data Gateway (here [ZAPPY_GATEWAY]),
-- then run the driver query through OPENQUERY.
SELECT *
FROM OPENQUERY([ZAPPY_GATEWAY], 'SELECT * FROM value
WITH (SRC=''https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json'')')
C# (System.Data.Odbc)
using System;
using System.Data.Odbc;
// Use a DSN ("DSN=MyZappyDsn;") or name the driver directly
using (var conn = new OdbcConnection("DRIVER={ZappySys JSON Driver};"))
{
conn.Open();
var cmd = new OdbcCommand(@"SELECT * FROM value
WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json')", conn);
using (var rdr = cmd.ExecuteReader())
{
while (rdr.Read())
{
for (int i = 0; i < rdr.FieldCount; i++)
Console.Write("{0}={1} ", rdr.GetName(i), rdr[i]);
Console.WriteLine();
}
}
}
Python (pyodbc)
import pyodbc
# Use a DSN ("DSN=MyZappyDsn;") or name the driver directly
conn = pyodbc.connect("DRIVER={ZappySys JSON Driver};")
cursor = conn.cursor()
cursor.execute(r"""
SELECT * FROM value
WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json')
""")
for row in cursor.fetchall():
print(row)
conn.close()
PowerShell
$conn = New-Object System.Data.Odbc.OdbcConnection
$conn.ConnectionString = "DRIVER={ZappySys JSON Driver};" # or "DSN=MyZappyDsn"
$conn.Open()
$cmd = $conn.CreateCommand()
$cmd.CommandText = @'
SELECT * FROM value
WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json')
'@
$table = New-Object System.Data.DataTable
(New-Object System.Data.Odbc.OdbcDataAdapter($cmd)).Fill($table) | Out-Null
$conn.Close()
$table | Format-Table
Java (JDBC through Data Gateway)
// Java uses the ZappySys Data Gateway and the Microsoft SQL Server JDBC driver.
// On the gateway, add a data source (here "MyZappySource") that uses the ZappySys JSON Driver.
import java.sql.*;
String url = "jdbc:sqlserver://localhost:5000;databaseName=MyZappySource;user=MyGatewayUser;password=MyPassword;encrypt=false";
String sql = "SELECT * FROM value\n"
+ "WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json')";
try (Connection conn = DriverManager.getConnection(url);
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery(sql)) {
while (rs.next()) {
System.out.println(rs.getString(1));
}
}
PHP (odbc_connect)
<?php
$conn = odbc_connect("DRIVER={ZappySys JSON Driver};", "", ""); // or "DSN=MyZappyDsn"
$sql = <<<'SQL'
SELECT * FROM value
WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json')
SQL;
$rs = odbc_exec($conn, $sql);
while ($row = odbc_fetch_array($rs)) {
print_r($row);
}
odbc_close($conn);
Articles
Guides and tutorials for the JSON / REST API Driver
Compatibility and requirements
Built for Windows, and for your own environment.
- Windows 11, 10, 8 and 7, and Windows Server 2022, 2019, 2016, 2012 R2 and 2008
- .NET Framework 4.x. The JDBC Bridge Driver also needs Java 8 or later
- 32-bit and 64-bit ODBC drivers. SQL Server 2012 through 2025 through the Data Gateway
- Self-hosted: drivers run in your Windows process, business data does not pass through ZappySys servers, and credentials stay in your DSN
- Free trial of ODBC PowerPack: test with your own data before you buy
FAQ
Questions about the JSON / REST API Driver
Which tools and languages can use this driver?
Any ODBC-compliant tool, such as Power BI, Tableau, Qlik, SSRS, Informatica, Excel and SSIS. You can also connect from Java, C#, Python, PowerShell and other languages with an ODBC connection string.
Do I need to install the driver on SQL Server?
No. With the Data Gateway option the driver runs on the gateway machine and SQL Server connects to it through a linked server.
Which edition includes the JSON / REST API Driver?
The JSON / REST API Driver is included in the Standard, Professional and Enterprise editions of ODBC PowerPack. See the edition comparison for the full list.
Can it read large JSON files?
Yes. The engine is optimized for large files; the product help shows a test with 3 million rows processed in 3 minutes.
Can I call REST APIs that need OAuth or paging?
Yes. The driver supports OAuth 1.0 / 2.0, JWT, Basic authentication, custom headers and body, and several REST API pagination options.
Can I save a query to reuse it?
Yes. Save a query as a virtual table or a stored procedure (custom objects) in the DSN. Tools then see it like a normal table, and a procedure can take parameters. See custom objects in ODBC drivers.
Is there an SSIS version?
Yes. This driver uses the same data engine as the JSON Source in SSIS PowerPack.
Which SQL Server and Windows versions are supported?
Support for SQL Server 2025, 2022, 2019, 2017, 2016, 2014 and 2012 (32/64 bit) through the Data Gateway. See the system requirements.
Can I try it before buying?
Yes. Download ODBC PowerPack, create a DSN and test your own data before you buy.
Start your free trial today
Install ODBC PowerPack and add a JSON / REST API Driver DSN.
Preview your data in the driver UI before you connect your tool.
- One DSN, many toolsPower BI, Excel, SSIS, Python and SQL Server can all use it.
- Free trialTest the driver with your own data before you buy.
- Live supportHelp during your trial and after purchase.
Open Help FileBrowse all ODBC PowerPack drivers
New purchases may be eligible for refund review within 30 days. See the refund policy.
Talk to an engineer before or during your trial.