<?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>twitter Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/twitter/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/twitter/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 02 Oct 2025 19:16:52 +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>twitter Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/twitter/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to read Twitter data in SSIS using REST API Call</title>
		<link>https://zappysys.com/blog/read-twitter-data-in-ssis-using-rest-api-task-json-source-oauth2/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 22 Oct 2015 16:09:00 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[API Integration]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[json source]]></category>
		<category><![CDATA[looping]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[OAuthApp]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=93</guid>

					<description><![CDATA[<p>Introduction In this article you will how to Read Twitter data in SSIS using SSIS JSON Source and SSIS REST API Web Service Task. You will also learn about latest OAuth 2.0 Protocol to simplify REST API access. Twitter REST API Authentication In order to fetch any data from twitter using OAuth REST API calls [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-twitter-data-in-ssis-using-rest-api-task-json-source-oauth2/">How to read Twitter data in SSIS using REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="//zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-integration.png"><img decoding="async" class="alignleft wp-image-1660" src="//zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-integration.png" alt="" width="180" height="146" /></a>In this article you will <em>how to Read Twitter data in SSIS</em> using <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Web Service Task</a>. You will also learn about latest OAuth 2.0 Protocol to simplify REST API access.</p>
<h2>Twitter REST API Authentication</h2>
<p>In order to fetch any data from twitter using OAuth REST API calls you have to obtain two Keys (Consumer Key [Like UserID] and Consumer Secret [Like Password]). There are mainly two methods to read data from Twitter. Using <strong>Application-user authentication</strong> and <strong>Application Only authentication</strong>. Use correct method depending what type of information you want to pull from twitter. Most common method is <strong>Application-user authentication</strong> . If you want to read more about other methods then <a href="https://developer.twitter.com/en/docs/basics/authentication/overview" target="_blank" rel="noopener">click here</a></p>
<h2>Method 1 &#8211; Read Twitter data in SSIS using Application-user authentication</h2>
<p>In this method you will need twitter user account to connect Twitter API. Once first time authorization is done you don&#8217;t have to re-authenticate. Certain type of API calls only allowed by this method (such as POST new tweet using API). For any API call in Twitter very first step is create OAuth App (i.e. Register new App in Twitter developer portal).</p>
<h3>Using Default OAuth App Created by ZappySys</h3>
<p>To make your life easy ZappySys provides default App for certain OAuth providers (e.g. Google, Twitter). If you decide to create your own app for whatever reason then check next section on how to register twitter OAuth Application. See below screenshot how to use Twitter OAuth connection using Default App. Once you click Generate Token it will prompt you to login using Twitter account and then you can grant permission.</p>
<p><strong>Step-By-Step</strong></p>
<ol>
<li>Download and Install <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack FREE Trial</a> from <a href="//zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">this link</a></li>
<li>Create new SSIS Project and add new package.</li>
<li>Open Package. Go to control flow. Drag and drop Data Flow task from SSIS Toolbox
<div id="attachment_8028" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-8028" class="size-full wp-image-8028" src="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-8028" class="wp-caption-text">Dragging and dropping Data Flow Task into Control Flow</p></div></li>
<li>Go to Data flow designer.Drag and drop ZS JSON Source Component and double on it to configure it.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="size-full wp-image-3766" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>Enter any twitter API URL you want to call such as below<br />
<pre class="crayon-plain-tag">https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=zappysys&amp;count=4</pre>
</li>
<li>Now check use credentials option</li>
<li>Select new ZS-OAuth connection from dropdown</li>
<li>When new connection dialogbox pops up select Twitter from providers dropdown. Select Default App option for now.</li>
<li>Click Generate Token. It may ask you to login using your Twitter account credentials. If prompted click Approve.</li>
<li>If twitter OAuth grant approved then you will see Access Token and Access Token Secret both populated</li>
<li>Click Test Connection and if it works then click OK to close connection</li>
<li>On JSON Source you can now click Preview to see data from Twitter</li>
<li>You can optionally specify Filter expression [Click Select Filter button] to select result from specific JSON Node. For example if you want to select all Hashtags used inside each Tweet then select Filter like <strong>$.entities.hashtags[*]</strong></li>
<li>Click OK to close the UI</li>
<li>Drag ZS Trash Destination from Toolbox (Or you can use OLEDB Destination if you want to load inside SQL Server)</li>
<li>Connect JSON Source to ZS Trash Destination</li>
<li>Execute SSIS package</li>
</ol>
<div id="attachment_652" style="width: 710px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/fetch-twitter-data-rest-api-call-ssis-oauth-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-652" class="wp-image-652" src="//zappysys.com/blog/wp-content/uploads/2015/10/fetch-twitter-data-rest-api-call-ssis-oauth-connection.png" alt="Call Twitter REST API in SSIS - using OAuth Connection (Default App)" width="700" height="592" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/fetch-twitter-data-rest-api-call-ssis-oauth-connection.png 867w, https://zappysys.com/blog/wp-content/uploads/2015/10/fetch-twitter-data-rest-api-call-ssis-oauth-connection-300x254.png 300w" sizes="(max-width: 700px) 100vw, 700px" /></a><p id="caption-attachment-652" class="wp-caption-text">Call Twitter REST API in SSIS &#8211; using OAuth Connection (Default App)</p></div>
<h3>Using Custom OAuth App Created by you</h3>
<p>For some reason if you dont want to use Default Twitter App then you can register Custom App. It requires few extra steps listed in next section but it wont take more than few minutes. In Custom App option you have to specify ClientId and Client Secret (in above screenshot). Once you click Generate Token it will prompt you to login using Twitter account and then you can grant permission.</p>
<h3>Register/Create OAuth Application for twitter API Access</h3>
<p>Now lets look at how to register OAuth Application for Twitter API access.</p>
<p>Goto <a href="https://apps.twitter.com/app/new" target="_blank" rel="noopener">https://apps.twitter.com/app/new</a> and create new app by providing necessary information. Don&#8217;t get confused by calling it App, its just way in twitter to create multiple API Access Keys so you can grant different level of access to different users. Once app is created you will be taken to page where your Consumer Key and Secret Key will be listed.</p>
<div id="attachment_103" style="width: 502px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/create-twitter-app-access-new-consumer-key-secreat-key.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-103" class="size-full wp-image-103" src="//zappysys.com/blog/wp-content/uploads/2015/10/create-twitter-app-access-new-consumer-key-secreat-key.png" alt="Create Twitter Application - REST API Access for Developer" width="492" height="643" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/create-twitter-app-access-new-consumer-key-secreat-key.png 492w, https://zappysys.com/blog/wp-content/uploads/2015/10/create-twitter-app-access-new-consumer-key-secreat-key-230x300.png 230w" sizes="(max-width: 492px) 100vw, 492px" /></a><p id="caption-attachment-103" class="wp-caption-text">Create Twitter Application &#8211; REST API Access for Developer</p></div>
<h3>Obtaining Consumer Key and Consumer Secret from Twitter</h3>
<p>Once app is created you can go to <b>Keys and Access Tokens</b> tab. Here you will find Consumer Key and Consumer Secret.<br />
Consumer Key can be Public but Consumer Secret must not be shared (think it like a password).</p>
<div id="attachment_102" style="width: 661px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-consumer-key-and-access-key.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-102" class="size-full wp-image-102" src="//zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-consumer-key-and-access-key.png" alt="Obtain Twitter API Consumer Key and Consumer Secret - REST API Access for Developer" width="651" height="465" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-consumer-key-and-access-key.png 651w, https://zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-consumer-key-and-access-key-300x214.png 300w" sizes="(max-width: 651px) 100vw, 651px" /></a><p id="caption-attachment-102" class="wp-caption-text">Obtain Twitter API Consumer Key and Consumer Secret &#8211; REST API Access for Developer</p></div>
<h2>Method 2 &#8211; Read Twitter data in SSIS &#8211; Application-only authentication</h2>
<p>For some reason if you don&#8217;t want to use Twitter user account to access data (e.g. Giving access to consultant so he can access you company Twitter Account via API). In this scenario you have to use Application Only method. In this method you don&#8217;t authorize application using Login form.</p>
<p>Here is our basic flow to access twitter data.</p>
<ol>
<li>Get Bearer Access Token by calling https://api.twitter.com/oauth2/token service (Use POST method and Pass BASE64 encoded ConsumerKey and Consumer Secret)</li>
<li>Call any twitter service by passing Bearer AccessToken we retrieved in previous step.<strong>NOTE:</strong> Any access to twitter service is over HTTPS so automatically your tokens passed along request is encrypted before sending over wire unless someone know how to hack SSL 🙂</li>
</ol>
<h3>Application Only Authentication using REST API task &#8211; Get Access Token</h3>
<p>Once we create SSIS Package &#8211; First step to access any twitter data will be get Access Token. As you can see from below screenshot we have called https://api.twitter.com/oauth2/token service URL with POST method. Notice how we have supplied POST data and 2 headers. Authorization header contains BASE64 encoded value of <strong>YourConsumerKey:YourConsumerSecret</strong></p>
<div id="attachment_107" style="width: 841px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/ssis-twitter-rest-api-call-get-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-107" class="size-full wp-image-107" src="//zappysys.com/blog/wp-content/uploads/2015/10/ssis-twitter-rest-api-call-get-token.png" alt="SSIS Twitter REST API Get Token" width="831" height="465" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-twitter-rest-api-call-get-token.png 831w, https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-twitter-rest-api-call-get-token-300x168.png 300w" sizes="(max-width: 831px) 100vw, 831px" /></a><p id="caption-attachment-107" class="wp-caption-text">SSIS Twitter REST API Get Token</p></div>
<h3>Fetch data from Twitter using JSON Source &#8211; Deformalize nested JSON</h3>
<p>Once we have Authentication Token we are ready <b>pull twitter data</b> using JSON Source. Check below screenshot how we have supplied Token in Authorization Header. JSON Source can make your JSON look like normal table (It also de-normalize nested JSON into flat dataset. If you want to extract subset of JSON then simply specify JSON Path expression e.g. $.data.users[*]
<div id="attachment_108" style="width: 852px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/read-twitter-data-in-ssis-json-source-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-108" class="size-full wp-image-108" src="//zappysys.com/blog/wp-content/uploads/2015/10/read-twitter-data-in-ssis-json-source-rest-api.png" alt="Read JSON response of Twitter REST API in SSIS" width="842" height="520" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/read-twitter-data-in-ssis-json-source-rest-api.png 842w, https://zappysys.com/blog/wp-content/uploads/2015/10/read-twitter-data-in-ssis-json-source-rest-api-300x185.png 300w" sizes="(max-width: 842px) 100vw, 842px" /></a><p id="caption-attachment-108" class="wp-caption-text">Read JSON response of Twitter REST API in SSIS</p></div>
<h3>Load Twitter JSON data to SQL Server</h3>
<p>You can easily connect your <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source</a> to OLEDB Destination if you want to load Twitter Data to some RDBMS such as SQL Server, MySQL.</p>
<h2>Handling paging of large REST API result set with twitter data &#8211; looping/cursoring</h2>
<p>Most of REST API limit total data sent in single response. So if you wish to get all records then you have to loop through multiple results. Twitter provides looping mechanism using Cursor<a href="https://dev.twitter.com/overview/api/cursoring" target="_blank" rel="noopener">Click here to read more</a></p>
<p>In our case <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source</a> Supports Paging very well so we are covered. To loop through multiple result sets of twitter data simply configure following 3 properties. See below screenshot.</p>
<div id="attachment_100" style="width: 514px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/loop-through-twitter-rest-api-result-cursor-paging.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-100" class="size-full wp-image-100" src="//zappysys.com/blog/wp-content/uploads/2015/10/loop-through-twitter-rest-api-result-cursor-paging.png" alt="Twitter REST API - Paging Example -Loop through resultset using cursor" width="504" height="440" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/loop-through-twitter-rest-api-result-cursor-paging.png 504w, https://zappysys.com/blog/wp-content/uploads/2015/10/loop-through-twitter-rest-api-result-cursor-paging-300x262.png 300w" sizes="(max-width: 504px) 100vw, 504px" /></a><p id="caption-attachment-100" class="wp-caption-text">Twitter REST API &#8211; Paging Example -Loop through resultset using cursor</p></div>
<h2>Word of caution about too many requests</h2>
<p>Twitter does not allow you request too much data too quickly so be careful how many requests you make :). Check their official page on twitter Rate Limit for REST API. You can add delay after each request if you doing pagination. Go to <strong>Throttling tab</strong> of JSON/XML Source. You can change setting there based on API restriction. For example if API allows only 30 requests per minute then adding 2 seconds delay will make sure you wont exceed 30 requests in 1 minute.</p>
<p>To learn more about <a href="https://dev.twitter.com/rest/public/rate-limits" target="_blank" rel="noopener">rate limit of Twitter API check this table</a></p>
<h2>Handling Twitter API Date Format (Parse Twitter Date/Time)</h2>
<p>Twitter returns date in the following format e.g. Fri May 03 15:22:09 +0000 2013 to parse this to correct date/time datatype you can use Date/Time Handling Tab of JSON/XML Source.</p>
<p>Change Custom Date Format as below and preview Twitter data.</p>
<div id="attachment_693" style="width: 821px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/parse-twitter-date-time-format.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-693" class="size-full wp-image-693" src="//zappysys.com/blog/wp-content/uploads/2015/10/parse-twitter-date-time-format.png" alt="Parsing Twitter API date/time format" width="811" height="249" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/parse-twitter-date-time-format.png 811w, https://zappysys.com/blog/wp-content/uploads/2015/10/parse-twitter-date-time-format-300x92.png 300w" sizes="(max-width: 811px) 100vw, 811px" /></a><p id="caption-attachment-693" class="wp-caption-text">Parsing Twitter API date/time format</p></div>
<h2>Download related files</h2>
<p>Below is sample SSIS package<br />
<a href="//zappysys.com/blog/wp-content/uploads/2015/11/TwitterFetchDemo_2012.zip">Twitter Demo SSIS 2012</a></p>
<h2>Conclusion</h2>
<p>So you have now seen how easy it is to access twitter data with OAuth 2.0 using <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Web Service Task</a>. We have also seen how to loop through large resultset using inbuilt Paging support of JSON Source.</p>
<p>The post <a href="https://zappysys.com/blog/read-twitter-data-in-ssis-using-rest-api-task-json-source-oauth2/">How to read Twitter data in SSIS using REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read OData in SSIS &#8211; REST API Example</title>
		<link>https://zappysys.com/blog/odata-paging-rest-api-paging-using-ssis-json-source/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 10 Sep 2015 14:07:04 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[paging]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=39</guid>

					<description><![CDATA[<p>Introduction In this article, we will learn how to utilize the SSIS JSON Source Component to retrieve JSON data from an OData service and perform OData pagination on significant results. According to the OData specification, data can be presented in either JSON or XML format. For the XML format, refer to this article. This article primarily [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/odata-paging-rest-api-paging-using-ssis-json-source/">How to read OData in SSIS &#8211; REST API Example</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, we will learn how to utilize the SSIS JSON Source Component to retrieve JSON data from an OData service and perform OData pagination on significant results. <span style="box-sizing: border-box; margin: 0px; padding: 0px;">According to the OData specification, data can be presented in either JSON or XML format. For the XML format, refer to <a href="https://zappysys.com/blog/read-sap-s4-hana-data-ssis-cloud-odata-rest-api/" target="_blank" rel="noopener">this article</a>.</span> This article primarily covers the OData JSON API example.</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes 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>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <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>
</ol></div>
<h2>REST API Pagination concept</h2>
<p>Most of the REST API Services limit the size of the dataset returned in a single request. When more data is found, it simply includes a pointer to the following result set. If you wish to fetch all data (e.g., loop through), you must check the following result set indicator. If it is not null, you can continue fetching until all data is retrieved. <span style="box-sizing: border-box; margin: 0px; padding: 0px;">This article covers several pagination methods</span>.</p>
<h2>Reading OData API in SSIS using JSON Source</h2>
<p>Let&#8217;s discuss how to read the OData API and Paginate Automatically. Below is a typical OData service Response (JSON Format). Notice how it includes the nextLink attribute, which points to the following URL to fetch more data. When you set <strong>Data </strong><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><strong>Format to OData</strong> in the JSON Source, it will handle</span> pagination for you.</p>
<p><strong>Request URL: </strong></p><pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Order_Details?$format=json</pre><p>
<b>Response:</b></p><pre class="crayon-plain-tag">{
  &quot;odata.metadata&quot;: &quot;https://services.odata.org/V3/Northwind/Northwind.svc/$metadata#Order_Details&quot;,
  &quot;value&quot;: [
    {
      &quot;OrderID&quot;: 10248,
      &quot;ProductID&quot;: 11,
      &quot;Discount&quot;: 0
    },
 ........
 ........
  ],
  &quot;odata.nextLink&quot;: &quot;Order_Details?$skiptoken=10436,75&quot;
}</pre><p>
<h3>Step-By-Step</h3>
<p>In this section, you will learn how to use the JSON Source Adapter to extract data from the OData API.</p>
<ol>
<li><span style="box-sizing: border-box; margin: 0px; padding: 0px;">Firstly, you need to <strong>download and install</strong> SSIS <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">ZappySys PowerPack.</a></span></li>
<li>Once you have finished the first step, Open Visual Studio and create a New SSIS Package Project.</li>
<li>Now, Drag and Drop the SSIS <strong>Data Flow Task</strong> from the SSIS Toolbox.
<div id="attachment_11529" style="width: 472px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/drag-and-drop-data-flow-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11529" class="size-full wp-image-11529" src="https://zappysys.com/blog/wp-content/uploads/2015/09/drag-and-drop-data-flow-task.png" alt="" width="462" height="157" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/drag-and-drop-data-flow-task.png 462w, https://zappysys.com/blog/wp-content/uploads/2015/09/drag-and-drop-data-flow-task-300x102.png 300w" sizes="(max-width: 462px) 100vw, 462px" /></a><p id="caption-attachment-11529" class="wp-caption-text">SSIS Data Flow Task &#8211; Drag and Drop</p></div></li>
<li>Double-click on the Data Flow task to see the Data Flow designer surface.</li>
<li>From the SSIS toolbox, drag and drop the JSON Source onto the Data Flow Designer surface.
<div id="attachment_11533" style="width: 553px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11533" class="size-full wp-image-11533" src="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png" alt="" width="543" height="146" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png 543w, https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag-300x81.png 300w" sizes="(max-width: 543px) 100vw, 543px" /></a><p id="caption-attachment-11533" class="wp-caption-text">SSIS JSON Source &#8211; Drag and Drop</p></div></li>
<li>Double-click JSON Source and enter URL for OData API (You may use the below example URL for demo)<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Order_Details?$format=json</pre>
&nbsp;</li>
<li>Now configure Array Filter as below (you may see <strong>$.value[*]</strong> or some other node if URL is different)
<div id="attachment_11531" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/OData-Paging-using-SSIS-JSON-Source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11531" class="size-full wp-image-11531" src="https://zappysys.com/blog/wp-content/uploads/2015/09/OData-Paging-using-SSIS-JSON-Source.png" alt="" width="828" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/OData-Paging-using-SSIS-JSON-Source.png 828w, https://zappysys.com/blog/wp-content/uploads/2015/09/OData-Paging-using-SSIS-JSON-Source-300x270.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/09/OData-Paging-using-SSIS-JSON-Source-768x691.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11531" class="wp-caption-text">OData Paging using SSIS JSON Source</p></div></li>
<li>Click Preview data and OK to save
<div id="attachment_11532" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/Read-JSON-File-data-from-Web-Url-Example-in-SSIS.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11532" class="size-full wp-image-11532" src="https://zappysys.com/blog/wp-content/uploads/2015/09/Read-JSON-File-data-from-Web-Url-Example-in-SSIS.png" alt="" width="828" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/Read-JSON-File-data-from-Web-Url-Example-in-SSIS.png 828w, https://zappysys.com/blog/wp-content/uploads/2015/09/Read-JSON-File-data-from-Web-Url-Example-in-SSIS-300x270.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/09/Read-JSON-File-data-from-Web-Url-Example-in-SSIS-768x691.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11532" class="wp-caption-text">Read JSON File data from Web URL Example in SSIS</p></div></li>
<li>Now click OK to save.</li>
<li>Connect Your Source with a target like ZS Trash destination and execute the package. You will notice in the log that it paginates to return all rows
<div id="attachment_11530" style="width: 932px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/Fetch-OData-in-SSIS-REST-API-Example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11530" class="size-full wp-image-11530" src="https://zappysys.com/blog/wp-content/uploads/2015/09/Fetch-OData-in-SSIS-REST-API-Example.png" alt="" width="922" height="148" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/Fetch-OData-in-SSIS-REST-API-Example.png 922w, https://zappysys.com/blog/wp-content/uploads/2015/09/Fetch-OData-in-SSIS-REST-API-Example-300x48.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/09/Fetch-OData-in-SSIS-REST-API-Example-768x123.png 768w" sizes="(max-width: 922px) 100vw, 922px" /></a><p id="caption-attachment-11530" class="wp-caption-text">Fetch OData in SSIS (REST API Example)</p></div></li>
</ol>
<h2>Loading OData API into SQL Server / Other Target using SSIS</h2>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2>Twitter(Now X) REST API Paging Example using SSIS JSON Source</h2>
<p>The Twitter (Now X) REST API is not an OData format, but you can see a similar concept there as well. On Twitter, you don&#8217;t have a partial URL like OData for the following link, but it provides a unique identifier for some sort of record. <a href="https://developer.x.com/en/docs/x-api/v1/pagination" target="_blank" rel="noopener">Read here</a> for more information on the Twitter REST API Paging technique.</p>
<p>In our case, <a target="_blank" rel="noopener">SSIS JSON Source</a> Supports Paging very well, so we are covered. To loop through multiple result sets of Twitter data, simply configure the following four properties. See the screenshot below.</p>
<div class="mceTemp"></div>
<div id="attachment_11536" style="width: 869px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11536" class="size-full wp-image-11536" src="https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor.png" alt="" width="859" height="578" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor.png 859w, https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor-768x517.png 768w, https://zappysys.com/blog/wp-content/uploads/2015/09/TwitterX-REST-API-Paging-Example-Loop-through-resultset-using-cursor-272x182.png 272w" sizes="(max-width: 859px) 100vw, 859px" /></a><p id="caption-attachment-11536" class="wp-caption-text">Twitter(X) REST API &#8211; Paging Example -Loop through resultset using cursor</p></div>
<h2>Conclusion</h2>
<p><span style="box-sizing: border-box; margin: 0px; padding: 0px;">Based on the above examples, you can see that handling Raging in REST API calls is not straightforward, but using Components like <a target="_blank" rel="noopener">SSIS JSON Source</a> can take some work off your plate.</span></p>
<p>The post <a href="https://zappysys.com/blog/odata-paging-rest-api-paging-using-ssis-json-source/">How to read OData in SSIS &#8211; REST API Example</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
