{"id":7975,"date":"2019-09-11T21:36:09","date_gmt":"2019-09-11T21:36:09","guid":{"rendered":"https:\/\/zappysys.com\/blog\/?p=7975"},"modified":"2023-09-11T20:52:55","modified_gmt":"2023-09-11T20:52:55","slug":"pivot-json-xml-data-using-ssis-odbc-drivers","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/","title":{"rendered":"Pivot JSON and XML data using SSIS or ODBC Drivers"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>In our previous post we saw <a href=\"https:\/\/zappysys.com\/blog\/parse-multi-dimensional-json-array-ssis\/\" target=\"_blank\" rel=\"noopener\">various ways to transform JSON arrays<\/a>. However there will be a time when your JSON \/ XML file wont have Array and you need to Pivot JSON Data.<\/p>\n<div class=\"content_block\" id=\"custom_post_widget-2523\"><h2><span id=\"Prerequisites\">Prerequisites<\/span><\/h2>\r\nBefore we perform the steps listed in this article, you will need to make sure the following prerequisites are met:\r\n<ol style=\"margin-left: 1.5em;\">\r\n \t<li><abbr title=\"SQL Server Integration Services\">SSIS<\/abbr> designer installed.\u00a0Sometimes it is referred to as <abbr title=\"Business Intelligence Development Studio\">BIDS<\/abbr> or <abbr title=\"SQL Server Data Tools\">SSDT<\/abbr> (<a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/ssdt\/download-sql-server-data-tools-ssdt\" target=\"_blank\" rel=\"noopener\">download it from the Microsoft site<\/a>).<\/li>\r\n \t<li>Basic knowledge of SSIS package\u00a0development using\u00a0<em>Microsoft SQL Server Integration Services<\/em>.<\/li>\r\n \t<li>Make sure\u00a0<span style=\"text-decoration: underline;\"><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">ZappySys SSIS PowerPack<\/a><\/span>\u00a0is installed (<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/download\/\" target=\"_blank\" rel=\"noopener\">download it<\/a>, if you haven't already).<\/li>\r\n \t<li>(<em>Optional step<\/em>)<em>.<\/em>\u00a0<a href=\"https:\/\/zappysys.zendesk.com\/hc\/en-us\/articles\/360035974593\" target=\"_blank\" rel=\"noopener\">Read this article<\/a>, if you are planning to deploy packages to a server and schedule their execution later.<\/li>\r\n<\/ol><\/div>\n<h2>Sample JSON data file<\/h2>\n<p>Here is a sample JSON file which we like to parse into rows and columns. Notice how it is using values inside in property name. This pattern needs Pivot option usage described later in this article.<\/p>\n<pre class=\"lang:js highlight:0 decode:true\">{\r\n\t\"version\": 1.0,\r\n\t\"products\": {\r\n\t\t\"P001\": {\r\n\t\t\t\"name\": \"Product 1\",\r\n\t\t\t\"price\": 10\r\n\t\t},\r\n\t\t\"P002\": {\r\n\t\t\t\"name\": \"Product 2\",\r\n\t\t\t\"price\": 11\r\n\t\t},\r\n\t\t\"P003\": {\r\n\t\t\t\"name\": \"Product 3\",\r\n\t\t\t\"price\": 12\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<p>If you like to play with real data then use below URL. This JSON has <strong>60MB<\/strong> worth of data for all Products offered on AWS.\u00a0 And It has similar structure as above except many more attributes under <strong>products <\/strong>node.<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">https:\/\/pricing.us-east-1.amazonaws.com\/offers\/v1.0\/aws\/AmazonEC2\/current\/us-east-1\/index.json<\/pre>\n<p>&nbsp;<\/p>\n<h2>Using SSIS PowerPack to Pivot JSON data<\/h2>\n<p>ZappySys offers powerful <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-source\/\" target=\"_blank\" rel=\"noopener\">JSON<\/a> and <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-xml-source\/\" target=\"_blank\" rel=\"noopener\">XML<\/a> Connectors. Below section will describe how to Parse and Pivot JSON data or Pivot XML data. For demo purpose we will use JSON Source but steps are almost same for XML too.<\/p>\n<h3>Step-By-Step JSON Pivot<\/h3>\n<ol>\n<li>First drag data flow from SSIS Toolbox and then double click data flow\n<div style=\"width: 470px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full\" src=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/images\/drag-and-drop-data-flow-task.png\" alt=\"Drag SSIS Data Flow Task from Toolbox\" width=\"460\" height=\"155\" \/><p class=\"wp-caption-text\">Drag SSIS Data Flow Task from Toolbox<\/p><\/div><\/li>\n<li>Once Data flow designer is open, drag ZS JSON Source from SSIS Toolbox.\n<div style=\"width: 551px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full\" src=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/images\/json-source\/ssis-json-source-adapter-drag.png\" alt=\"Drag ZappySys JSON Source\" width=\"541\" height=\"144\" \/><p class=\"wp-caption-text\">Drag ZappySys JSON Source<\/p><\/div><\/li>\n<li>Now for demo we will use Hard coded JSON using Direct Value option as below. You can also enter URL or File path if you select Direct Path option.<\/li>\n<li>Go to <strong>Pivot Columns to Rows<\/strong> Tab and check <strong>Enable Pivoting<\/strong> Option\n<div id=\"attachment_7977\" style=\"width: 691px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7977\" class=\"size-full wp-image-7977\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png\" alt=\"Pivot JSON \/ XML Data option for ZappySys API Connectors \/ Drivers\" width=\"681\" height=\"120\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png 681w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option-300x53.png 300w\" sizes=\"(max-width: 681px) 100vw, 681px\" \/><\/a><p id=\"caption-attachment-7977\" class=\"wp-caption-text\">Pivot JSON \/ XML Data option for ZappySys API Connectors \/ Drivers<\/p><\/div><\/li>\n<li>Now come back to <strong>Filter Options<\/strong> Tab here you can either browse Filter or enter by hand. <strong>If file is too large then enter by hand<\/strong>. For example in our case we will enter <span class=\"lang:default highlight:0 decode:true crayon-inline \">$.products<\/span>\u00a0 because we like to to parse structure below that node. If you have nested hierarchy (i.e. products node under orders node and so on) then use dot to separate them e.g.\u00a0<span class=\"lang:default highlight:0 decode:true crayon-inline\">$.customer.orders.products<\/span><\/li>\n<li><strong>For very Large file<\/strong> you need to <strong>Un-check Include Parent Columns<\/strong> option else you will get OutOfMemory Exception<\/li>\n<li>Now click Preview to see our data.\n<div id=\"attachment_7976\" style=\"width: 789px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/ssis-json-pivot-data-options.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7976\" class=\"size-full wp-image-7976\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/ssis-json-pivot-data-options.png\" alt=\"Pivot JSON Data using SSIS JSON Source\" width=\"779\" height=\"744\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/ssis-json-pivot-data-options.png 779w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/ssis-json-pivot-data-options-300x287.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/ssis-json-pivot-data-options-768x733.png 768w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><\/a><p id=\"caption-attachment-7976\" class=\"wp-caption-text\">Pivot JSON Data using SSIS JSON Source<\/p><\/div>\n<p>&nbsp;<\/li>\n<li>Now you can connect your JSON \/ XML source to destination. See below example.\n<div id=\"attachment_1578\" style=\"width: 596px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-package-execute-rest-api-loading-data-from-bigquery-to-sqlserver.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1578\" class=\"size-full wp-image-1578\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-package-execute-rest-api-loading-data-from-bigquery-to-sqlserver.png\" alt=\"SSIS Package Execution - Loading Google BigQuery Data into SQL Server\" width=\"586\" height=\"296\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-package-execute-rest-api-loading-data-from-bigquery-to-sqlserver.png 586w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-package-execute-rest-api-loading-data-from-bigquery-to-sqlserver-300x152.png 300w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><\/a><p id=\"caption-attachment-1578\" class=\"wp-caption-text\">SSIS Package Execution &#8211;<br \/>Loading Google BigQuery Data into SQL Server<\/p><\/div><\/li>\n<\/ol>\n<h2>Using ODBC PowerPack to Pivot JSON data<\/h2>\n<p>So far we talked how to use SSIS to read your JSON data and Pivot it but what if you want to consume JSON \/ XML \/ REST API data in some other App without doing ETL via SSIS?\u00a0 Thats where <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/\" target=\"_blank\" rel=\"noopener\">ZappySys ODBC PowerPack<\/a> comes in picture. Its a collection of many drivers including <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/odbc-json-rest-api-driver\/\" target=\"_blank\" rel=\"noopener\">JSON Driver<\/a> and <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/odbc-xml-soap-api-driver\/\" target=\"_blank\" rel=\"noopener\">XML Driver<\/a>.\u00a0 You can also use <a href=\"https:\/\/zappysys.com\/blog\/import-rest-api-json-sql-server\/\" target=\"_blank\" rel=\"noopener\">Data Gateway Approach<\/a>, which allows T-SQL code to fetch JSON \/ XML data directly into SQL Server Table without any ETL \/ Programming.<\/p>\n<p>Here is sample query you can run using JSON Driver or XML Driver<\/p>\n<pre class=\"lang:tsql decode:true \">SELECT * FROM $\r\nWITH(\r\n\t Src='https:\/\/pricing.us-east-1.amazonaws.com\/offers\/v1.0\/aws\/AmazonEC2\/current\/us-east-1\/index.json'\r\n\t,Filter='$.products'\r\n\t,IncludeParentColumns='False'\r\n\t,EnablePivot='True'\r\n)<\/pre>\n<p>See below screenshot of JSON Driver Configuration to get idea.<br \/>\n<strong>Note:<\/strong> Use above query rather than what is displayed in the Screenshot.<\/p>\n<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>\n<p>&nbsp;<\/p>\n<div id=\"attachment_6416\" style=\"width: 766px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/01\/odbc-json-driver-generate-quickbooks-query.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-6416\" class=\"size-full wp-image-6416\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/01\/odbc-json-driver-generate-quickbooks-query.png\" alt=\"Preview \/ Generate Query in JSON Driver \/ XML Driver\" width=\"756\" height=\"432\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/01\/odbc-json-driver-generate-quickbooks-query.png 756w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/01\/odbc-json-driver-generate-quickbooks-query-300x171.png 300w\" sizes=\"(max-width: 756px) 100vw, 756px\" \/><\/a><p id=\"caption-attachment-6416\" class=\"wp-caption-text\">Preview \/ Generate Query in JSON Driver \/ XML Driver<\/p><\/div>\n<div class=\"content_block\" id=\"custom_post_widget-7051\">ZappySys ODBC Drivers built using ODBC standard which is widely adopted by industry for a long time. Which mean the majority of BI Tools \/ Database Engines \/ ETL Tools already there will support native \/ 3rd party ODBC Drivers. Below is the small list of most popular tools \/ programming languages our Drivers support. If your tool \/ programming language doesn't appear in the below list, which means we have not documented use case but as long as your tool supports ODBC Standard, our drivers should work fine.\r\n\r\n&nbsp;\r\n\r\n<img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"\/\/zappysys.com\/images\/odbc-powerpack\/odbc-powerpack-integration.jpg\" alt=\"ZappySys ODBC Drivers for REST API, JSON, XML - Integrate with Power BI, Tableau, QlikView, QlikSense, Informatica PowerCenter, Excel, SQL Server, SSIS, SSAS, SSRS, Visual Studio \/ WinForm \/ WCF, Python, C#, VB.net, PHP. PowerShell \" width=\"750\" height=\"372\" \/>\r\n<table style=\"valign: top;\">\r\n<tbody>\r\n<tr>\r\n<td>\r\n<p style=\"text-align: center;\"><strong>BI \/ Reporting Tools\r\nIntegration<\/strong><\/p>\r\n<\/td>\r\n<td style=\"text-align: center;\"><strong>ETL Tools\r\nIntegration\r\n<\/strong><\/td>\r\n<td style=\"text-align: center;\"><strong>Programming Languages<\/strong>\r\n<strong>Integration<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\r\n<ul>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/howto-import-json-rest-api-power-bi\/\" target=\"_blank\" rel=\"noopener\">Microsoft Power BI<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/import-rest-api-tableau-read-json-soap-xml-csv\/\">Tableau<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/read-rest-api-using-ssrs-reports-call-json-xml-web-service\/\" target=\"_blank\" rel=\"noopener\">SSRS (SQL Reporting Services)<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/qlik-rest-connector-examples-read-json-xml-api\/\" target=\"_blank\" rel=\"noopener\">QlikView \/Qlik Sense<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/call-rest-api-in-microstrategy-json-soap-xml\/\" target=\"_blank\" rel=\"noopener\">MicroStrategy<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/import-rest-api-google-sheet-call-appscript-load-json-soap-xml-csv\/\" target=\"_blank\" rel=\"noopener\">Google Sheet<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/import-json-excel-load-file-rest-api\/\" target=\"_blank\" rel=\"noopener\">Microsoft Excel<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/api\/integration-hub\/rest-api-connector\/access?context=connector\" target=\"_blank\" rel=\"noopener\">Microsoft Access<\/a><\/li>\r\n \t<li>Oracle OBIEE<\/li>\r\n \t<li>Many more (not in this list).....<\/li>\r\n<\/ul>\r\n<\/td>\r\n<td>\r\n<ul>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/read-json-informatica-import-rest-api-json-file\/\" target=\"_blank\" rel=\"noopener\">Informatica PowerCenter<\/a> (Windows)<\/li>\r\n \t<li>Informatica Cloud<\/li>\r\n \t<li>SSIS (SQL Integration Services)<\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/import-rest-api-json-sql-server\/\" target=\"_blank\" rel=\"noopener\">SQL Server<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/read-write-rest-api-data-in-talend-json-xml-soap\/\" target=\"_blank\" rel=\"noopener\">Talend Data Studio<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/pentaho-read-rest-api-in-pentaho\/\" target=\"_blank\" rel=\"noopener\">Pentaho Kettle<\/a><\/li>\r\n \t<li>Oracle OBIEE<\/li>\r\n \t<li>Many more (not in this list).....<\/li>\r\n<\/ul>\r\n<\/td>\r\n<td>\r\n<ul>\r\n \t<li>Visual Studio<\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/calling-rest-api-in-c\/\" target=\"_blank\" rel=\"noopener\">C#<\/a><\/li>\r\n \t<li>C++<\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/connect-java-to-rest-api-json-soap-xml\/\" target=\"_blank\" rel=\"noopener\">JAVA<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/set-rest-python-client\/\" target=\"_blank\" rel=\"noopener\">Python<\/a><\/li>\r\n \t<li>PHP<\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/call-rest-api-powershell-script-export-json-csv\/\" target=\"_blank\" rel=\"noopener\">PowerShell<\/a><\/li>\r\n \t<li><a href=\"https:\/\/zappysys.com\/blog\/import-rest-api-json-sql-server\/\" target=\"_blank\" rel=\"noopener\">T-SQL (Using Linked Server)<\/a><\/li>\r\n<\/ul>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n&nbsp;<\/div>\n<h2>Advanced Pivot with Path \/ Search and Replace Option<\/h2>\n<p>Now let&#8217;s look at an advanced scenario where you like to extract Pivot_Path (know where Pivoted Property came from). For that, you can download the latest version which providers IncludePivotPath and EnablePivotPathSearchReplace options as below.<\/p>\n<p>As you can see in the below example let&#8217;s say you like to extract table names and view names if defined under &#8220;views&#8221; node.<\/p>\n<pre class=\"lang:js decode:true\">{\r\n  \"table-1\": {\r\n      \"views\": {\r\n        \"view-tbl1-1\": {},\r\n        \"view-tbl1-2\": {}\r\n    }\r\n  },\r\n  \"table-2\": {\r\n      \"views\": {}\r\n  },\r\n  \"table-3\": {\r\n      \"views\": {\r\n        \"view-tbl3-1\": {}\r\n    }\r\n  }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>We set following<\/p>\n<ul>\n<li>On the Filter Options Tab<br \/>\nFilter =\u00a0<span class=\"lang:default highlight:0 decode:true crayon-inline\">$..views<\/span><\/li>\n<li>on the Pivot Columns To Rows Tab<br \/>\nCheck Enable Pivoting<br \/>\nCheck Include_PivotPath<br \/>\nCheck Enable Pivot_Path search\/replace<br \/>\nSet Search for <span class=\"lang:default highlight:0 decode:true crayon-inline \">(.*).views.(.*)&#8211;regex<\/span><br \/>\nSet Replace With <span class=\"lang:default highlight:0 decode:true crayon-inline \">$1<\/span><\/li>\n<\/ul>\n<div id=\"attachment_10406\" style=\"width: 522px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/advanced-pivot-path-search-replace.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10406\" class=\"size-full wp-image-10406\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/advanced-pivot-path-search-replace.png\" alt=\"Advanced Pivot Option - Search and Replace Path\" width=\"512\" height=\"650\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/advanced-pivot-path-search-replace.png 512w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/advanced-pivot-path-search-replace-236x300.png 236w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><p id=\"caption-attachment-10406\" class=\"wp-caption-text\">Advanced Pivot Option &#8211; Search and Replace Path<\/p><\/div>\n<p>&nbsp;<\/p>\n<h2>Conclusion<\/h2>\n<p>In this particle we saw how to use some advanced options for XML\/ JSON Source and ODBC Drivers. You can download respective product depending your usecase. For SSIS usecase <a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/\">Download SSIS PowerPack<\/a> and for other ETL \/ Reporting app integration scenarios (i.e. Power BI, Informatica, SSRS , Excel, MS Access, SQL Server, JAVA, C# &#8230;.)\u00a0<a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/\" target=\"_blank\" rel=\"noopener\">Download ODBC PowerPack<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In our previous post we saw various ways to transform JSON arrays. However there will be a time when your JSON \/ XML file wont have Array and you need to Pivot JSON Data. Sample JSON data file Here is a sample JSON file which we like to parse into rows and columns. Notice [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7977,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[277,17,62,278],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>Pivot JSON and XML data using SSIS or ODBC Drivers | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"Pivot JSON and XML data using SSIS or ODBC Drivers - ZappySys Blog\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Pivot JSON and XML data using SSIS or ODBC Drivers | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"Pivot JSON and XML data using SSIS or ODBC Drivers - ZappySys Blog\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ZappySys\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2019-09-11T21:36:09+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2023-09-11T20:52:55+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"681\" \/>\r\n\t<meta property=\"og:image:height\" content=\"120\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/zappysys\/\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/\",\"url\":\"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/\",\"name\":\"Pivot JSON and XML data using SSIS or ODBC Drivers | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png\",\"datePublished\":\"2019-09-11T21:36:09+00:00\",\"dateModified\":\"2023-09-11T20:52:55+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\"},\"description\":\"Pivot JSON and XML data using SSIS or ODBC Drivers - ZappySys Blog\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png\",\"width\":681,\"height\":120,\"caption\":\"Pivot JSON \/ XML Data option for ZappySys API Connectors \/ Drivers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pivot JSON and XML data using SSIS or ODBC Drivers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"sameAs\":[\"http:\/\/www.zappysys.com\/\",\"https:\/\/www.facebook.com\/ZappySys\/\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/\"],\"url\":\"https:\/\/zappysys.com\/blog\/author\/admin\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pivot JSON and XML data using SSIS or ODBC Drivers | ZappySys Blog","description":"Pivot JSON and XML data using SSIS or ODBC Drivers - ZappySys Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/","og_locale":"en_US","og_type":"article","og_title":"Pivot JSON and XML data using SSIS or ODBC Drivers | ZappySys Blog","og_description":"Pivot JSON and XML data using SSIS or ODBC Drivers - ZappySys Blog","og_url":"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/","og_site_name":"ZappySys Blog","article_author":"https:\/\/www.facebook.com\/ZappySys\/","article_published_time":"2019-09-11T21:36:09+00:00","article_modified_time":"2023-09-11T20:52:55+00:00","og_image":[{"width":681,"height":120,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png","type":"image\/png"}],"author":"ZappySys","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/zappysys\/","twitter_misc":{"Written by":"ZappySys","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/","url":"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/","name":"Pivot JSON and XML data using SSIS or ODBC Drivers | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png","datePublished":"2019-09-11T21:36:09+00:00","dateModified":"2023-09-11T20:52:55+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82"},"description":"Pivot JSON and XML data using SSIS or ODBC Drivers - ZappySys Blog","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/09\/pivot-json-xml-data-option.png","width":681,"height":120,"caption":"Pivot JSON \/ XML Data option for ZappySys API Connectors \/ Drivers"},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/pivot-json-xml-data-using-ssis-odbc-drivers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Pivot JSON and XML data using SSIS or ODBC Drivers"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","caption":"ZappySys"},"sameAs":["http:\/\/www.zappysys.com\/","https:\/\/www.facebook.com\/ZappySys\/","https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/"],"url":"https:\/\/zappysys.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/7975"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=7975"}],"version-history":[{"count":8,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/7975\/revisions"}],"predecessor-version":[{"id":7979,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/7975\/revisions\/7979"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/7977"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=7975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=7975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=7975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}