<?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>SSIS Tips &amp; How-Tos Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/ssis-tips/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/ssis-tips/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 16 Apr 2026 21:54:16 +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>SSIS Tips &amp; How-Tos Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/ssis-tips/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Some tips for the SSIS Send HTML Email Task</title>
		<link>https://zappysys.com/blog/tips-ssis-send-html-email-task/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Thu, 26 Oct 2023 22:07:51 +0000</pubDate>
				<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10667</guid>

					<description><![CDATA[<p>Introduction Sending an email with HTML can be difficult if you want to be stylish. In this article, we will show you some examples with CSS that will help you send better emails. We will use the HTML Email Task. You can check the article here First, drag and drop the HTML Email Task. Next, let&#8217;s [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/tips-ssis-send-html-email-task/">Some tips for the SSIS Send HTML Email Task</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><strong>Introduction</strong></h2>
<p>Sending an email with HTML can be difficult if you want to be stylish. In this article, we will show you some examples with CSS that will help you send better emails. We will use the HTML Email Task. You can <a href="https://zappysys.com/products/ssis-powerpack/ssis-send-html-email-task/">check the article here</a></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>
<p>First, drag and drop the HTML Email Task. Next, let&#8217;s work on formatting and combining rows. This will help create more flexible tables within the email. After making these changes, you can use the preview button to check the result.</p>
<p><strong>Note: Make sure the &lt;style&gt; is the first thing you use in the body of the email.</strong></p>
<div>
<pre class="crayon-plain-tag">&lt;style&gt;
    table {
border-collapse: collapse;
width: 100%;
border: 1px solid green;
}

    th,
    td {
border: 1px solid blue;
padding: 5px;
}

    th {
background-color: orange;
}

    td.resultado {
font-weight: bold;
}
&lt;/style&gt;

&lt;table border="1"&gt;
    &lt;tr&gt;
        &lt;th&gt;Header 1&lt;/th&gt;
        &lt;th&gt;Header 2&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td rowspan="2"&gt;Combined Cell&lt;/td&gt;
        &lt;td&gt;Row 1, Cell 2&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Row 2, Cell 2&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;</pre>
</div>
<div id="attachment_10674" style="width: 733px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/html-tricks-1.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-10674" class="size-full wp-image-10674" src="https://zappysys.com/blog/wp-content/uploads/2023/10/html-tricks-1.png" alt="HTML trick tables" width="723" height="148" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/html-tricks-1.png 723w, https://zappysys.com/blog/wp-content/uploads/2023/10/html-tricks-1-300x61.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/10/html-tricks-1-720x148.png 720w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-10674" class="wp-caption-text">Example for the tables</p></div>
<p>In the following example, we&#8217;ll demonstrate how to modify the email&#8217;s body and text, including changing colors, size, and font styles for specific text elements.</p><pre class="crayon-plain-tag">&lt;style&gt;
body {
font-family: Arial, sans-serif; /* Change font */
background-color: #bdb5f0; /* Change background color */
}

h1 {
color: #5bb258; /* Change color for 'h1' elements*/
}

p {
color: #da0e0e; /* Change color and line height for 'p' elements*/
line-height: 1.5;
}

.highlight {
background-color: yellow; /* highlight a section */
}

#important {
font-weight: bold; /* bold only id = important*/
}
a.visited-link {
color: blue;
/* initial color */
text-decoration: none;
/* removes decoration */
}

/* clicked url */
a.visited-link:visited {
color: red;
/* it will change the color from the URL */
}
&lt;/style&gt;

&lt;h1&gt;HTML with CSS Examples&lt;/h1&gt;
&lt;p&gt;This is a simple HTML document with some CSS styling examples.&lt;/p&gt;
&lt;p&gt;This paragraph has a &lt;span class="highlight"&gt;highlighted background&lt;/span&gt;.&lt;/p&gt;
&lt;p id="important"&gt;This paragraph is important.&lt;/p&gt;
&lt;a href="https://zappysys.com/products/ssis-powerpack/" class="visited-link"&gt;Zappysys SSIS&lt;/a&gt;
&lt;a href="https://zappysys.com/products/odbc-powerpack/" class="visited-link"&gt;Zappysys ODBC&lt;/a&gt;</pre><p>
<div id="attachment_10676" style="width: 494px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/html-tricks-3.png"><img decoding="async" aria-describedby="caption-attachment-10676" class="size-full wp-image-10676" src="https://zappysys.com/blog/wp-content/uploads/2023/10/html-tricks-3.png" alt="HTML trick strings" width="484" height="263" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/html-tricks-3.png 484w, https://zappysys.com/blog/wp-content/uploads/2023/10/html-tricks-3-300x163.png 300w" sizes="(max-width: 484px) 100vw, 484px" /></a><p id="caption-attachment-10676" class="wp-caption-text">Example with font, color and background</p></div>
<p>After implementing these changes, this is how your email will appear. Please note that this is just an example, and you have various options to further customize your email.</p>
<h2><strong>Conclusion</strong></h2>
<p>In conclusion, CSS can transform your emails into more visually appealing and effective communication tools. For more information on using CSS in HTML files, you can explore <a href="https://www.w3schools.com/css/">this resource here</a>. With CSS, you can create even more impressive email examples</p>
<p>The post <a href="https://zappysys.com/blog/tips-ssis-send-html-email-task/">Some tips for the SSIS Send HTML Email Task</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Common SSIS expressions example in our tool</title>
		<link>https://zappysys.com/blog/common-ssis-expressions-example-tool/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Thu, 19 Oct 2023 21:56:31 +0000</pubDate>
				<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10437</guid>

					<description><![CDATA[<p>Introduction SSIS PowerPack offers versatile ways to make your data integration dynamic through the use of expressions and variables. Often, you&#8217;ll encounter scenarios where you need to consume data from dynamic sources, such as URLs, headers, or request bodies. In this article, we&#8217;ll explore different techniques for achieving dynamic data manipulation using expressions and variables. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/common-ssis-expressions-example-tool/">Common SSIS expressions example in our tool</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="/products/ssis-powerpack/">SSIS PowerPack</a> offers versatile ways to make your data integration dynamic through the use of expressions and variables. Often, you&#8217;ll encounter scenarios where you need to consume data from dynamic sources, such as URLs, headers, or request bodies. In this article, we&#8217;ll explore different techniques for achieving dynamic data manipulation using expressions and variables.</p>
<h2>Making some common expressions for SSIS</h2>
<p>In SSIS PowerPack, you have access to a wide range of expressions that can be applied in various contexts. Here&#8217;s a list of some common SSIS expressions that you can leverage:</p>
<p><strong>Concatenation</strong>: Combining multiple strings or variables into one. For example, to create a file path: <code>"C:\\Folder\\" + @[User::FileName]</code></p>
<p><strong>Date and Time Functions</strong>: Functions like <code>GETDATE()</code></p>
<p><strong>Conditional Expressions</strong>: The ternary operator or the IF() function can be used to implement conditional logic. For example, <code>(@[User::number] &gt; 70) ? "Approve" : "Fail"</code></p>
<p><strong>String Functions</strong>: Functions like <code>LEN()</code>, <code>SUBSTRING()</code>, <code>UPPER()</code>, <code>LOWER()</code>, and <code>TRIM()</code> are often used to manipulate string data.</p>
<p><strong>Mathematical Expressions</strong>: Like Adding two or more numeric variables<code>@[User::number1]+ @[User::number2]</code></p>
<p><strong>NULL Handling</strong>: Replace NULL with a default value <code><span class="hljs-built_in"><span class="hljs-selector-tag">ISNULL</span>(@[<span class="hljs-attribute">User</span>::NullableField]) ? "<span class="hljs-selector-tag">N</span>/<span class="hljs-selector-tag">A</span>" : @<span class="hljs-selector-attr">[User::NullableField]</span></span></code></p>
<h2><strong>Body, URL, and Header Expressions</strong></h2>
<p>SSIS PowerPack supports the use of expressions with variables in the body, URL, and headers. This flexibility allows for easy editing and dynamic value assignment. Variable placeholders, which are directly visible, can be used to inject dynamic values. Take a look at the screenshot below to understand how to use variable placeholders, which are replaced by the actual values of SSIS variables at runtime through expressions:</p>
<div id="attachment_10499" style="width: 895px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions2.png"><img decoding="async" aria-describedby="caption-attachment-10499" class="wp-image-10499 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions2.png" alt="" width="885" height="444" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions2.png 885w, https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions2-300x151.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions2-768x385.png 768w" sizes="(max-width: 885px) 100vw, 885px" /></a><p id="caption-attachment-10499" class="wp-caption-text">Some examples of how expressions with variables can be used in components.</p></div>
<p><strong>JSON Destination</strong></p>
<div id="attachment_10555" style="width: 748px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/expressions.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10555" class="wp-image-10555 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/09/expressions.png" alt="" width="738" height="725" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/expressions.png 738w, https://zappysys.com/blog/wp-content/uploads/2023/09/expressions-300x295.png 300w" sizes="(max-width: 738px) 100vw, 738px" /></a><p id="caption-attachment-10555" class="wp-caption-text">In scenarios where you need to send data to a JSON destination, expressions with variables can be highly beneficial.</p></div>
<p><strong>Example for REST API Task</strong></p>
<div id="attachment_10500" style="width: 850px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions3.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10500" class="wp-image-10500 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions3.png" alt="" width="840" height="717" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions3.png 840w, https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions3-300x256.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions3-768x656.png 768w" sizes="(max-width: 840px) 100vw, 840px" /></a><p id="caption-attachment-10500" class="wp-caption-text">The REST API task is another area where dynamic data manipulation is crucial. Expressions and variables can be applied effectively in this context.</p></div>
<p><strong>Example for Source Components</strong></p>
<div id="attachment_10501" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions4.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10501" class="wp-image-10501 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions4.png" alt="" width="828" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions4.png 828w, https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions4-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/common-expressions4-768x682.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-10501" class="wp-caption-text">JSON source example: you can employ expressions and variables to ensure your data retrieval is dynamic and flexible.</p></div>
<h2><strong>Data Flow Expressions and Control Flow</strong></h2>
<p>To further enhance your dynamic data handling capabilities, you can use expressions in both the data flow and control flow of SSIS. Here are some articles that delve into the specifics of using expressions in these contexts:</p>
<p><a href="https://zappysys.zendesk.com/hc/en-us/articles/4787452038171-How-to-parameterize-SSIS-Task-Property-using-Expression-to-make-it-dynamic">How to parameterize SSIS Task Property using Expression to make it dynamic</a></p>
<p><a href="https://zappysys.com/blog/ssis-dataflow-expression-source-component-property/">How to set SSIS Data Flow component property using expression and variable</a></p>
<h2>Conclusion</h2>
<p>By harnessing expressions and variables in SSIS PowerPack, you can create dynamic and adaptable data integration solutions tailored to your specific needs.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/common-ssis-expressions-example-tool/">Common SSIS expressions example in our tool</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to add row numbers in SSIS data flow</title>
		<link>https://zappysys.com/blog/add-row-numbers-ssis-data-flow/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 07 Oct 2022 15:34:28 +0000</pubDate>
				<category><![CDATA[SSIS Template Transform]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[format specifiers]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[placeholder functions]]></category>
		<category><![CDATA[row numbers]]></category>
		<category><![CDATA[template transform]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9828</guid>

					<description><![CDATA[<p>Problem Sometimes Data Flow source does not contain an ID column, or a number indicating a row number, which you need in further steps. To solve this, you may use a free ZappySys PowerPack component Template Transform. So let&#8217;s take a look at how to accomplish that. &#160; &#160; Tip Add Template Transform Go to [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/add-row-numbers-ssis-data-flow/">How to add row numbers in SSIS data flow</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Problem</h2>
<p><img loading="lazy" decoding="async" class="size-full wp-image-9829 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2022/10/logo-add-row-number-to-ssis-data-flow.png" alt="" width="120" height="120" />Sometimes Data Flow source does not contain an ID column, or a number indicating a row number, which you need in further steps. To solve this, you may use a <strong>free</strong> <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys PowerPack</a> component <a href="https://zappysys.com/products/ssis-powerpack/ssis-template-transform-free/" target="_blank" rel="noopener">Template Transform</a>. So let&#8217;s take a look at how to accomplish that.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Tip</h2>
<h3>Add Template Transform</h3>
<p>Go to the Data Flow, drag and drop Template Transform from SSIS toolbox, and connect it right after the source, which does not provide ID/row number:</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-9831 size-full" src="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow.png" alt="" width="283" height="536" srcset="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow.png 283w, https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-158x300.png 158w" sizes="(max-width: 283px) 100vw, 283px" /></p>
<h3>Configure Template Transform</h3>
<p>Template Transform will provide the row number we want. So configure it like this: in the text area enter <code>&lt;&lt;FUN_SEQUENCE&gt;&gt;</code> and optionally you can give this column a name, e.g. <code>RowNumber</code>.</p>
<div id="attachment_9832" style="width: 712px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9832" class="size-full wp-image-9832" src="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-template-transform.png" alt="" width="702" height="673" srcset="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-template-transform.png 702w, https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-template-transform-300x288.png 300w" sizes="(max-width: 702px) 100vw, 702px" /><p id="caption-attachment-9832" class="wp-caption-text">Configure Template Transform to get row numbers for each row in SSIS</p></div>
<p>By default <em>Template Transform&#8217;s</em> output type is DT_NTEXT. So if you wish to change the type to, for example, integer, use the <em>Derived Column</em> connector and CAST function to change it, e.g.:</p>
<p><code>(DT_I4)(DT_WSTR,100)RowNumber</code></p>
<div id="attachment_9842" style="width: 707px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9842" class="wp-image-9842" src="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-derived-column-1.png" alt="" width="697" height="558" srcset="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-derived-column-1.png 777w, https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-derived-column-1-300x240.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-derived-column-1-768x615.png 768w" sizes="(max-width: 697px) 100vw, 697px" /><p id="caption-attachment-9842" class="wp-caption-text">Derived column added to convert DT_NTEXT column to an integer type.</p></div>
<h3>Result</h3>
<p>In the data viewer you would see that you have a column with a different row number in each row:</p>
<div id="attachment_9835" style="width: 603px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9835" class="wp-image-9835 size-full" src="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-result.png" alt="" width="593" height="410" srcset="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-result.png 593w, https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-result-300x207.png 300w" sizes="(max-width: 593px) 100vw, 593px" /><p id="caption-attachment-9835" class="wp-caption-text">Results: How to add row numbers to rows in SSIS data flow</p></div>
<p>The post <a href="https://zappysys.com/blog/add-row-numbers-ssis-data-flow/">How to add row numbers in SSIS data flow</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to create SSIS Package Programmatically (Add / Execute Tasks)</title>
		<link>https://zappysys.com/blog/create-ssis-package-programmatically-add-execute-connections-tasks/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 31 Dec 2021 15:00:01 +0000</pubDate>
				<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS SFTP Task]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9500</guid>

					<description><![CDATA[<p>Introduction In this post, we will see how to create SSIS Package Programmatically to use ZappySys SSIS PowerPack. This blog post assumes you have basic knowledge of Programming language like C# and you have installed Visual Studio Express or a similar product (VS Code not supported). Add SSIS Dll References The very first thing is [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/create-ssis-package-programmatically-add-execute-connections-tasks/">How to create SSIS Package Programmatically (Add / Execute Tasks)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this post, we will see how to create SSIS Package Programmatically to use <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>. This blog post assumes you have basic knowledge of Programming language like C# and you have installed <strong>Visual Studio Express</strong> or a similar product (<strong>VS Code not supported</strong>).</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>Add SSIS Dll References</h2>
<p>The very first thing is to create a C# Project (i.e. Console or WinForm). Add SSIS dll reference.</p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2021/12/create-ssis-package-programatically-add-dll-reference-visual-studio.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9503" src="https://zappysys.com/blog/wp-content/uploads/2021/12/create-ssis-package-programatically-add-dll-reference-visual-studio.png" alt="" width="778" height="604" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/create-ssis-package-programatically-add-dll-reference-visual-studio.png 778w, https://zappysys.com/blog/wp-content/uploads/2021/12/create-ssis-package-programatically-add-dll-reference-visual-studio-300x233.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/12/create-ssis-package-programatically-add-dll-reference-visual-studio-768x596.png 768w" sizes="(max-width: 778px) 100vw, 778px" /></a></p>
<p>You will need the following references in your project. The below example is for SSIS 2017 (Version 14.x.x)</p>
<ul>
<li>For SSIS 2012 change to Version=11.0.0.0</li>
<li>For SSIS 2014 change to Version=12.0.0.0</li>
<li>For SSIS 2016 change to Version=13.0.0.0</li>
<li>For SSIS 2017 change to Version=14.0.0.0</li>
<li>For SSIS 2019 change to Version=15.0.0.0</li>
<li>And may be future versions same way &#8230;.</li>
</ul>
<pre class="crayon-plain-tag">&lt;Reference Include="Microsoft.SqlServer.Dts.Design"/&gt;
&lt;Reference Include="Microsoft.SqlServer.DTSPipelineWrap" /&gt;
&lt;Reference Include="Microsoft.SQLServer.DTSRuntimeWrap" /&gt;
&lt;Reference Include="Microsoft.SQLServer.ManagedDTS" /&gt;
&lt;Reference Include="Microsoft.SqlServer.PipelineHost" /&gt;</pre>
<h2>Step-By-Step Example (Create SSIS Package Programmatically &#8211; C#)</h2>
<p>Now let&#8217;s see each piece to create SSIS Package in code and later we will show the full code.</p>
<h3>Import Namespaces</h3>
<p>First step is at the top you need to import some namespaces.</p><pre class="crayon-plain-tag">using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Pipeline;
//using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
//using Microsoft.SqlServer.Dts.Runtime.Wrapper;</pre><p>
<h3></h3>
<h3>Create SSIS Package</h3>
<p>Here how you can create SSIS Package instance in code</p><pre class="crayon-plain-tag">var p = new Package();</pre><p>
<h3>Add SSIS Connection</h3>
<p>Now lets add connection manager to our package instance. To add connection you will need two pieces. Creation Name (i.e. ZS-SFTP) and ConnectionString. You can find creation name from exsing Dtsx file by opening in text editor.</p><pre class="crayon-plain-tag">var conn1=p.Connections.Add(&quot;ZS-SFTP&quot;);
conn1.Name = &quot;MySftpConnection&quot;;
conn1.ConnectionString= &quot;Protocol=Sftp;ServerName=127.0.0.1;Port=0;LogonType=Normal;UserName=zstest;Password=zstest123&quot;;</pre><p>
<h4>How to find CreationName of SSIS Connection manager</h4>
<p>To find the creation name of your Connection Type open an existing DTSX file where you had similar connection type in the package. Locate node like below and check CrewationName. It can be a friendly name or can be fully qualified assembly name. Both ways is fine but a friendly name is easy to remember.</p><pre class="crayon-plain-tag">&lt;DTS:ConnectionManagers&gt;
  &lt;DTS:ConnectionManager
    DTS:refId="Package.ConnectionManagers[RedshiftConn1]"
    DTS:CreationName="ZS-POSTGRESQL"
    .........
    .........</pre><p>
<h4>How to find ConnectionString</h4>
<p>Now another thing you need to know is the exact connectionstring. You can go to SSIS Designer and right-click on Connection Icon and check Properties Grid. It will show you ConnectionString or you can use the above technique &gt; Open DTSX file in notepad and find connectinstring there.</p>
<p>ConnectionString doesnt include any passwords / secrets. So manually append those properties in your connectionstring when you set in code.</p>
<h3>Add SSIS Task</h3>
<p>Now let&#8217;s add task in our SSIS Package instance. To create SSIS Task programmatically in code, you need to know the exact type name (i.e. creation name). As we discussed earlier check your dtsx file to know the creation name for the task you like to create. In the below code we used a friendly name which is not supported in SSIS 2012 so for that you must use full name. For SSIS 2014 or higher you can use friendly names.</p>
<p>You can also find it in file like this (example of SSIS 2017 and 2019 folders)<br />
C:\Program Files (x86)\Microsoft SQL Server\140\DTS\UpgradeMappings\ZappySys.PowerPack140.Extensions.xml<br />
C:\Program Files (x86)\Microsoft SQL Server\150\DTS\UpgradeMappings\ZappySys.PowerPack150.Extensions.xml</p>
<p>&nbsp;</p><pre class="crayon-plain-tag">//var SSIS_VERSION = "110"; //110=SQL2012, 120=SQL2014, 130=SQL2016, 140=SQL2017, 150=SQL2019
//For SSIS 2012
var SFTP_TASK_2012 = "ZappySys.PowerPack.Task.SecureFtpTask.SecureFtpTask, ZappySys.PowerPack110, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502";
//For SSIS 2014 or higher
//Goto folder like this and find zappysys extension file 
//(e.g. 140) =&gt; C:\Program Files (x86)\Microsoft SQL Server\140\DTS\UpgradeMappings\ZappySys.PowerPack140.Extensions.xml
//Find Task creation name there
var SFTP_TASK = "ZappySys.SecureFtpTask";

var tsk1 = p.Executables.Add(SFTP_TASK) as TaskHost;
tsk1.Properties["SourceStorageConnection"].SetValue(tsk1, "MySftpConnection");
tsk1.Properties["StorageAction"].SetValue(tsk1, 10); //DownloadFileFromFtp [10] find numeric value for this enum from help file&gt; properties https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-sftp-ftp-ftps-task.htm
tsk1.Properties["SourcePathValue"].SetValue(tsk1, "subfolder/localsubfile1.csv");
tsk1.Properties["TargetPathValue"].SetValue(tsk1, @"c:\temp\");
tsk1.Properties["FileOverwriteAction"].SetValue(tsk1, 2); //OverwriteAll [2]</pre><p>
<h3>Execute SSIS Package</h3>
<p>Now let&#8217;s execute the package using the below line</p><pre class="crayon-plain-tag">var status =p.Execute();</pre><p>
<h3>Check Execution Errors</h3>
<p>At the end you need to check execution errors if any.</p><pre class="crayon-plain-tag">if (status != DTSExecResult.Success)
{
	string errs = p.Errors.Cast&lt;DtsError&gt;().Aggregate("",
           (current, err) =&gt; current + string.Format("Source={0}, Err={1}", err.Source, err.Description));
	throw new Exception("Package status was &gt;&gt; " + status + " &gt;&gt; " + errs);
}</pre><p>
&nbsp;</p>
<h3>Full Code</h3>
<p>Here is the full code</p><pre class="crayon-plain-tag">using System;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime;
/*
For SSIS 2012 - Compile with .net 4.0
For SSIS 2014-2017 - Compile with .net 4.5 
For SSIS 2019 - Compile with .net 4.6.2
 */

//current one is SSIS 2017 (140 dlls)
/*
 * References needed for SSIS 2017 , for 2019 change 14.0.0.0 to 15.0.0.0
 * 
    &lt;Reference Include="Microsoft.SqlServer.DtsMsg, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" /&gt;
    &lt;Reference Include="Microsoft.SqlServer.Dts.Design, Version=14.0.0.0, PublicKeyToken=89845dcd8080cc91" /&gt;
    &lt;Reference Include="Microsoft.SqlServer.DTSPipelineWrap, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" /&gt;
    &lt;Reference Include="Microsoft.SQLServer.DTSRuntimeWrap, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /&gt;
    &lt;Reference Include="Microsoft.SQLServer.ManagedDTS, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" /&gt;
    &lt;Reference Include="Microsoft.SqlServer.PipelineHost, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" /&gt; 
 */
namespace SSISCodeDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            
            //Create_SSIS_Controlflow_Task_Demo();
            Create_SSIS_Dataflow_Source_Component_Demo();

            //Create_SSIS_Connection_Demo();
            //Create_SSIS_Variable_Demo();
            //Create_SSIS_Connect_Tasks_Demo();

        }

        private static void Create_SSIS_Controlflow_Task_Demo()
        {
            var p = new Microsoft.SqlServer.Dts.Runtime.Package();

            var conn1 = p.Connections.Add("ZS-SFTP");
            conn1.Name = "MySftpConnection";
            conn1.ConnectionString = "Protocol=Sftp;ServerName=127.0.0.1;Port=0;LogonType=Normal;UserName=zstest;Password=zstest123";

            //var SSIS_VERSION = "110"; //110=SQL2012, 120=SQL2014, 130=SQL2016, 140=SQL2017, 150=SQL2019
            //For SSIS 2012
            var SFTP_TASK_2012 = "ZappySys.PowerPack.Task.SecureFtpTask.SecureFtpTask, ZappySys.PowerPack110, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502";
            //For SSIS 2014 or higher
            //Goto folder like this and find zappysys extension file (e.g. 140) =&gt; C:\Program Files (x86)\Microsoft SQL Server\140\DTS\UpgradeMappings\ZappySys.PowerPack140.Extensions.xml
            //Find Task creation name there
            var SFTP_TASK = "ZappySys.SecureFtpTask";

            var tsk1 = p.Executables.Add(SFTP_TASK) as TaskHost;
            tsk1.Name = "SFTP_Task1";
            tsk1.Properties["SourceStorageConnection"].SetValue(tsk1, "MySftpConnection");
            tsk1.Properties["StorageAction"].SetValue(tsk1, 10); //DownloadFileFromFtp [10] find numeric value for this enum from help file&gt; properties https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-sftp-ftp-ftps-task.htm
            tsk1.Properties["SourcePathValue"].SetValue(tsk1, "subfolder/localsubfile1.csv");
            tsk1.Properties["TargetPathValue"].SetValue(tsk1, @"c:\temp\");
            tsk1.Properties["FileOverwriteAction"].SetValue(tsk1, 2); //OverwriteAll [2]


            /*
             Go to package file (*.dtsx) &gt; Open in Notepad &gt; and findout which properties set. Do same way (ignore some default proprties)
             Some enum properties needs numeric values &gt; Check Task / Component help file to findout number for that

      &lt;DTS:ObjectData&gt;
        &lt;SecureFtpTask
          StorageAction="DeleteFtpFile"
          FileOverwriteAction="OverwriteAll"
          TreatRegXForFullPath="False"
          ContinueOnError="False"
...................
...................
...................            
            PrefixTimestamp="False" /&gt;
      &lt;/DTS:ObjectData&gt;
    &lt;/DTS:Executable&gt;             
             */

            //Application.

            /* use below code to save to disk file 
            var app = new Microsoft.SqlServer.Dts.Runtime.Application();
            var filepath = @"c:\temp\demo.dtsx";
            app.SaveToXml(filepath, p, null);

            --load from disk to memory
            p = app.LoadPackage(filepath, null);

            */
            var status = p.Execute();

            if (status != DTSExecResult.Success)
            {
                var errs = "";
                foreach (var e in p.Errors)
                {
                    errs = errs + string.Format("Source={0}, Err={1}", e.Source, e.Description) + "\r\n";
                }

                throw new Exception("Package status was &gt;&gt; " + status + " &gt;&gt; " + errs);
            }

            Console.WriteLine("Execution Completed... Press any key to exit!!!");
            Console.ReadKey();
        }
        private static void Create_SSIS_Dataflow_Source_Component_Demo()
        {
            var p = new Microsoft.SqlServer.Dts.Runtime.Package();


            /*============ STEP-1: Create Dataflow Task =========== */

            var tsk1 = p.Executables.Add("STOCK:PipelineTask") as TaskHost;
            var dataFlowTask = tsk1.InnerObject as MainPipe;

            /*============ STEP-2: Create Connection =========== */
            var conn1 = p.Connections.Add("ZS-HTTP");
            conn1.Name = "MyConnection";
            conn1.ConnectionString = "Url=https://httpbin.org/get;CredentialType=Basic;UserName=test;Password=test123";


            /*============ STEP-3: Create Source =========== */
            var sourceComponent = dataFlowTask.ComponentMetaDataCollection.New();

            try
            {
                sourceComponent.ComponentClassID = "ZappySys.JsonSource";
                var sourceInstance = sourceComponent.Instantiate();
                sourceInstance.ProvideComponentProperties();

                sourceComponent.Name = "MySource";
                /**** Special Case for JSON Source - if user wants connection to use then we create Runtime connection. For all other components this is always created when ProvideComponentProperties() is called*/
                if (sourceComponent.RuntimeConnectionCollection.Count &lt;= 0)
                {
                    var dtsRuntimeConnection = sourceComponent.RuntimeConnectionCollection.New();
                    dtsRuntimeConnection.Name = "Connection"; 
                    //dtsRuntimeConnection.Description = "This can be ZS-HTTP, ZS-OAUTH or ZS-SALESFORCE";
                }
                sourceComponent.RuntimeConnectionCollection[0].ConnectionManager = DtsConvert.GetExtendedInterface(conn1);
                sourceComponent.RuntimeConnectionCollection[0].ConnectionManagerID = conn1.ID;

                sourceInstance.SetComponentProperty("UseConnection", true);//JsonSource specific -- for all other components connection always used
                sourceInstance.SetComponentProperty("DirectPath", "https://httpbin.org/basic-auth/test/test123");
                //sourceInstance.SetComponentProperty("Filter", "$.value[*]");

                //make connection active before next step
                sourceInstance.AcquireConnections(null);

                //after connection + props set ... call ReInitialize meta... it creates columns / output / input etc
                sourceInstance.ReinitializeMetaData(); 
            }
            catch (COMException ex)
            {
                throw new Exception("Error Happened ==&gt; " + sourceComponent.GetErrorDescription(ex.ErrorCode));
            }




            /*============ STEP-4: Create Target (without Reinitialize) =========== */

            var targetComponent = dataFlowTask.ComponentMetaDataCollection.New();
            CManagedComponentWrapper targetInstance=null;
            try
            {
                targetComponent.ComponentClassID = "ZappySys.TrashDestination";
                targetInstance = targetComponent.Instantiate();
                targetInstance.ProvideComponentProperties();

                targetComponent.Name = "MyDestination";

                targetInstance.SetComponentProperty("SaveDataToFile", true);
                targetInstance.SetComponentProperty("FilePath", @"c:\temp\dump.txt");
                targetInstance.SetComponentProperty("OverwriteFileIfExists", true);

                //--- Trash destination doesnt have connection but incase destination uses connection... set below way
                //if you have connection then set this way
                //var conn2 = p.Connections.Add("....."); //Creation name i.e. ZS-HTTP
                //conn2.Name = "MyConnection2";
                //conn3.ConnectionString = "Url=https://httpbin.org/get;CredentialType=Basic;UserName=test;Password=test123";
                //if (targetComponent.RuntimeConnectionCollection.Count &lt;= 0)
                //{
                //    var dtsRuntimeConnection = targetComponent.RuntimeConnectionCollection.New();
                //    dtsRuntimeConnection.Name = "Connection"; 
                //}
                //sourceComponent.RuntimeConnectionCollection[0].ConnectionManager = DtsConvert.GetExtendedInterface(conn2);
                //sourceComponent.RuntimeConnectionCollection[0].ConnectionManagerID = conn2.ID;
                //make connection active before next step
                //targetInstance.AcquireConnections(null);
            }
            catch (COMException ex)
            {
                throw new Exception("Error Happened ==&gt; " + targetComponent.GetErrorDescription(ex.ErrorCode));
            }

            /*============ STEP-5: Connect Source to Target =========== */

            //before we call reintializemetadata for dest .. lets attach src and dest so .. dest can use virtual inputs if needed
            var output = sourceComponent.OutputCollection[0]; //to make it simple lets pick first output but possible component can have more outputs
            var input = targetComponent.InputCollection[0];

            dataFlowTask.PathCollection.New().AttachPathAndPropagateNotifications(output, input);

            /*============ STEP-6: Configure Target =========== */
            try
            {
                //after connection + props set and source to target attached... call ReInitialize meta... it creates columns / output / input etc
                targetInstance.ReinitializeMetaData(); 
            }
            catch (COMException ex)
            {
                throw new Exception("Error Happened ==&gt; " + targetComponent.GetErrorDescription(ex.ErrorCode));
            }


            /*============ STEP-6: Save Package =========== */

            //* use below code to save to disk file 
            var app = new Microsoft.SqlServer.Dts.Runtime.Application();
            var filepath = @"c:\temp\demo.dtsx";
            app.SaveToXml(filepath, p, null);

            /*============ STEP-7: Load Package =========== */
            //--load from disk to memory
            p = app.LoadPackage(filepath, null);

            //*/

            /*============ STEP-8: Execute Package =========== */
            var status = p.Execute();

            /*============ STEP-9: Print execution status / log =========== */
            if (status != DTSExecResult.Success)
            {
                var errs = "";
                foreach (var e in p.Errors)
                {
                    errs = errs + string.Format("Source={0}, Err={1}", e.Source, e.Description) + "\r\n";
                }

                throw new Exception("Package status was &gt;&gt; " + status + " &gt;&gt; " + errs);
            }

            Console.WriteLine("Execution Completed... Press any key to exit!!!");
            Console.ReadKey();
        }

        private static void Create_SSIS_Variable_Demo()
        {
            var p = new Microsoft.SqlServer.Dts.Runtime.Package();
            
            p.Variables.Add("MyVariableName1", false, "User", "Some value");
        }

        private static void Create_SSIS_Connection_Demo()
        {
            var p = new Microsoft.SqlServer.Dts.Runtime.Package();

            var conn1 = p.Connections.Add("ZS-SFTP");
            conn1.Name = "MySftpConnection";
            conn1.ConnectionString = "Protocol=Sftp;ServerName=127.0.0.1;Port=0;LogonType=Normal;UserName=zstest;Password=zstest123";

        }

        private static void Create_SSIS_Connect_Tasks_Demo()
        {
            var p = new Microsoft.SqlServer.Dts.Runtime.Package();

            var SFTP_TASK = "ZappySys.SecureFtpTask";

            var tsk1 = p.Executables.Add(SFTP_TASK) as TaskHost;
            tsk1.Name = "SFTP_Task1";
            /*set some props - see Create_SSIS_Controlflow_Task_Demo */

            var tsk2 = p.Executables.Add(SFTP_TASK) as TaskHost;
            tsk2.Name = "SFTP_Task2";
            /*set some props - see Create_SSIS_Controlflow_Task_Demo */
            
            //add link between task1--&gt;task2
            var pc = p.PrecedenceConstraints.Add(tsk1, tsk2);
            pc.EvalOp = DTSPrecedenceEvalOp.Constraint;
            pc.Value = DTSExecResult.Success;
            pc.LogicalAnd = true; //only useful if multiple inputs coming and you want all previous steps to be Green vs Any One Green .. if its any use LogicalAnd=False

            //If you need to connect with expression use below
            //pc.EvalOp = DTSPrecedenceEvalOp.ExpressionAndConstraint;
            //pc.Expression = "@SomeVariable == true";
        }

       

     
    }
}</pre><p>
&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/create-ssis-package-programmatically-add-execute-connections-tasks/">How to create SSIS Package Programmatically (Add / Execute Tasks)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to migrate Postman API call to SSIS / ODBC PowerPack</title>
		<link>https://zappysys.com/blog/postman-to-ssis-odbc-powerpack/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 17 Oct 2019 16:41:23 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[postman]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8172</guid>

					<description><![CDATA[<p>Introduction In the previous article, we learned how to copy settings from curl to ZappySys products, and in this article, we will continue on how to migrate Postman API call to SSIS / ODBC PowerPack. Postman is a very popular client tool to test API calls. Many API providers document how to call their API using [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/postman-to-ssis-odbc-powerpack/">How to migrate Postman API call to SSIS / ODBC PowerPack</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><img loading="lazy" decoding="async" class="wp-image-8173 size-thumbnail alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon.png 330w" sizes="(max-width: 150px) 100vw, 150px" /></p>
<p style="text-align: justify;">In the previous article, we learned <a href="https://zappysys.com/blog/using-ssis-curl-syntax-to-ssis-api-task/" target="_blank" rel="noopener">how to copy settings from curl to ZappySys products</a>, and in this article, we will continue on how to migrate Postman API call to SSIS / ODBC PowerPack. <a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a> is a very popular client tool to test API calls. Many API providers document how to call their API using Postman. In this article we will focus on how to use the same settings in ZappySys Products to implement API integration in SSIS or other apps like Power BI, Informatica, Excel, Tableau, SSRS&#8230; many ODBC apps.</p>
<p style="text-align: justify;">When you are connecting to an API you may have examples of how to do that in <a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a>. If you know how to do it in Postman, you are one step away from making it work in <a href="https://www.zappysys.com/products/ssis-powerpack" target="_blank" rel="noopener">SSIS PowerPack</a> and <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC PowerPack</a> (JSON, XML, CSV Drivers, and other). Most of the examples will show how to do that specifically using ODBC PowerPack and <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">JSON Driver</a>, but since ODBC PowerPack UI is very similar to the connectors of SSIS PowerPack, it will be quite clear where to use it in SSIS PowerPack as well. In the examples where UI differs significantly, both &#8211; ODBC and SSIS PowerPack &#8211; examples will be presented.</p>
<h2></h2>
<h2>Prerequisites</h2>
<p>In this article we assume you meet these requirements:</p>
<h3><span style="font-size: 12pt;">When migrating Postman API call to SSIS PowerPack</span></h3>
<ol>
<li><a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a> installed.</li>
<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 Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
</ol>
<h3><span style="font-size: 12pt;">When migrating Postman API call to to ODBC PowerPack</span></h3>
<ol>
<li><a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a> installed.</li>
<li><a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed (<a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
</ol>
<h2>The Basics</h2>
<p>This section shows how to migrate simple options such as URL, HTTP Request Method, and HTTP Headers.</p>
<h3>How to configure the URL and HTTP Request Method</h3>
<div id="attachment_8187" style="width: 767px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8187" class="wp-image-8187 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method.png" alt="Migrate Postman API call to SSIS / ODBC (API URL setting to ODBC Driver (GET / POST) )" width="757" height="617" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method.png 757w, https://zappysys.com/blog/wp-content/uploads/2019/10/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method-300x245.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></a><p id="caption-attachment-8187" class="wp-caption-text">Migrate Postman API call to SSIS / ODBC (API URL setting to ODBC Driver (GET / POST) )</p></div>
<h3>How to configure HTTP Headers</h3>
<div id="attachment_8186" style="width: 583px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8186" class="wp-image-8186 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="Migrate Postman HTTP Headers setting to ODBC Driver" width="573" height="701" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 573w, https://zappysys.com/blog/wp-content/uploads/2019/10/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis-245x300.png 245w" sizes="(max-width: 573px) 100vw, 573px" /></a><p id="caption-attachment-8186" class="wp-caption-text">Migrate Postman HTTP Headers setting to ODBC Driver</p></div>
<h2>Posting data</h2>
<p>In this section, you will find how to post data in ZappySys products. You will learn how to post different formats of data, upload files and send multi-part data.</p>
<h3>How to configure POST raw body</h3>
<div id="attachment_8188" style="width: 765px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8188" class="wp-image-8188 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png" alt="Migrate Postman Body / Content-Type setting to ODBC Driver" width="755" height="738" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png 755w, https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration-300x293.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></a><p id="caption-attachment-8188" class="wp-caption-text">Migrate Postman Body / Content-Type setting to ODBC Driver</p></div>
<h3>How to configure POST JSON body</h3>
<div id="attachment_8435" style="width: 794px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8435" class="wp-image-8435 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png" alt="Migrate Postman Body / Content-Type setting to ODBC Driver" width="784" height="688" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png 784w, https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration-768x674.png 768w" sizes="(max-width: 784px) 100vw, 784px" /></a><p id="caption-attachment-8435" class="wp-caption-text">Migrate Postman Body / Content-Type setting to ODBC Driver</p></div>
<p>Use this table to determine what kind of <em>Body Content Type</em> to configure:</p>
<div class="su-table su-table-alternate">
<table style="border-collapse: collapse;width: 100%;height: 87px" border="1">
<tbody>
<tr style="height: 22px">
<td style="width: 50%;height: 22px"><strong>Data type</strong></td>
<td style="width: 50%;height: 22px"><strong>Body Content Type</strong></td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 21px">Text</td>
<td style="width: 50%;height: 21px">text/plain</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">JSON</td>
<td style="width: 50%;height: 22px">application/json</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">HTML</td>
<td style="width: 50%;height: 22px">text/html</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">XML</td>
<td style="width: 50%;height: 22px">application/xml</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">You don&#8217;t know the type</td>
<td style="width: 50%;height: 22px">Default  (i.e. form/x-www-form-urlencoded data)</td>
</tr>
</tbody>
</table>
</div>
<h3>How to configure POST form/x-www-form-urlencoded data</h3>
<div id="attachment_8189" style="width: 674px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8189" class="wp-image-8189 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Migrate Postman Body (x-www-form-urlencoded) setting to ODBC Driver" width="664" height="568" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png 664w, https://zappysys.com/blog/wp-content/uploads/2019/10/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis-300x257.png 300w" sizes="(max-width: 664px) 100vw, 664px" /></a><p id="caption-attachment-8189" class="wp-caption-text">Migrate Postman Body (x-www-form-urlencoded) setting to ODBC Driver</p></div>
<h3>How to configure multipart form POST data</h3>
<div id="attachment_8190" style="width: 868px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8190" class="wp-image-8190 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Migrate Postman Multi-Part File Upload setting to ODBC Driver (Upload File)" width="858" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png 858w, https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis-300x260.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis-768x667.png 768w" sizes="(max-width: 858px) 100vw, 858px" /></a><p id="caption-attachment-8190" class="wp-caption-text">Migrate Postman Multi-Part File Upload setting to ODBC Driver (Upload File)</p></div>
<h2>Authentication</h2>
<p>This section will cover all common authentication methods, starting from using API Key to OAuth 2.0.</p>
<h3>How to authenticate using API Key in HTTP headers</h3>
<div id="attachment_8191" style="width: 707px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8191" class="wp-image-8191 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="Authentication - Migrate Postman API Key (via header) setting to ODBC Driver" width="697" height="746" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 697w, https://zappysys.com/blog/wp-content/uploads/2019/10/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis-280x300.png 280w" sizes="(max-width: 697px) 100vw, 697px" /></a><p id="caption-attachment-8191" class="wp-caption-text">Authentication &#8211; Migrate Postman API Key (via header) setting to ODBC Driver</p></div>
<h3>How to authenticate using API Key as a parameter in URL</h3>
<div id="attachment_8202" style="width: 767px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-2/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8202" class="wp-image-8202 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-1.png" alt="Authentication - Migrate Postman API Key (via URL query parameter) setting to ODBC Driver" width="757" height="567" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-1.png 757w, https://zappysys.com/blog/wp-content/uploads/2019/10/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-1-300x225.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></a><p id="caption-attachment-8202" class="wp-caption-text">Authentication &#8211; Migrate Postman API Key (via URL query parameter) setting to ODBC Driver</p></div>
<h3>How to authenticate using Bearer Token</h3>
<div id="attachment_8193" style="width: 763px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8193" class="wp-image-8193 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Authentication - Migrate Postman Bearer Token setting to SSIS / ODBC Driver" width="753" height="636" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis.png 753w, https://zappysys.com/blog/wp-content/uploads/2019/10/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis-300x253.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></a><p id="caption-attachment-8193" class="wp-caption-text">Authentication &#8211; Migrate Postman Bearer Token setting to SSIS / ODBC Driver</p></div>
<h3>How to authenticate using Basic Authentication</h3>
<h4>In ODBC PowerPack</h4>
<div id="attachment_8194" style="width: 674px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8194" class="wp-image-8194 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Authentication - Migrate Postman Basic Auth setting to SSIS / ODBC Driver (Login using Userid / password)" width="664" height="732" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis.png 664w, https://zappysys.com/blog/wp-content/uploads/2019/10/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis-272x300.png 272w" sizes="(max-width: 664px) 100vw, 664px" /></a><p id="caption-attachment-8194" class="wp-caption-text">Authentication &#8211; Migrate Postman Basic Auth setting to SSIS / ODBC Driver (Login using Userid / password)</p></div>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-HTTP Connection Manager using instructions below:</p>
<div id="attachment_8195" style="width: 739px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8195" class="wp-image-8195 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png" alt="Authentication - Migrate Postman Basic Auth setting to SSIS JSON / XML Source (Login using Userid / password)" width="729" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png 729w, https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 729px) 100vw, 729px" /></a><p id="caption-attachment-8195" class="wp-caption-text">Authentication &#8211; Migrate Postman Basic Auth setting to SSIS JSON / XML Source (Login using Userid / password)</p></div>
<h3>How to authenticate using OAuth</h3>
<h4>In ODBC PowerPack</h4>
<ol style="margin-left: 0;">
<li>Configure main options:
<div id="attachment_8198" style="width: 864px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8198" class="wp-image-8198 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration.png" alt="Authentication - Migrate Postman OAuth setting to SSIS / ODBC Drivers ( JSON / XML / CSV API) - Client ID / Secret / Scope / Auth and Token Url (Client Credential Grant Type, Password Grant Type, Code Authorization Grant Type)" width="854" height="1112" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration.png 854w, https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration-230x300.png 230w, https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration-768x1000.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration-786x1024.png 786w" sizes="(max-width: 854px) 100vw, 854px" /></a><p id="caption-attachment-8198" class="wp-caption-text">Authentication &#8211; Migrate Postman OAuth setting to SSIS / ODBC Drivers ( JSON / XML / CSV API) &#8211; Client ID / Secret / Scope / Auth and Token Url (Client Credential Grant Type, Password Grant Type, Code Authorization Grant Type)</p></div></li>
<li>Configure Callback/Return Url:
<div id="attachment_8199" style="width: 694px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8199" class="wp-image-8199 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url.png" alt="Authentication - Migrate Postman OAuth setting to SSIS / ODBC Drivers ( Callback / Redirect URL )" width="684" height="458" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url.png 684w, https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url-300x201.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url-272x182.png 272w" sizes="(max-width: 684px) 100vw, 684px" /></a><p id="caption-attachment-8199" class="wp-caption-text">Authentication &#8211; Migrate Postman OAuth setting to SSIS / ODBC Drivers ( Callback / Redirect URL )</p></div></li>
</ol>
<p>If you are using a known, public API service, you may try locating it in the OAuth Providers list, which will save you from configuring Authorization and Access Token URLs:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list/#main" rel="attachment wp-att-8230"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-8230" src="https://zappysys.com/blog/wp-content/uploads/2019/10/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list.png" alt="" width="586" height="493" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list.png 586w, https://zappysys.com/blog/wp-content/uploads/2019/10/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list-300x252.png 300w" sizes="(max-width: 586px) 100vw, 586px" /></a></p>
<p>For simplicity and if your company policy allows it or at least for testing purposes, you can use a Default OAuth Application created by ZappySys:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app/#main" rel="attachment wp-att-8231"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-8231" src="https://zappysys.com/blog/wp-content/uploads/2019/10/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app.png" alt="" width="531" height="495" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app.png 531w, https://zappysys.com/blog/wp-content/uploads/2019/10/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app-300x280.png 300w" sizes="(max-width: 531px) 100vw, 531px" /></a></p>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-OAUTH Connection Manager using instructions below:</p>
<div id="attachment_8196" style="width: 740px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/010-how-to-authenticate-with-oauth-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8196" class="wp-image-8196 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png" alt="Authentication - Migrate Postman OAuth setting to SSIS JSON / XML Source" width="730" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png 730w, https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 730px) 100vw, 730px" /></a><p id="caption-attachment-8196" class="wp-caption-text">Authentication &#8211; Migrate Postman OAuth setting to SSIS JSON / XML Source</p></div>
<h3>How to authenticate using AWS Signature</h3>
<h4>In ODBC PowerPack</h4>
<div id="attachment_8200" style="width: 702px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8200" class="wp-image-8200 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="Authentication - Migrate Postman AWS API call setting to SSIS / ODBC Drivers ( JSON / XML / CSV API call)" width="692" height="465" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 692w, https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis-272x182.png 272w" sizes="(max-width: 692px) 100vw, 692px" /></a><p id="caption-attachment-8200" class="wp-caption-text">Authentication &#8211; Migrate Postman AWS API call setting to SSIS / ODBC Drivers ( JSON / XML / CSV API call)</p></div>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-OAUTH Connection Manager using instructions below:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/010-how-to-authenticate-with-oauth-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-8196 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png" alt="" width="730" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png 730w, https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 730px) 100vw, 730px" /></a></p>
<h3>How to authenticate using NTLM Authentication</h3>
<h4>In ODBC PowerPack</h4>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-8201 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="" width="724" height="578" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 724w, https://zappysys.com/blog/wp-content/uploads/2019/10/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis-300x240.png 300w" sizes="(max-width: 724px) 100vw, 724px" /></a></p>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-HTTP Connection Manager using instructions below:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-8195 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png" alt="" width="729" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png 729w, https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 729px) 100vw, 729px" /></a></p>
<h2>Conclusion</h2>
<p>This article was quite self-explanatory, but if you have any questions or you have an authentication method that is not listed here and you don&#8217;t know how to proceed, please, contact us and we will try to help you: <a href="https://zappysys.com/support/" target="_blank" rel="noopener">https://zappysys.com/support/</a>.</p>
<p>The post <a href="https://zappysys.com/blog/postman-to-ssis-odbc-powerpack/">How to migrate Postman API call to SSIS / ODBC PowerPack</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to detect missing columns in SSIS</title>
		<link>https://zappysys.com/blog/detect-missing-columns-in-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Tue, 08 Oct 2019 23:12:08 +0000</pubDate>
				<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[columns]]></category>
		<category><![CDATA[missing]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8111</guid>

					<description><![CDATA[<p>How to detect extra columns or missing columns Sometimes, we need to validate the input columns to check for extra or missing columns in SSIS. ZappySys includes some pretty nice tools, but some of them cannot check the required values. To fix that problem, you can complement these tools with our Regular Expression Parser Task. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/detect-missing-columns-in-ssis/">How to detect missing columns in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>How to detect extra columns or missing columns</h2>
<p><img loading="lazy" decoding="async" class="alignleft size-full" src="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/ssis-regex-parser-task.png?resize=114%2C114&amp;ssl=1" alt="ssis reg expression task" width="114" height="114" />Sometimes, we need to validate the input columns to check for extra or missing columns in SSIS. ZappySys includes some pretty nice tools, but some of them cannot check the required values. To fix that problem, you can complement these tools with our Regular Expression Parser Task.</p>
<p>We will use Regular Expressions to validate the columns. For example, we want to check that the file has 3 columns with specific names, if it contains extra columns or there are missing some columns, we want to send an error. We will show you how to do this.</p>
<p>We will be using this <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> component to make things work:<br />
<div class="su-table su-table-alternate">
<table width="300">
<tbody>
<tr style="line-height: 0px">
<td width="50px"><a href="https://zappysys.com/blog/using-regular-expressions-in-ssis/" target="_blank" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/ssis-regex-parser-task.png" alt="SSIS REST API Web Service Task " width="50" height="50" /></a></td>
<td style="vertical-align: middle"><a href="https://zappysys.com/blog/using-regular-expressions-in-ssis/" target="_blank" rel="noopener">SSIS Regex Task<br />
</a></td>
</tr>
</tbody>
</table>
</div>
<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>Creating a CSV file</h2>
<ol>
<li>To start, we will create a plain text or CSV file with some columns. Create a file named file.txt or any name of your preference.</li>
<li>Add data similar to the following:</p><pre class="crayon-plain-tag">name,lastname,email
Clint,Eastwood,ceastwood@gmail.com
Cameron,Diaz,cdiaz@gmail.com</pre><p>
</li>
</ol>
<h2>ZS Regular Expression Parser to detect missing columns in SSIS</h2>
<ol>
<li>First, SSDT opens an SSIS project.</li>
<li>Now, it is time to use the ZS Regular Expression Parser.</li>
<li>Secondly, drag and drop the ZS Regular Expression in the design pane:
<div style="width: 592px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/regex-parser-task/ssis-regex-parser-task-drag.png" alt="Regex SSIS task" width="582" height="102" /><p class="wp-caption-text">SSIS Regular Expression parser</p></div></li>
<li>In <strong>AccessMode</strong>, use <strong>Connection</strong> and create a new connection.</li>
<li>Select the file you created before. Click OK to save the configuration.
<div id="attachment_12033" style="width: 698px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-Create-connection-to-a-local-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-12033" class="size-full wp-image-12033" src="https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-Create-connection-to-a-local-file.png" alt="" width="688" height="575" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-Create-connection-to-a-local-file.png 688w, https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-Create-connection-to-a-local-file-300x251.png 300w" sizes="(max-width: 688px) 100vw, 688px" /></a><p id="caption-attachment-12033" class="wp-caption-text">Regular Expressions Parser Task &#8211; Create a connection to a local file</p></div></li>
<li>Add the following expression to the Task and test it:<br />
<pre class="crayon-plain-tag">^name,lastname\r\n</pre>
</li>
<li>In the previous scenario, the expression will fail because it is missing the email.
<div id="attachment_12038" style="width: 818px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-detect-missing-columns-example-fail.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-12038" class="size-full wp-image-12038" src="https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-detect-missing-columns-example-fail.png" alt="" width="808" height="618" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-detect-missing-columns-example-fail.png 808w, https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-detect-missing-columns-example-fail-300x229.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-detect-missing-columns-example-fail-768x587.png 768w" sizes="(max-width: 808px) 100vw, 808px" /></a><p id="caption-attachment-12038" class="wp-caption-text">Regular Expressions Parser Task &#8211; detect missing columns example fails</p></div></li>
<li>Finally, the following Expression <pre class="crayon-plain-tag">^name,lastname,email\r\n</pre>  will pass, because the email is included.
<div class="mceTemp"></div>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-detect-missing-columns-example.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-12032" src="https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-detect-missing-columns-example.png" alt="" width="808" height="618" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-detect-missing-columns-example.png 808w, https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-detect-missing-columns-example-300x229.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/Regular-Expressions-Parser-Task-detect-missing-columns-example-768x587.png 768w" sizes="(max-width: 808px) 100vw, 808px" /></a></li>
</ol>
<h2>Conclusion</h2>
<p>In this article, we learned how to validate and check the columns in a file in ZappySys using the ZS Regular Expression Parser. In the example, we created an expression to detect an exact match of columns. It will raise an error if a failure occurs.</p>
<p>If you want to enjoy this and other ZappySys tools, you can download our product <a href="https://zappysys.com/products/ssis-powerpack/download/">here</a>.</p>
<p>The post <a href="https://zappysys.com/blog/detect-missing-columns-in-ssis/">How to detect missing columns in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SSIS PGP Encryption / Decryption (Using FREE GPG Tool)</title>
		<link>https://zappysys.com/blog/ssis-pgp-encryption-decryption/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 07 Jun 2019 02:42:20 +0000</pubDate>
				<category><![CDATA[SSIS Advanced File System Task]]></category>
		<category><![CDATA[SSIS Logging Task]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[decryption]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[openpgp]]></category>
		<category><![CDATA[pgp]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7161</guid>

					<description><![CDATA[<p>Introduction In this new article, we will show you how to perform PGP encryption using SSIS (encrypt / decrypt files using public / private key). Our previous article was about SFTP using our SFTP task for SSIS. Now we will show how to encrypt the information. Requirements First of all, you will need SSDT for Business Intelligence for [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-pgp-encryption-decryption/">SSIS PGP Encryption / Decryption (Using FREE GPG Tool)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/pgp-encryption-logo.png"><img loading="lazy" decoding="async" class="wp-image-7202 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/06/pgp-encryption-logo.png" alt="" width="122" height="122" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/pgp-encryption-logo.png 500w, https://zappysys.com/blog/wp-content/uploads/2019/06/pgp-encryption-logo-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/06/pgp-encryption-logo-300x300.png 300w" sizes="(max-width: 122px) 100vw, 122px" /></a>In this new article, we will show you how to perform PGP encryption using SSIS (encrypt / decrypt files using public / private key). Our previous article was about <a href="https://zappysys.com/blog/ssis-sftp-task-examples-upload-download-move-delete-files-folders/">SFTP using our SFTP task for SSIS</a>. Now we will show how to encrypt the information.</p>
<h2>Requirements</h2>
<ol>
<li>First of all, you will need SSDT for <a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017">Business Intelligence for SSIS</a> projects.</li>
<li>Download and install FREE PGP Command line <a href="https://www.gnupg.org/download/index.html" target="_blank" rel="noopener">gnupg</a> for Windows.</li>
<li><strong>Optionally</strong> you can install <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>.</li>
</ol>
<div class="su-note"  style="border-color:#9ddee5;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#b7f8ff;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Note: This article is for the information purpose only.</div></div>
<h3>What is PGP / GPG (GnuPG) / OpenPGP ?</h3>
<p><strong>PGP</strong> stands for Pretty Good Privacy. It was created by Phil Zimmermann. PGP is the most popular email encryption in the world. It is an Encryption that requires a public key, a private key. You can encrypt, decrypt and sign documents, emails. PGP Tools now acquired by Symantec. In sort PGP Tools developed by Phil are not Open Source any more so use other on if you really need FREE one.</p>
<p><strong>GPG</strong> (i.e. GnuPG)) stands for GNU Privacy Guard. <a href="https://www.gnupg.org/download/index.html" target="_blank" rel="noopener">This software</a> is for multiple platforms like Linux and Windows. In this article, we will focus on Windows because we are using SSIS that is mainly installed in Windows (at least by the moment). This tool is free, so we will focus on this one instead of trying other licensed versions.</p>
<p><strong>OpenPGP</strong> is standard around Public / Private Key Cryptography (<a href="https://tools.ietf.org/html/rfc4880" target="_blank" rel="noopener">RFC4880</a>) . <a href="https://www.openpgp.org/about/" target="_blank" rel="noopener">Check this page</a>. Both GPG and PGP follow OpenPGP Standard however there will be a case when they are not 100% compatible with each other.</p>
<p>For more information <a href="https://superuser.com/questions/1397874/gnupg-package-difference-between-pgp-and-gpg" target="_blank" rel="noopener">read this link</a> and <a href="https://askubuntu.com/questions/186805/difference-between-pgp-and-gpg" target="_blank" rel="noopener">this link</a>.</p>
<h2>Getting started</h2>
<p>In this article we will use GPG only which is essentially same features as PGP but GPG is Open Source around OpenPGP Standard and PGP is not open source.</p>
<p>So let&#8217;s get started. First of all, we will start with a simple the command line.</p>
<h3>GPG command line example</h3>
<p>After you install gpg command line we can open it to get started. There are many more examples <a href="https://www.glump.net/howto/cryptography/practical-introduction-to-gnu-privacy-guard-in-windows" target="_blank" rel="noopener">explained here</a> and <a href="https://gnupg.org/documentation/manpage.html" target="_blank" rel="noopener">here</a>.</p>
<ol>
<li>First of all, check the requirements and open the command line.</li>
<li>Secondly, in the command line write gpg &#8211;help this will list all the commands available:
<div id="attachment_7171" style="width: 764px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/gpg-command-line.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7171" class="size-full wp-image-7171" src="https://zappysys.com/blog/wp-content/uploads/2019/06/gpg-command-line.jpg" alt="LIst of gpg commands" width="754" height="481" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/gpg-command-line.jpg 754w, https://zappysys.com/blog/wp-content/uploads/2019/06/gpg-command-line-300x191.jpg 300w" sizes="(max-width: 754px) 100vw, 754px" /></a><p id="caption-attachment-7171" class="wp-caption-text">gpg help command</p></div></li>
<li>Also, in order to generate your personal key pair, write the following command:<br />
<pre class="crayon-plain-tag">gpg --gen-key</pre>
</li>
<li>Finally, the command previously provided will ask for a name and email, write an O to press OK and a Passphrase. You will be able to create your key pair with that information.</li>
</ol>
<h3>PGP encryption using SSIS introduction</h3>
<p>It is possible to perform PGP encryption using SSIS with the GPG command line which is free. We can use  native <a href="https://docs.microsoft.com/en-us/sql/integration-services/control-flow/execute-process-task?view=sql-server-2017" target="_blank" rel="noopener">execute process task</a> that comes with SSIS. In this article, we will show some commands of gpg.</p>
<ol>
<li>Open a new SSIS Package.</li>
<li>Drag Execute Process Task from SSIS Toolbox and double click to configure (see next step).</li>
<li>Using SSIS Execute Process Task, we will invoke the gpg commands. There are different ways to invoke the gpg commands. One way is to execute command stored in a .bat file or .cmd file</li>
<li>To invoke command from a file create a file called gpg.cmd and type <pre class="crayon-plain-tag">gpg --version</pre>   , save file to path like c:\sql\gpg.cmd for this demo.</li>
<li>Configure Execute Process Task something like this if you invoke command from batch file:
<div id="attachment_7173" style="width: 747px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/pgp-ssis-execute-process-task.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7173" class="size-full wp-image-7173" src="https://zappysys.com/blog/wp-content/uploads/2019/06/pgp-ssis-execute-process-task.jpg" alt="Invoke a cmd file in SSIS to encrypt" width="737" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/pgp-ssis-execute-process-task.jpg 737w, https://zappysys.com/blog/wp-content/uploads/2019/06/pgp-ssis-execute-process-task-300x257.jpg 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-7173" class="wp-caption-text">SSIS invoke gpg</p></div></li>
<li>Also, note that the <strong>windows style is hidden</strong>. That will hide the command line when running the package.</li>
<li>In addition, the <strong>StandardOutputVariable</strong> will create an object variable in the output.</li>
<li>To verify the output, we will use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-logging-task-free/" target="_blank" rel="noopener">ZS Logging task</a>
<div style="width: 768px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-output-pgp-version-information.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="size-full wp-image-7174" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-output-pgp-version-information.jpg" alt="Show gpg output result from a variable" width="758" height="260" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-output-pgp-version-information.jpg 758w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-output-pgp-version-information-300x103.jpg 300w" sizes="(max-width: 758px) 100vw, 758px" /></a><p class="wp-caption-text">SSIS output results</p></div></li>
<li>Click OK to save Execute Process Task UI.</li>
<li>Now drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-logging-task-free/">ZS Logging task</a> from toolbox and configure like below. This will Log output captured by gpg command. This step is optional but will help you a lot if you want to know what happened in previous step (e.g. capture error message)
<div id="attachment_7170" style="width: 635px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-variables-logging-task-values.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7170" class="size-full wp-image-7170" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-variables-logging-task-values.jpg" alt="SSIS Show variable value" width="625" height="504" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-variables-logging-task-values.jpg 625w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-variables-logging-task-values-300x242.jpg 300w" sizes="(max-width: 625px) 100vw, 625px" /></a><p id="caption-attachment-7170" class="wp-caption-text">SSIS Logging task</p></div></li>
</ol>
<h3>Execute GPG / PGP commands directly in SSIS Execute Process Task (Pass Arguments)</h3>
<p>1. In the previous example, we used a cmd file with the commands. Sometimes we need to use SSIS variables and pass information dynamically. In this new example, we will invoke the gpg command line directly and send the arguments in the arguments property like this:</p>
<div id="attachment_7176" style="width: 747px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-execute-process-arguments.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7176" class="size-full wp-image-7176" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-execute-process-arguments.jpg" alt="gpg encryption in ssis" width="737" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-execute-process-arguments.jpg 737w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-execute-process-arguments-300x257.jpg 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-7176" class="wp-caption-text">SSIS execute gpg encryption</p></div>
<h3>Generate public key in PGP encryption using SSIS</h3>
<p>Now lets look at common task with PGP cryptography which is generate Public / Private Key pair.</p>
<ol>
<li>In order to generate a public key, you need to run the following arguments in SSIS:
<div id="attachment_7178" style="width: 966px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-gpg-generate-key.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7178" class="size-full wp-image-7178" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-gpg-generate-key.jpg" alt="Generating a public gpg key in SSIS" width="956" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-gpg-generate-key.jpg 956w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-gpg-generate-key-300x198.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-gpg-generate-key-768x507.jpg 768w" sizes="(max-width: 956px) 100vw, 956px" /></a><p id="caption-attachment-7178" class="wp-caption-text">SSIS generation of public key</p></div>
<pre class="crayon-plain-tag">--armor --output "c:\sql\ssiskey.txt" --export "Name"</pre>
</li>
<li>In addition, the key name is the name of the pair key created and the<br />
output contains the path of the stored key.</li>
</ol>
<h3>How to encrypt a file in PGP encryption using SSIS</h3>
<ol>
<li>First of all, we will encrypt a file named ssiskey.txt:</li>
<li>The argument used is the following:<br />
<pre class="crayon-plain-tag">--recipient "Name" --output "c:\sql\ssiskey.txt.gpg" --encrypt "c:\sql\ssiskey.txt"</pre>
<div id="attachment_7179" style="width: 932px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-encrypt-file-pgp.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7179" class="size-full wp-image-7179" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-encrypt-file-pgp.jpg" alt="How to encrypt a file using PGP in SSIS" width="922" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-encrypt-file-pgp.jpg 922w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-encrypt-file-pgp-300x205.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-encrypt-file-pgp-768x526.jpg 768w" sizes="(max-width: 922px) 100vw, 922px" /></a><p id="caption-attachment-7179" class="wp-caption-text">Encrypt file gpg in SSIS</p></div></li>
<li>We are creating an encrypted file named ssiskey.txt.pgp</li>
</ol>
<h3>How to decrypt a file in PGP encryption using SSIS</h3>
<ol>
<li>In order to start, we will decrypt the file created previously:
<div id="attachment_7181" style="width: 1034px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-decrypt-pgp.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7181" class="size-full wp-image-7181" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-decrypt-pgp.jpg" alt="PGP decryption in SSIS" width="1024" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-decrypt-pgp.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-decrypt-pgp-300x185.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-decrypt-pgp-768x473.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><p id="caption-attachment-7181" class="wp-caption-text">Decrypt file using PGP</p></div></li>
<li>Also, we will use the following argument:<br />
<pre class="crayon-plain-tag">--decrypt-files "c:\sql\ssiskey.txt.gpg"</pre>
&nbsp;</li>
</ol>
<h3>How to import a public key in PGP encryption using SSIS</h3>
<ol>
<li>In order to send a message and decrypt it, you need a public key. If you publish a public key, the recipient needs to import the public key. To import a key use the following argument:<br />
<pre class="crayon-plain-tag">gpg --import "c:\sql\publickey.txt".</pre>
You can download a public key here:</p>
<ul>
<li><a href="https://futureboy.us/pgp.txt" target="_blank" rel="noopener">Public key</a></li>
</ul>
</li>
<li>Secondly, in the Execute Process Task, will look like this:
<div id="attachment_7183" style="width: 747px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-pgp-gpg-import-key.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7183" class="size-full wp-image-7183" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-pgp-gpg-import-key.jpg" alt="Import SSIS key " width="737" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-pgp-gpg-import-key.jpg 737w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-pgp-gpg-import-key-300x257.jpg 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-7183" class="wp-caption-text">How to import a public key in SSIS</p></div></li>
</ol>
<h3>How to encrypt multiple files in PGP encryption using SSIS</h3>
<ol>
<li>If you want to encrypt multiple files, you can use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-file-system-task-advanced/" target="_blank" rel="noopener">ZS Advanced File System</a> combined with the Foreach loop container to filter and select the files to encrypt.</li>
<li>In addition, the package will look like this:
<div id="attachment_7185" style="width: 260px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-list-files-ado-list.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7185" class="size-full wp-image-7185" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-list-files-ado-list.jpg" alt="Get multiple files" width="250" height="206" /></a><p id="caption-attachment-7185" class="wp-caption-text">Send a list of files to the foreach loop</p></div></li>
<li>Also, in the Advanced File System, we will list the files as ADO.net DataTable:
<div id="attachment_7186" style="width: 693px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-get-list-ado-list.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7186" class="size-full wp-image-7186" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-get-list-ado-list.jpg" alt="ADO list of files" width="683" height="633" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-get-list-ado-list.jpg 683w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-get-list-ado-list-300x278.jpg 300w" sizes="(max-width: 683px) 100vw, 683px" /></a><p id="caption-attachment-7186" class="wp-caption-text">Store list of files in SSIS</p></div></li>
<li>In the next step, we will use the Foreach ADO Enumerator in the Foreach Loop container:
<div id="attachment_7188" style="width: 747px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-foreach-ado-enumerator.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7188" class="size-full wp-image-7188" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-foreach-ado-enumerator.jpg" alt="SSIS foreach loop container" width="737" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-foreach-ado-enumerator.jpg 737w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-foreach-ado-enumerator-300x257.jpg 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-7188" class="wp-caption-text">Foreach loop from the Advanced Files system</p></div></li>
<li>Next, we will select the first column (column 0) to get the file path from the list.
<div id="attachment_7189" style="width: 747px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-mapping-column.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7189" class="size-full wp-image-7189" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-mapping-column.jpg" alt="Get the file path" width="737" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-mapping-column.jpg 737w, https://zappysys.com/blog/wp-content/uploads/2019/06/ssis-mapping-column-300x257.jpg 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-7189" class="wp-caption-text">Send column 0 that contains the full path</p></div></li>
<li>Finally, we will use the following expression for the argument property to encrypt all the txt files of the ADO list:<br />
<pre class="crayon-plain-tag">"--recipient \"Daniel Calbimonte\" --output \""+ @[User::filepath]+".gpg\""+" 
--encrypt \""+@[User::filepath]+"\""</pre>
<div id="attachment_7190" style="width: 571px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/arguments-used-ssis.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7190" class="size-full wp-image-7190" src="https://zappysys.com/blog/wp-content/uploads/2019/06/arguments-used-ssis.jpg" alt="Expression to encrypt multiple files" width="561" height="503" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/arguments-used-ssis.jpg 561w, https://zappysys.com/blog/wp-content/uploads/2019/06/arguments-used-ssis-300x269.jpg 300w" sizes="(max-width: 561px) 100vw, 561px" /></a><p id="caption-attachment-7190" class="wp-caption-text">SSIS expression to encrypt multiple files</p></div></li>
</ol>
<h3>Troubleshooting PGP encryption using SSIS</h3>
<ol>
<li>First of all, if your package works in SSDT or VS and fails in the agent, verify that you are using a proxy account with permissions to run the gpg command line. For more information about SQL Agent proxies, refer to <a href="https://docs.microsoft.com/en-us/sql/ssms/agent/create-a-sql-server-agent-proxy?view=sql-server-2017" target="_blank" rel="noopener">this link</a>.</li>
</ol>
<h2>References</h2>
<p>For more information, refer to these links:</p>
<ul>
<li><a href="https://www.glump.net/howto/cryptography/practical-introduction-to-gnu-privacy-guard-in-windows#installing_in_other_operating_systems" target="_blank" rel="noopener">Practical Introduction to GNU Privacy Guard in Windows</a></li>
<li><a href="https://www.gnupg.org/gph/en/manual/book1.html" target="_blank" rel="noopener">The GNU Privacy Handbook</a></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/ssis-pgp-encryption-decryption/">SSIS PGP Encryption / Decryption (Using FREE GPG Tool)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using Regular Expressions in SSIS</title>
		<link>https://zappysys.com/blog/using-regular-expressions-in-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 07 Mar 2018 17:38:24 +0000</pubDate>
				<category><![CDATA[SSIS Advanced File System Task]]></category>
		<category><![CDATA[SSIS Amazon Storage Task]]></category>
		<category><![CDATA[SSIS Azure Blob Storage Task]]></category>
		<category><![CDATA[SSIS Regex Parser Task]]></category>
		<category><![CDATA[SSIS SFTP Task]]></category>
		<category><![CDATA[SSIS Tasks]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[Regular Expression]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=2858</guid>

					<description><![CDATA[<p>Introduction In this short article, you will learn how to write Regular expressions in SSIS (i.e. Regex) and what tool to use to test them. You will also find helpful resources on how to write more sophisticated expressions and learn more about them. For demo purposes, we will use FREE SSIS Regex Parser Task to parse and [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/using-regular-expressions-in-ssis/">Using Regular Expressions in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis-regex-parser-task.png"><img loading="lazy" decoding="async" class=" wp-image-2974 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis-regex-parser-task.png" alt="" width="114" height="114" /></a>In this short article, you will learn how to write Regular expressions in SSIS (i.e. Regex) and what tool to use to test them. You will also find helpful resources on how to write more sophisticated expressions and learn more about them. For demo purposes, we will use <strong>FREE</strong> <a href="https://zappysys.com/products/ssis-powerpack/ssis-regex-parser-task/" target="_blank" rel="noopener">SSIS Regex Parser Task</a> to parse and extract the text using Regex.</p>
<p>&nbsp;</p>
<p>You can use Regular expressions in several SSIS PowerPack connectors:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-regex-parser-task/" target="_blank" rel="noopener">SSIS Regex Parser Task (FREE)</a>,</li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-azure-blob-storage-task/" target="_blank" rel="noopener">Azure Blob Storage Task</a>,</li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-file-system-task-advanced/" target="_blank" rel="noopener">Advanced File System Task</a>,</li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/" target="_blank" rel="noopener">Amazon S3 Storage Task</a> and others.</li>
</ul>
<h2>Writing Regular Expressions in SSIS</h2>
<p>Based on the SSIS component you use it will include the filename in filtering options or match the text: See below Syntax to write Regex in ZappySys tools. We support additional construct {{X, Y}} at the end of Regex to control two parameters. This additional construct is useful for data extracted from matching regex. If you want to Test patterns and not worry about data extraction then no need to use last {{<pre class="crayon-plain-tag">Occurance_Index</pre>, <pre class="crayon-plain-tag">Group_Index_Or_Name</pre>}}</p>
<p><strong>Syntax:</strong><br />
<pre class="crayon-plain-tag">&lt;your Regular Expression&gt;[{{Occurance_Index|*[,Group_Index_Or_Name]}}]</pre>
<p><strong>Where:</strong><br />
<pre class="crayon-plain-tag">Occurance_Index</pre>=Occurrence index you want to extract (X=0 means the first match) and * means all matches. Use a minus sign to get an occurrence from reverse (e.g. {{-0}} returns the last match)<br />
<pre class="crayon-plain-tag">Group_Index_Or_Name</pre>=Group index/name within your search pattern (Groups are indicated by parentheses in regular expression, Y=0 means first group). If you named your group in the pattern then you can use the Group name. To use Group Name you must use the new version (the old version doesn&#8217;t support this)</p>
<p><strong>How to name a group?</strong></p>
<p>E.g. (\w+)@(<strong>?&lt;domain&gt;</strong>\w+.com)</p>
<p><strong>How to use the group name in the match extract?</strong></p>
<p>E.g. (\w+)@(<strong>?&lt;domain&gt;</strong>\w+.com){{0,<strong>domain</strong>}}</p>
<p><strong>Example Input:</strong></p>
<p>Let&#8217;s assume we have the following input text. We will test various Expressions.</p><pre class="crayon-plain-tag">Customer =&gt; AAA
Email =&gt; aaa@google.com
Phone =&gt; 101-222-3333
========
Customer =&gt; BBB
Email =&gt; bbb@yahoo.com
Phone =&gt; 102-222-3333
========
Customer =&gt; CCC
Email =&gt; ccc@hotmail.com
Phone =&gt; 103-222-3333
========
Customer =&gt; DDD
Email =&gt; ddd@outlook.com
Phone =&gt; 104-222-3333</pre><p>
<strong>Sample Regex Expressions</strong></p>
<div class="su-table su-table-alternate">
<table style="border-collapse: collapse;width: 100%;height: 332px" border="1">
<tbody>
<tr style="height: 22px">
<td style="width: 50%;height: 22px"><strong>Expression</strong></td>
<td style="width: 50%;height: 22px"><strong>Description</strong></td>
</tr>
<tr style="height: 46px">
<td style="width: 50%;height: 46px">(?s).*</td>
<td style="width: 50%;height: 46px">Match anything including new lines. To match anything without new line just use <pre class="crayon-plain-tag">(.*)</pre></td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">\w+([-+.&#8217;]\w+)*@(?&lt;domain&gt;\w+([-.]\w+)*\.\w+([-.]\w+)*)</td>
<td style="width: 50%;height: 22px">Get first email id from text ({{0}} is omitted from end because {{0}} id default)</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">\w+([-+.&#8217;]\w+)*@(?&lt;domain&gt;\w+([-.]\w+)*\.\w+([-.]\w+)*){{-0}}</td>
<td style="width: 50%;height: 22px">Get last email id from text</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">\w+([-+.&#8217;]\w+)*@(?&lt;domain&gt;\w+([-.]\w+)*\.\w+([-.]\w+)*){{*}}</td>
<td style="width: 50%;height: 22px">Get all email addresses (separate them with new line). When you suffix Regular expression with {{*}} it will return all matches.</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">\w+([-+.&#8217;]\w+)*@(?&lt;domain&gt;\w+([-.]\w+)*\.\w+([-.]\w+)*){{2}}</td>
<td style="width: 50%;height: 22px">Get third email id from text (i.e. ends with {{X}} where X is occurrence index starting from 0)</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">\w+([-+.&#8217;]\w+)*@(?&lt;domain&gt;\w+([-.]\w+)*\.\w+([-.]\w+)*){{0,2}}</td>
<td style="width: 50%;height: 22px">Get first email pattern match (i.e. Index=0) and extract domain (i.e. 2nd group). Index starting from 0 for occurrence and group</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">(\d*)-(\d*)-(\d*)</td>
<td style="width: 50%;height: 22px">Get first phone number from text (If you don&#8217;t include {{X,Y}} at the end then it will be always [0,0])</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">^((?!demo|test).)*$</td>
<td style="width: 50%;height: 22px">Match whole input text if it does not contain words like demo or test. If word found then No Match</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">&lt;tag&gt;((.|\n)*?)&lt;/tag&gt;{{0,1}}</td>
<td style="width: 50%;height: 22px">Extract anything between &lt;tag&gt;&#8230;&lt;/tag&gt; (Include new line char i.e. \n)</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">&lt;tag&gt;(.*)&lt;/tag&gt;{{0,1}}</td>
<td style="width: 50%;height: 22px">Extract anything between &lt;tag&gt;&#8230;&lt;/tag&gt; (Exclude new line char i.e. \n)</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">&lt;!\[CDATA\[((.|\n)*?)\]\]\&gt;{{0,1}}</td>
<td style="width: 50%;height: 22px">Extract content from CData section of XML Data (This can be CSV, JSON or nested XML )</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">^$</td>
<td style="width: 50%;height: 22px">Match blank string</td>
</tr>
</tbody>
</table>
</div>
<h2>More Regular Expression Examples</h2>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td style="width: 196px"><strong>Input Text</strong></td>
<td style="width: 223px"><strong>Regex</strong></td>
<td style="width: 163px"><strong>Matched text</strong></td>
<td style="width: 752px"><strong>Comment</strong></td>
</tr>
<tr>
<td style="width: 196px">&lt;row id=&#8221;123&#8243; process=&#8221;Y&#8221;&gt;</td>
<td style="width: 223px">id=&#8221;([^&#8221;]*)&#8221;{{0,1}}</td>
<td style="width: 163px"><strong>123</strong></td>
<td style="width: 752px">This expression shows how to extract group value (i.e. {{0,1}} &#8211; first match and 2nd group ). It extracts text between double quotes using <strong>[^&#8221;]*</strong> pattern , match anything until double quote is found.  {{0,1}} syntax is ZappySys specific so it may not work with other Regex engines.</td>
</tr>
<tr>
<td style="width: 196px">&lt;data&gt;123&lt;/data&gt;</td>
<td style="width: 223px">&lt;data&gt;([^&lt;]*)&lt;\/data&gt;{{0,1}}</td>
<td style="width: 163px"><strong>123</strong></td>
<td style="width: 752px">This expression shows how to extract group value (i.e. {{0,1}} &#8211; first match and 2nd group ). It extracts text between double quotes using <strong>[^&lt;]*</strong> pattern , match anything until <strong>&lt;</strong>  is found.  {{0,1}} syntax is ZappySys specific so it may not work with other Regex engines.</td>
</tr>
<tr>
<td style="width: 196px" valign="top">File_20180930_source.txt</td>
<td style="width: 223px" valign="top">File</td>
<td style="width: 163px" valign="top"><strong>File</strong></td>
<td style="width: 752px" valign="top">Will match text/filename that has &#8220;File&#8221; keyword in it.</td>
</tr>
<tr>
<td style="width: 196px" valign="top">File_20180930_SOURCE.dat<br />
File_20180930_source.dat</td>
<td style="width: 223px" valign="top">source|SOURCE</td>
<td style="width: 163px" valign="top"><strong>SOURCE</strong> and <strong>source</strong></td>
<td style="width: 752px" valign="top">Will match text/filenames that contain either &#8220;source&#8221; <strong>or</strong> &#8220;SOURCE&#8221; keyword.</td>
</tr>
<tr>
<td style="width: 196px" valign="top">File_20180930_source.txt</td>
<td style="width: 223px" valign="top">File.+source</td>
<td style="width: 163px" valign="top"><strong>File_20180930_source</strong></td>
<td style="width: 752px" valign="top">Will match text/filename that contains keyword that starts with &#8220;File&#8221; <strong>and</strong> ends with &#8220;source&#8221;.<br />
Basically, you can use this pattern if you want to match two keywords in the text that appear in particular order.</td>
</tr>
<tr>
<td style="width: 196px" valign="top">File_20180930_source.txt<br />
File_20180830_source.dat</td>
<td style="width: 223px" valign="top">\.txt$|\.dat$</td>
<td style="width: 163px" valign="top"><strong>.txt</strong> and <strong>.dat</strong></td>
<td style="width: 752px" valign="top">Will match text/all filenames that end with &#8220;.txt&#8221; <strong>or</strong> &#8220;.dat&#8221;.</td>
</tr>
<tr>
<td style="width: 196px" valign="top">File_20180930_source.txt<br />
file_20190102_source.txt</td>
<td style="width: 223px" valign="top">^(F|f)ile_\d{8}</td>
<td style="width: 163px" valign="top"><strong>File_20180930</strong><br />
<strong>file_20190102</strong></td>
<td style="width: 752px" valign="top">Will match text/filename that starts with &#8220;File_&#8221; <strong>or</strong> &#8220;file_&#8221; <strong>and</strong> then followed by 8 digits.</td>
</tr>
<tr>
<td style="width: 196px" valign="top">File_20180930_source.txt<br />
File_20190101_none.txt</td>
<td style="width: 223px" valign="top">(.+)_(.+)_(.+){{0,2}}</td>
<td style="width: 163px" valign="top"><strong>20180930</strong></td>
<td style="width: 752px" valign="top">Will match text that has three groups of text strings, separated by &#8220;_&#8221;.<br />
Non-Regex {{0,2}} notation will bring back second group (index &#8220;2&#8221;) of first match (index &#8220;0&#8221;).</td>
</tr>
<tr>
<td style="width: 196px">File_20180930_source.txt<br />
File_20190101_none.txt</td>
<td style="width: 223px">(.+)_(.+)_(.+){{1,2}}</td>
<td style="width: 163px"><strong>20190101</strong></td>
<td style="width: 752px">Will match text that has three groups of text strings, separated by &#8220;_&#8221;.<br />
Non-Regex {{1,2}} notation will bring back second group (index &#8220;2&#8221;) of second match (index &#8220;1&#8221;).</td>
</tr>
<tr>
<td style="width: 196px">File_20180930_source.txt<br />
File_20190101_none.txt</td>
<td style="width: 223px">(.+)_(.+)_(.+){{*,2}}</td>
<td style="width: 163px"><strong>20180930<br />
20190101<br />
</strong></td>
<td style="width: 752px">Will match text that has three groups of text strings, separated by &#8220;_&#8221;.<br />
Non-Regex {{*,2}} notation will bring back second group (index &#8220;2&#8221;) of all matches (index &#8220;*&#8221;). Returned matches are separated by \r\n</td>
</tr>
<tr>
<td style="width: 196px">&lt;html&gt;<br />
&lt;img src=&#8221;/img-1.png&#8221; /&gt;<br />
&lt;img src=&#8221;/img-2.png&#8221; /&gt;<br />
&lt;img src=&#8221;/img-3.png&#8221; /&gt;<br />
<span style="font-family: inherit;font-size: inherit">&lt;/html&gt;</span></td>
<td style="width: 223px">&lt;img[^&gt;]+src=&#8221;([^&#8221;&gt;]+)&#8221;{{*,1}}</td>
<td style="width: 163px"><strong>/img-1.png<br />
/img-2.png<br />
/img-3.png<br />
</strong></td>
<td style="width: 752px">Will return image URLs from HTML content. We used {{*,1}} means it will pull all occurrences and for each match it will extract first group (which is just src attribute value).</td>
</tr>
<tr>
<td style="width: 196px">null</td>
<td style="width: 223px">^((?!null\b).)*$</td>
<td style="width: 163px"><strong>&lt;blank&gt;</strong></td>
<td style="width: 752px">Returns blank if null word found (match all except null)</td>
</tr>
<tr>
<td style="width: 196px">black white</td>
<td style="width: 223px">^((?!red|blue|orange).)*$</td>
<td style="width: 163px"><strong>black white</strong></td>
<td style="width: 752px">Returns full string as is if any of those 3 words (i.e. red, blue, orange) not found anywhere in the string</td>
</tr>
<tr>
<td style="width: 196px">black white red</td>
<td style="width: 223px">^((?!red|blue|orange).)*$</td>
<td style="width: 163px"><strong>&lt;blank&gt;</strong></td>
<td style="width: 752px">Returns blank if any of those 3 words (i.e. red, blue, orange) found anywhere in the string</td>
</tr>
</tbody>
</table>
</div>
<h2>Regex Examples (Using SSIS Regular Expression Parser Task)</h2>
<p>Here is an example how Regex <pre class="crayon-plain-tag">(.+)_(.+)_(.+){{1,2}}</pre> works in <a href="https://zappysys.com/products/ssis-powerpack/ssis-regex-parser-task/" target="_blank" rel="noopener">Regular Expression Parser Task (FREE)</a>:</p>
<div id="attachment_2978" style="width: 742px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis_powerpack_regular_expression_parser_task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2978" class="wp-image-2978 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis_powerpack_regular_expression_parser_task-e1520866478970.png" alt="Using Regular Expressions in SSIS Regex Parser Task (Extract Groups)" width="732" height="612" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis_powerpack_regular_expression_parser_task-e1520866478970.png 732w, https://zappysys.com/blog/wp-content/uploads/2018/03/ssis_powerpack_regular_expression_parser_task-e1520866478970-300x251.png 300w" sizes="(max-width: 732px) 100vw, 732px" /></a><p id="caption-attachment-2978" class="wp-caption-text">Using Regular Expressions in SSIS Regex Parser Task (Extract Groups)</p></div>
<h2>Using Groups / Occurrence Index</h2>
<p>Some tasks like <a href="https://zappysys.com/products/ssis-powerpack/ssis-regex-parser-task/" target="_blank" rel="noopener">SSIS Regex Parser Task (FREE)</a> supports extracting value from specific occurrence and specific part of matched pattern using special syntax at the end of your pattern (see below).</p><pre class="crayon-plain-tag">Your Regex Pattern Here{{OccuranceIndex,GroupIndex}}</pre><p>
<strong>Where :</strong><br />
OccuranceIndex is 0 based (0=extract first occurrence)<br />
GroupIndex is 0 based (0=extract first matching group from pattern. First group is always entire text. )</p>
<p>See above screenshot in previous section for example.</p>
<h2>Tools</h2>
<p>The best tool we&#8217;ve found to write and test Regex is <a href="http://regexhero.net/tester/" target="_blank" rel="noopener">Regex Hero</a> (will require IE with Silverlight if you want to use it online, in the browser):</p>
<p>Another great site for Regex testing is <a href="https://regex101.com" target="_blank" rel="noopener">https://regex101.com</a> (Works in any browser unlike previous one)</p>
<p>and few more sites as below</p>
<p><a href="http://www.regexr.com/" target="_blank" rel="noopener">http://www.regexr.com/</a><br />
<a href="http://www.regexlib.com/" target="_blank" rel="noopener">http://www.regexlib.com/</a><br />
<a href="http://www.regular-expressions.info/" target="_blank" rel="noopener">http://www.regular-expressions.info/</a></p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis_powerpack_regular_expression_task_using_regex_hero.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2972" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis_powerpack_regular_expression_task_using_regex_hero.png" alt="" width="802" height="483" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis_powerpack_regular_expression_task_using_regex_hero.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/03/ssis_powerpack_regular_expression_task_using_regex_hero-300x181.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/ssis_powerpack_regular_expression_task_using_regex_hero-768x463.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a></p>
<h2>Resources</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/Regular-expressions-quick-reference.pdf">Regular Expressions cheat-sheet to hang on the wall</a></p>
<p><a href="http://www.rexegg.com/regex-quickstart.html" target="_blank" rel="noopener">Regular Expressions quick reference</a></p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/using-regular-expressions-in-ssis/">Using Regular Expressions in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to parameterize properties in SSIS package and configure them in a SQL job</title>
		<link>https://zappysys.com/blog/how-to-run-an-ssis-package-with-sensitive-data-on-sql-server/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 08 Nov 2017 18:16:40 +0000</pubDate>
				<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS Connection Manager]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[connection manager]]></category>
		<category><![CDATA[expression]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[parameterization]]></category>
		<category><![CDATA[sql server agent job]]></category>
		<category><![CDATA[ssis catalog]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=1364</guid>

					<description><![CDATA[<p>Introduction In this article, we will cover the steps of how to run an SSIS package with sensitive data on SQL Server. In an SSIS package sensitive data such as tokens and passwords are by default encrypted by SSIS with your Windows account which you use to create a package. So if ProtectionLevel of a package is [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/how-to-run-an-ssis-package-with-sensitive-data-on-sql-server/">How to parameterize properties in SSIS package and configure them in a SQL job</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Deployment_to_Production">Introduction</span></h2>
<p><img loading="lazy" decoding="async" class="wp-image-2223 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2017/07/how-to-180x180.png" alt="" width="90" height="90" />In this article, we will cover the steps of how to run an SSIS package with sensitive data on SQL Server.</p>
<p>In an SSIS package <a href="https://docs.microsoft.com/en-us/sql/integration-services/security/access-control-for-sensitive-data-in-packages" target="_blank" rel="noopener">sensitive data such as tokens and passwords are by default encrypted by SSIS</a> with your Windows account which you use to create a package. So if <em>ProtectionLevel</em> of a package is set to <em>EncryptSensitiveWithUserKey</em> (or <em>DontSaveSensitive</em>), SSIS will fail to decrypt tokens/passwords, when you run it from another machine using another Windows account. To circumvent this, when you are creating an SSIS package that uses authentication components (e.g. an <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a> or an <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-http-connection-manager.htm" target="_blank" rel="noopener">HTTP Connection Manager</a> with credentials, or any other component that uses sensitive data), consider using parameters/variables to pass tokens/passwords to the package. In this way, you won’t face authentication-related errors when the package is deployed to a production server. Below you will find out the ways how to parameterize and configure parameters when running an SSIS package in a SQL Job.</p>
<h2>Is it necessary to parameterize all the authentication details/credentials?</h2>
<p>No. You just need to parameterize those properties that are needed in the process of authentication or making a request. For example, if you are using OAuth Connection Manager, you will need to parameterize <em>RefreshToken</em>, and <em>ClientSecret </em>in the Authorization Code Grant (3-Legged Auth) authentication scenario. If you use Password Grant, you will need to parameterize the <em>Password</em> property as well. You do <span style="text-decoration: underline;"><em>not</em></span> need to parameterize <em>AccessToken</em>, because it is generated using a <em>RefreshToken.</em></p>
<p>But you may consider parameterizing environment-specific properties such as URL, ClientID, UserName, and similar even if they are not encrypted by SSIS. You would need to do that when you work in one environment when developing and testing packages while in another in production, UAT, etc. For example, you would use one OAuth Application while developing but another in production &#8212; you would also need to parameterize ClientID and perhaps Authorize and Token URLs too.</p>
<h2>How to parameterize an SSIS Connection Manager</h2>
<p>Most often sensitive data is used by SSIS Connection Manager, in password, OAuth token, etc. properties. To pass a token or a password dynamically you will have to use a variable/parameter together with expression. 2012 and above versions of Visual Studio or BIDS have a nice way to do it, while in Visual Studio 2008 you will have to set it up manually. Another way is to set sensitive data using <em>SSIS Package Configuration</em> file, which is applicable when you have enabled <a href="https://docs.microsoft.com/en-us/sql/integration-services/packages/deploy-integration-services-ssis-projects-and-packages" target="_blank" rel="noopener">package deployment model</a> (obsolete method).</p>
<h3>Using parameters or variables</h3>
<p>Below you will learn how to set a property using a variable/parameter together with an expression. If you are not sure, what property to set, check <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-connection-managers.htm" target="_blank" rel="noopener">the documentation of connection managers</a> to find out.</p>
<h4>Using a parameter</h4>
<ol>
<li>Right click on a Connection Manager and press <em>Parameterize</em>:
<div id="attachment_2184" style="width: 427px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2184" class="wp-image-2184 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-parameterized-connection-manager-e1509641291182.png" alt="Connection Manager parameterization" width="417" height="194" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-parameterized-connection-manager-e1509641291182.png 417w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-parameterized-connection-manager-e1509641291182-300x140.png 300w" sizes="(max-width: 417px) 100vw, 417px" /><p id="caption-attachment-2184" class="wp-caption-text">Connection Manager parameterization</p></div></li>
<li>Then select an appropriate property you want to parametrize, e.g. <pre class="crayon-plain-tag">Password</pre>, and give a name to the parameter. For <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a> we will use <pre class="crayon-plain-tag">RefreshToken</pre>.
<div id="attachment_2229" style="width: 514px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-connection-manager-variable-parameter-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2229" class="wp-image-2229 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-connection-manager-variable-parameter-1.png" alt="Parameterizing OAuth Connection Manager property &quot;RefreshToken&quot;" width="504" height="632" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-connection-manager-variable-parameter-1.png 504w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-connection-manager-variable-parameter-1-239x300.png 239w" sizes="(max-width: 504px) 100vw, 504px" /></a><p id="caption-attachment-2229" class="wp-caption-text">Parameterizing OAuth Connection Manager property &#8220;RefreshToken&#8221;</p></div></li>
</ol>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE: </strong>Applies to SQL Server 2012 and above.</div></div>
<h4>Using a variable</h4>
<p>Below is an example how to set any property of a Data Flow using an expression and a variable. You can do the same thing for a Connection Manager &#8211; just create a variable, find a property named <pre class="crayon-plain-tag">Password</pre> or <pre class="crayon-plain-tag">RefreshToken</pre>, etc. and use that variable to set its value:</p>
<div class="content_block" id="custom_post_widget-2159"><ol style="margin-left: 0;">
 	<li>To define an expression for any property of a component, first navigate to the Data Flow designer surface.<a href="https://zappysys.com/blog/wp-content/uploads/2017/10/SSIS-DataFlow-Expression-Change-Component-Property-at-runtime.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-11511 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/10/SSIS-DataFlow-Expression-Change-Component-Property-at-runtime.png" alt="SSIS DataFlow Expression - Change Component Property at runtime" width="370" height="374" srcset="https://zappysys.com/blog/wp-content/uploads/2017/10/SSIS-DataFlow-Expression-Change-Component-Property-at-runtime.png 370w, https://zappysys.com/blog/wp-content/uploads/2017/10/SSIS-DataFlow-Expression-Change-Component-Property-at-runtime-297x300.png 297w" sizes="(max-width: 370px) 100vw, 370px" /></a></li>
 	<li>Now, right-click anywhere in the data flow designer surface and click the "Properties" menu item.</li>
 	<li>When the Properties window appears, select a property and press the [...] button to set an expression.</li>
 	<li>Now enter the property and expression you need.<a href="https://zappysys.com/blog/wp-content/uploads/2017/10/SSIS-DataFlow-Expression-Edit-Component-Property-Expression.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-11512 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/10/SSIS-DataFlow-Expression-Edit-Component-Property-Expression.png" alt="SSIS DataFlow Expression - Edit Component Property Expression" width="920" height="515" srcset="https://zappysys.com/blog/wp-content/uploads/2017/10/SSIS-DataFlow-Expression-Edit-Component-Property-Expression.png 920w, https://zappysys.com/blog/wp-content/uploads/2017/10/SSIS-DataFlow-Expression-Edit-Component-Property-Expression-300x168.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/10/SSIS-DataFlow-Expression-Edit-Component-Property-Expression-768x430.png 768w" sizes="(max-width: 920px) 100vw, 920px" /></a></li>
</ol></div>
<h3>Using a configuration file (obsolete method)</h3>
<p>So if you wanted to parameterize <pre class="crayon-plain-tag">RefreshToken</pre> of <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm" target="_blank" rel="noopener">OAuth Connection Manager</a>, SSIS Package Configuration file would look like this:</p><pre class="crayon-plain-tag">&lt;?xml version="1.0"?&gt;
&lt;DTSConfiguration&gt;
    &lt;DTSConfigurationHeading&gt;
        &lt;DTSConfigurationFileInfo GeneratedBy="ZappySys\ZappySys" GeneratedFromPackageName="-Sandbox-" GeneratedFromPackageID="{152417C7-3764-4910-91E3-1D35C8FE89AE}" GeneratedDate="2017-11-03 19:22:13"/&gt;
    &lt;/DTSConfigurationHeading&gt;
    &lt;Configuration ConfiguredType="Property" Path="\Package.Connections[OAuth 1].Properties[RefreshToken]" ValueType="String"&gt;
        &lt;ConfiguredValue&gt;real-refresh-token-value-goes-here&lt;/ConfiguredValue&gt;
    &lt;/Configuration&gt;
&lt;/DTSConfiguration&gt;</pre><p>
<h2>How to pass a variable/parameter to an SSIS Connection Manager</h2>
<h3>Executing a package from SSIS Catalog</h3>
<p>When you are executing a package from SSIS Catalog to set a property you will have to use a <em>parameter</em>.</p>
<ol>
<li>Select <em>SQL Server Agent Job</em> and access its properties. Then select <pre class="crayon-plain-tag">SSIS Catalog</pre> as <em>Package source</em> and select your package:
<div id="attachment_2237" style="width: 711px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-execute-package-configure.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2237" class="wp-image-2237 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-execute-package-configure.png" alt="Parameterizing OAuth Connection Manager property &quot;RefreshToken&quot;" width="701" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-execute-package-configure.png 701w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-execute-package-configure-300x270.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></a><p id="caption-attachment-2237" class="wp-caption-text">Running SSIS package from SSIS Catalog</p></div></li>
<li>In <em>Configuration</em> tab parameter will be already present, so just click on <pre class="crayon-plain-tag">[...]</pre> button and input your parameter value:<a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-configure-package-parameter-with-value-1.png"><br />
</a></p>
<div id="attachment_2248" style="width: 711px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-configure-package-parameter-with-value-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2248" class="wp-image-2248 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-configure-package-parameter-with-value-1.png" alt="Configuring parameter for SSIS package which is run from SSIS Catalog" width="701" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-configure-package-parameter-with-value-1.png 701w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-configure-package-parameter-with-value-1-300x270.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></a><p id="caption-attachment-2248" class="wp-caption-text">Configuring parameter for SSIS package which is run from SSIS Catalog</p></div></li>
</ol>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE: </strong>Applies to SQL Server 2012 and above.</div></div>
<h4>Using a parameter from SSIS Environment</h4>
<p>Another way of passing a parameter when using SSIS Catalog is to use <em>Environment</em> parameter.</p>
<ol>
<li>Create an environment if you don&#8217;t have one already and access its properties:
<div id="attachment_2284" style="width: 733px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-create-environment-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2284" class="wp-image-2284 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-create-environment-1.png" alt="Creating and configuring SSIS Environment" width="723" height="312" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-create-environment-1.png 723w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-create-environment-1-300x129.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-create-environment-1-720x312.png 720w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-2284" class="wp-caption-text">Creating and configuring SSIS Environment</p></div></li>
<li>Click <em>Variables</em> and create a parameter with appropriate type and don&#8217;t forget to check <pre class="crayon-plain-tag">Sensitive checkbox</pre>:
<div id="attachment_2250" style="width: 764px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-environment-variables-parameters-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2250" class="wp-image-2250 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-environment-variables-parameters-2.png" alt="Creating a sensitive parameter in SSIS environment" width="754" height="505" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-environment-variables-parameters-2.png 754w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-environment-variables-parameters-2-300x201.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-environment-variables-parameters-2-272x182.png 272w" sizes="(max-width: 754px) 100vw, 754px" /></a><p id="caption-attachment-2250" class="wp-caption-text">Creating a sensitive parameter in SSIS environment</p></div></li>
<li>Then go to your SSIS Catalog project and click <pre class="crayon-plain-tag">Configure</pre>:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-configure-project.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2276" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-configure-project.png" alt="" width="401" height="162" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-configure-project.png 401w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-catalog-configure-project-300x121.png 300w" sizes="(max-width: 401px) 100vw, 401px" /></a></li>
<li>Click <pre class="crayon-plain-tag">References</pre> and <pre class="crayon-plain-tag">Add</pre> button. Select the environment you had created in first step:
<div id="attachment_2257" style="width: 766px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-set-environment-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2257" class="wp-image-2257 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-set-environment-1.png" alt="Adding SSIS environment to SSIS Catalog project" width="756" height="505" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-set-environment-1.png 756w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-set-environment-1-300x200.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-set-environment-1-272x182.png 272w" sizes="(max-width: 756px) 100vw, 756px" /></a><p id="caption-attachment-2257" class="wp-caption-text">Adding SSIS environment to SSIS Catalog project</p></div></li>
<li>Then click <pre class="crayon-plain-tag">Parameters</pre> and  <pre class="crayon-plain-tag">[...]</pre>  button on the parameter you want to set:
<div id="attachment_2252" style="width: 765px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-with-environment-parameter-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2252" class="wp-image-2252 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-with-environment-parameter-2.png" alt="Setting an environment variable for SSIS Catalog project" width="755" height="504" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-with-environment-parameter-2.png 755w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-with-environment-parameter-2-300x200.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-with-environment-parameter-2-272x182.png 272w" sizes="(max-width: 755px) 100vw, 755px" /></a><p id="caption-attachment-2252" class="wp-caption-text">Setting an environment variable for SSIS Catalog project</p></div></li>
<li>The result should look similar to this:
<div id="attachment_2235" style="width: 765px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-with-environment-parameter.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2235" class="wp-image-2235 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-with-environment-parameter.png" alt="Result after you configured SSIS Catalog project to use an environment variable" width="755" height="504" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-with-environment-parameter.png 755w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-with-environment-parameter-300x200.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-with-environment-parameter-272x182.png 272w" sizes="(max-width: 755px) 100vw, 755px" /></a><p id="caption-attachment-2235" class="wp-caption-text">Result after you configured SSIS Catalog project to use an environment variable</p></div></li>
<li>Then in <em>SQL Server Agent Job</em> properties, <pre class="crayon-plain-tag">Configuration</pre> tab select the environment you created. Configured parameter will be set automatically:
<div id="attachment_2256" style="width: 711px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-parameter-using-environment-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2256" class="wp-image-2256 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-parameter-using-environment-2.png" alt="Using environment variable in SQL Server Agent Job" width="701" height="629" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-parameter-using-environment-2.png 701w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configure-package-parameter-using-environment-2-300x269.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></a><p id="caption-attachment-2256" class="wp-caption-text">Using environment variable in SQL Server Agent Job</p></div></li>
</ol>
<h2>SSIS Sensitive Data Issue with OAuth Authentication</h2>
<p>When working with OAuth-based connectors in SSIS (such as Dynamics CRM, Dataverse, or other Azure AD–secured APIs), it’s common to store credentials like <strong>Client ID</strong> and <strong>Client Secret</strong> inside SSIS variables or parameters.</p>
<p>However, <strong>incorrect handling of sensitive data in SSIS can cause SQL Server Agent job failures</strong>, even when the package runs successfully in Visual Studio (SSDT). </p>
<h3>SSIS Package Works in Visual Studio but Fails in SQL Server Agent</h3>
<p>A common scenario occurs when an SSIS package executes without issues in Visual Studio, but fails when scheduled or executed via <strong>SQL Server Agent</strong>. </p>
<p>In one real-world case, a Dynamics CRM connector was configured using OAuth authentication, and the following values were stored in SSISDB parameters:
</p>
<ul>
<li>Application (Client) ID</li>
<li>Client Secret</li>
</ul>
<p> When <strong>both parameters were marked as Sensitive</strong>, the package failed during SQL Agent execution, despite working correctly at design time.
</p>
<h3>Why Marking SSIS Variables as Sensitive Causes Job Failures</h3>
<p>This behavior is <strong>not specific to ZappySys</strong>; it is a well-known SSIS limitation:</p>
<ul>
<li>SSIS encrypts values marked as <strong>Sensitive</strong></li>
<li>Decryption depends on the execution context (user vs SQL Agent service account)</li>
<li>Over-encrypting non-secret values can prevent successful runtime decryption</li>
</ul>
<p>This issue frequently appears when <strong>non-secret OAuth parameters</strong> are incorrectly marked as sensitive.</p>
<h3>How to Store OAuth Client ID and Client Secret in SSIS Securely</h3>
<p>For OAuth-based authentication in SSIS (Dynamics CRM, Dataverse, Azure AD APIs, etc.), use the following recommended configuration: </p>
<table>
<thead>
<tr>
<th>OAuth Parameter</th>
<th>Mark as Sensitive?</th>
</tr>
</thead>
<tbody>
<tr>
<td>Client ID (Application ID)</td>
<td>No</td>
</tr>
<tr>
<td>Tenant ID</td>
<td>No</td>
</tr>
<tr>
<td>Authority / Resource URL</td>
<td>No</td>
</tr>
<tr>
<td>Client Secret</td>
<td>Yes</td>
</tr>
</tbody>
</table>
<p><strong>Only true secrets should be marked as Sensitive. </strong> The Client ID is not confidential and does not require encryption. </p>
<h3>Best Practice: Use SSISDB Sensitive Parameters Instead of SSIS Variables</h3>
<p>To avoid SQL Agent execution issues, always use <strong>SSIS Catalog (SSISDB) parameters</strong> for sensitive values: </p>
<ol>
<li>Deploy the package to <strong>SSISDB</strong></li>
<li>Convert connection properties into <strong>Project or Package Parameters</strong></li>
<li>Mark <strong>only sensitive values</strong> (such as Client Secret) as Sensitive</li>
<li>Assign values through <strong>SSISDB Environments</strong></li>
</ol>
<p>SSISDB encrypts sensitive parameters securely and allows SQL Server Agent to decrypt them correctly at runtime. </p>
<p>For detailed steps, refer to the official documentation: <br />
<a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-parameterization.htm" target="_blank" rel="noopener"><br />
SSIS Parameterization Guide for ZappySys Connectors</a></p>
<h3>Common Mistakes When Handling Sensitive Data in SSIS</h3>
<ul>
<li>Marking Client ID or Tenant ID as Sensitive</li>
<li>Using SSIS variables marked as Sensitive instead of SSISDB parameters</li>
<li>Assuming all OAuth fields require encryption</li>
</ul>
<h3>SSIS Sensitive Data and SQL Agent Execution: Key Takeaways</h3>
<ul>
<li>SQL Server Agent failures often occur due to incorrect Sensitive parameter configuration</li>
<li>OAuth connectors typically require only the Client Secret to be protected</li>
<li>Proper SSISDB parameterization ensures reliable scheduled execution</li>
</ul>
<blockquote><p>
<strong>Pro Tip:</strong> If your SSIS package runs in Visual Studio but fails in SQL Server Agent,<br />
review which parameters are marked as Sensitive before troubleshooting the connector itself.
</p></blockquote>
<h3>Executing a package from a File system / SSIS Package Store / SQL Server</h3>
<p>When you are executing a package from a File system / SSIS Package Store or SQL Server you will have to use a <em>variable </em>(parameters won&#8217;t work).</p>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE: </strong>Be aware that to pass sensitive data in this way is not safe because it is visible to everyone. Consider <a href="#Executing_a_package_from_SSIS_Catalog">executing a package from SSIS Catalog</a> and using sensitive parameters.</div></div>
<h4>Using variables in SQL Server Agent Job configuration</h4>
<p>You can pass a variable in SQL Server Agent Job properties in <pre class="crayon-plain-tag">Set values</pre> tab:</p>
<div id="attachment_2298" style="width: 712px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-package-variables-passing-in-sql-server-agent-3.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2298" class="wp-image-2298 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-package-variables-passing-in-sql-server-agent-3.png" alt="Using a variable in SQL Server Agent Job" width="702" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-package-variables-passing-in-sql-server-agent-3.png 702w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-package-variables-passing-in-sql-server-agent-3-300x269.png 300w" sizes="(max-width: 702px) 100vw, 702px" /></a><p id="caption-attachment-2298" class="wp-caption-text">Using a variable in SQL Server Agent Job</p></div>
<h4>Using a configuration file in SQL Server Agent Job configuration</h4>
<p>You can pass configuration file in SQL Server Agent Job properties in <pre class="crayon-plain-tag">Configurations</pre> tab:</p>
<div id="attachment_2268" style="width: 712px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configuration-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2268" class="wp-image-2268 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configuration-file.png" alt="Using a package configuration file in SQL Server Agent Job" width="702" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configuration-file.png 702w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-configuration-file-300x269.png 300w" sizes="(max-width: 702px) 100vw, 702px" /></a><p id="caption-attachment-2268" class="wp-caption-text">Using a package configuration file in SQL Server Agent Job</p></div>
<h2>Resources</h2>
<ul>
<li><a href="https://docs.microsoft.com/en-us/sql/integration-services/security/access-control-for-sensitive-data-in-packages" target="_blank" rel="noopener">Microsoft article about Package Protection Level</a>.</li>
<li><a href="https://www.hansmichiels.com/2016/11/19/using-sensitive-parameters-ssis-series/" target="_blank" rel="noopener">Using sensitive parameters (SSIS series)</a>.</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/how-to-run-an-ssis-package-with-sensitive-data-on-sql-server/">How to parameterize properties in SSIS package and configure them in a SQL job</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to create BIML custom task or component</title>
		<link>https://zappysys.com/blog/how-to-use-biml-script-to-create-biml-custom-task-or-component/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 21 Sep 2017 16:42:01 +0000</pubDate>
				<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[biml]]></category>
		<category><![CDATA[json source]]></category>
		<category><![CDATA[powerpack]]></category>
		<category><![CDATA[ssis http connection]]></category>
		<category><![CDATA[trash destination]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=2025</guid>

					<description><![CDATA[<p>Introduction BIML, or Business Intelligence Markup Language, is a nice technology that lets you generate SSIS packages using a bit of scripting and parameters.  Check for more info if you are new to it: https://en.wikipedia.org/wiki/Business_Intelligence_Markup_Language http://bimlscript.com/ In this article, we will cover how to create a BIML custom task or component. For this purpose, we will use [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/how-to-use-biml-script-to-create-biml-custom-task-or-component/">How to create BIML custom task or component</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/2017/09/ssis-biml-powerpack-zappysys.png"><img loading="lazy" decoding="async" class="wp-image-2031 alignleft" src="//zappysys.com/blog/wp-content/uploads/2017/09/ssis-biml-powerpack-zappysys.png" alt="" width="90" height="90" srcset="https://zappysys.com/blog/wp-content/uploads/2017/09/ssis-biml-powerpack-zappysys.png 160w, https://zappysys.com/blog/wp-content/uploads/2017/09/ssis-biml-powerpack-zappysys-150x150.png 150w" sizes="(max-width: 90px) 100vw, 90px" /></a><span style="box-sizing: border-box; margin: 0px; padding: 0px;">BIML, or <em>Business Intelligence Markup Language,</em> is a nice technology that lets you generate SSIS packages using a bit of scripting and parameters.</span>  Check for more info if you are new to it:</p>
<ul style="list-style-position: inside;">
<li><a href="https://en.wikipedia.org/wiki/Business_Intelligence_Markup_Language" target="_blank" rel="noopener">https://en.wikipedia.org/wiki/Business_Intelligence_Markup_Language</a></li>
<li><a href="http://bimlscript.com/" target="_blank" rel="noopener">http://bimlscript.com/</a></li>
</ul>
<p>In this article, we will cover how to create a BIML custom task or component. For this purpose, we will use the <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys PowerPack</a> Task or Data Flow component as an example. At the end of this article you will find <a href="//zappysys.com/blog/how-to-use-biml-to-generate-powerpack-ssis-connectors/#Download_sample_BIMLs">sample BIML files</a> you can download and fiddle around.</p>
<h2>Use BIML to create SSIS packages that use PowerPack tasks or components</h2>
<h3>BIML Elements</h3>
<p>BIML uses <pre class="crayon-plain-tag">CustomTask</pre>, <pre class="crayon-plain-tag">CustomComponent</pre>, and <pre class="crayon-plain-tag">CustomSsisConnection</pre> elements to create custom SSIS connectors. In each of them, you will need to specify <pre class="crayon-plain-tag">CreationName</pre> or a similar attribute/element, which defines what kind of component you want to create. E.g., for <em>LoggingTask</em> it would look like this:</p><pre class="crayon-plain-tag">ZappySys.PowerPack.Task.LoggingTask.LoggingTask, ZappySys.PowerPack120, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502</pre><p>
You will find the connector name in DTSX. For Tasks, you have to specify the CreationName attribute; for components, it is UserComponentTypeName. For the <em>Rest API Task, </em>it looks similar to this:</p><pre class="crayon-plain-tag">&lt;DTS:Executable
 DTS:refId="Package\Sequence Container\ZS REST API Task 1.EventHandlers[OnError]\ZS REST API Task"
 DTS:CreationName="ZappySys.PowerPack.Task.RestApiTask.RestApiTask, ZappySys.PowerPack110, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502"</pre><p>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE</strong>: If your SSIS package is of a higher version than SQL Server 2012, convert it to SQL Server 2012 first.</div></div>
<p>For a different SQL Server SSIS package version, you will need to use a different DLL name, e.g.:</p>
<ul>
<li><strong>SQL Server 2008</strong>: ZappySys.PowerPack100</li>
<li><strong>SQL Server 2012</strong>: ZappySys.PowerPack110</li>
<li><strong>SQL Server 2014</strong>: ZappySys.PowerPack120</li>
<li><strong>SQL Server 2016</strong>: ZappySys.PowerPack130</li>
<li><strong>SQL Server 2017</strong>: ZappySys.PowerPack140</li>
</ul>
<p>So, to generate<strong> a SQL Server 2017</strong> SSIS package, the custom connector creation name becomes like this:</p><pre class="crayon-plain-tag">ZappySys.PowerPack.Task.LoggingTask.LoggingTask, ZappySys.PowerPack140, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502</pre><p>
<h3>Create a BIML custom task with CustomTask</h3>
<p>You will need to use the <pre class="crayon-plain-tag">CustomTask</pre> element to create PowerPack Tasks in your Control Flow. So open your DTSX where you use a PowerPack Task, find out the <pre class="crayon-plain-tag">CreationName</pre> and then copy child element in <pre class="crayon-plain-tag">&lt;DTS:ObjectData&gt;</pre> element. (e.g., LoggingTask). You will need to escape it and use it in your BIML as well.</p>
<h4>DTSX snippet</h4>
<pre class="crayon-plain-tag">... 
&lt;DTS:Executable
    DTS:refId="Package\ZS Logging Task"
    DTS:CreationName="ZappySys.PowerPack.Task.LoggingTask.LoggingTask, ZappySys.PowerPack110, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502"
    ...
    &lt;DTS:Variables /&gt;
    &lt;DTS:ObjectData&gt;
    &lt;LoggingTask
        Message="Hello from {{System::PackageName}}. I started on {{System::StartTime,yyy-MM-dd hh:mm:ss tt}}"
        LogVariableName=""
        MessageType="Information"
        LogMode="ExecutionLog"
        LogFilePath=""
        LogFileAppend="True"
        LogDateTime="True"
        DateTimeFormat="HH:mm:ss"
        LogLevel="Normal"
        PrefixTimestamp="False" /&gt;
    &lt;/DTS:ObjectData&gt;
&lt;/DTS:Executable&gt;
...</pre>
<h4>BIML snippet</h4>
<p>A Logging Task under the Tasks element will look like this:</p><pre class="crayon-plain-tag">...
&lt;CustomTask Name="Logging Task" CreationName="ZappySys.PowerPack.Task.LoggingTask.LoggingTask, ZappySys.PowerPack120, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502" TaskContact="ZappySys"&gt;
    &lt;ObjectData&gt;
        &amp;lt;LoggingTask
        Message="Hello from {{System::PackageName}}. I started on {{System::StartTime,yyy-MM-dd hh:mm:ss tt}}"
        LogVariableName=""
        MessageType="Information"
        LogMode="ExecutionLog"
        LogFilePath=""
        LogFileAppend="True"
        LogDateTime="True"
        DateTimeFormat="HH:mm:ss"
        LogLevel="Normal"
        PrefixTimestamp="False" /&amp;gt;
 &lt;/ObjectData&gt;
&lt;/CustomTask&gt;
...</pre><p>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE:</strong> Notice the escaped <pre class="crayon-plain-tag">&lt;LoggingTask&gt;</pre> XML element under <pre class="crayon-plain-tag">&lt;ObjectData&gt;</pre> element.</div></div>
<h3>Create BIML custom components using CustomComponent</h3>
<p>Use the <pre class="crayon-plain-tag">CustomComponent</pre> BIML element to generate these components in DataFlow:</p>
<ul>
<li>Sources</li>
<li>Transformations</li>
<li>Destinations</li>
</ul>
<p>If you need a connection, then use the CustomSsisConnection element.</p>
<p>Again, you will have to copy the <pre class="crayon-plain-tag">UserComponentTypeName</pre> property value and use it in BIML to initialize a component. For a custom connection, it is a bit different: just use the CreationName attribute value from DTSX in the BIML element. Also, don&#8217;t forget to copy property values from DTSX and mirror them in BIML.</p>
<p><span style="box-sizing: border-box; margin: 0px; padding: 0px;">Below are DTSX and BIML snippets showing a Data Flow that contains a JSON Source using an <a target="_blank" rel="noopener">HTTP Connection</a> and is connected to a <a target="_blank" rel="noopener">Trash Destination</a>.</span></p>
<h4>DTSX snippet</h4>
<pre class="crayon-plain-tag">...
&lt;DTS:ConnectionManagers&gt;
    &lt;DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[ZS-HTTP Connection]" DTS:CreationName="ZS-HTTP" DTS:DTSID="{E57D23E9-E50A-4C4A-BB19-B91E776887CF}" DTS:ObjectName="ZS-HTTP Connection"&gt;
        &lt;DTS:ObjectData&gt;
            &lt;ConnectionManager ConnectionString="Url=https://httpbin.org/anything;CredentialType=Notset;UserName=;Timeout=100000;UseProxy=False;ProxyUrl=;UseProxyCreds=False;ProxyUserName=;DoNotUseDefaultProxy=False;UseClientCertificate=False;CertificatePath=;CertificateStorageType=CurrentUser;CertificateStoreName=My;CertificateThumbprint=;RetryMode=None;RetryCountMax=3;RetryWaitTimeMs=2000;RetryMultiplyWaitTime=False;RetryMessageList=;RetryStatusCodeList=" /&gt;
...
&lt;DTS:Executable DTS:refId="Package\Dataflow" DTS:CreationName="SSIS.Pipeline.3" DTS:DTSID="{C59866C4-9732-4B3A-8F80-7784E52C63F5}" DTS:ExecutableType="SSIS.Pipeline.3" DTS:LocaleID="-1" DTS:ObjectName="Dataflow" DTS:TaskContact="Performs high-performance data extraction, transformation and loading;Microsoft Corporation; Microsoft SQL Server v10; (C) 2007 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1"&gt;
    &lt;DTS:ObjectData&gt;
    &lt;pipeline BLOBTempStoragePath="" bufferTempStoragePath="" version="1"&gt;
    &lt;components&gt;
    &lt;component refId="Package\Dataflow\JsonSource" componentClassID="DTS.ManagedComponentWrapper.3" name="JsonSource" usesDispositions="true" version="25"&gt;
        &lt;properties&gt;
            &lt;property dataType="System.Int32" name="AccessMode" typeConverter="ZappySys.Common.Ssis.FileValueAccessMode, ZappySys.Common, Version=1.0.2017.10830, Culture=neutral, PublicKeyToken=1903265a93eae502"&gt;2&lt;/property&gt;
            &lt;property dataType="System.Boolean" name="UseConnection"&gt;true&lt;/property&gt;
            &lt;property dataType="System.String" name="UserComponentTypeName"&gt;ZappySys.PowerPack.Adapter.JsonSource.JsonSource, ZappySys.PowerPack110, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502&lt;/property&gt;
            ...
        &lt;/properties&gt;
        &lt;connections&gt;
            &lt;connection refId="Package\Dataflow\JsonSource.Connections[HTTP 1]" connectionManagerID="Package.ConnectionManagers[ZS-HTTP Connection]" connectionManagerRefId="Package.ConnectionManagers[ZS-HTTP Connection]" name="HTTP 1" /&gt;
        &lt;/connections&gt;
        &lt;outputs&gt;
            &lt;output refId="Package\Dataflow\JsonSource.Outputs[JsonSourceOutput]" errorRowDisposition="FailComponent" name="JsonSourceOutput" truncationRowDisposition="FailComponent"&gt;
                &lt;outputColumns&gt;
                    &lt;outputColumn refId="Package\Dataflow\JsonSource.Outputs[JsonSourceOutput].Columns[Url]" dataType="wstr" externalMetadataColumnId="Package\Dataflow\JsonSource.Outputs[JsonSourceOutput].ExternalColumns[url]" length="50" lineageId="Package\Dataflow\JsonSource.Outputs[JsonSourceOutput].Columns[Url]" name="Url" /&gt;
                &lt;/outputColumns&gt;
                &lt;externalMetadataColumns isUsed="True"&gt;
                    &lt;externalMetadataColumn refId="Package\Dataflow\JsonSource.Outputs[JsonSourceOutput].ExternalColumns[url]" dataType="wstr" length="50" name="url" /&gt;
                &lt;/externalMetadataColumns&gt;
            &lt;/output&gt;
            ...
        &lt;/outputs&gt;
    &lt;/component&gt;
    &lt;component refId="Package\Dataflow\TrashDestination" componentClassID="DTS.ManagedComponentWrapper.3" name="TrashDestination" version="2"&gt;
        &lt;properties&gt;
            &lt;property dataType="System.String" name="UserComponentTypeName"&gt;ZappySys.PowerPack.Adapter.TrashDestination.TrashDestination, ZappySys.PowerPack110, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502&lt;/property&gt;
            ...
        &lt;/properties&gt;
        &lt;inputs&gt;
            &lt;input refId="Package\Dataflow\TrashDestination.Inputs[TrashInput]" name="TrashInput"&gt;
                &lt;externalMetadataColumns /&gt;
            &lt;/input&gt;
        &lt;/inputs&gt;
    &lt;/component&gt;
    &lt;/components&gt;
    &lt;paths&gt;
        &lt;path refId="Package\Dataflow.Paths[TrashInput]" endId="Package\Dataflow\TrashDestination.Inputs[TrashInput]" name="TrashInput" startId="Package\Dataflow\JsonSource.Outputs[JsonSourceOutput]" /&gt;
    &lt;/paths&gt;
...</pre>
<h4>BIML snippet</h4>
<pre class="crayon-plain-tag">...
&lt;Connections&gt;
    &lt;CustomSsisConnection Name="ZS-HTTP Connection" CreationName="ZS-HTTP" ObjectData="&amp;lt;ConnectionManager ConnectionString=&amp;quot;Url=https:&amp;#x2F;&amp;#x2F;httpbin.org&amp;#x2F;anything;CredentialType=Notset;UserName=;Timeout=100000;UseProxy=False;ProxyUrl=;UseProxyCreds=False;ProxyUserName=;DoNotUseDefaultProxy=False;UseClientCertificate=False;CertificatePath=;CertificateStorageType=CurrentUser;CertificateStoreName=My;CertificateThumbprint=;RetryMode=None;RetryCountMax=3;RetryWaitTimeMs=2000;RetryMultiplyWaitTime=False;RetryMessageList=;RetryStatusCodeList=&amp;quot; &amp;#x2F;&amp;gt;"/&gt;
&lt;/Connections&gt;
&lt;Packages&gt;
&lt;Package Name="DataFlow with Connection Sample" ConstraintMode="Linear"&gt;
&lt;Tasks&gt;
    &lt;Dataflow Name="Dataflow"&gt;
    &lt;Transformations&gt;
    &lt;CustomComponent Name="JsonSource" UsesDispositions="true" ComponentTypeName="ZappySys.PowerPack.Adapter.JsonSource.JsonSource, ZappySys.PowerPack130, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502"&gt;
        &lt;CustomProperties&gt;
            &lt;CustomProperty Name="AccessMode" DataType="Int32"&gt;2&lt;/CustomProperty&gt;                              
            &lt;CustomProperty Name="UseConnection" DataType="Boolean"&gt;true&lt;/CustomProperty&gt;
        &lt;/CustomProperties&gt;
        &lt;OutputPaths&gt;
            &lt;OutputPath Name="JsonSourceOutput" ErrorRowDisposition="FailComponent" TruncationRowDisposition="FailComponent"&gt;
                &lt;ExternalColumns&gt;
                    &lt;ExternalColumn Name="url" DataType="String" Length="50" /&gt;
                &lt;/ExternalColumns&gt;                                  
                &lt;OutputColumns&gt;
                    &lt;OutputColumn Name="Url" ExternalMetadataColumnName="url" DataType="String" Length="50" /&gt;
                &lt;/OutputColumns&gt;
            &lt;/OutputPath&gt;
            &lt;OutputPath Name="Json Error Output" IsErrorOutput="true"&gt;
            &lt;OutputColumns&gt;
                &lt;OutputColumn Name="Url" /&gt;
            &lt;/OutputColumns&gt;
            &lt;/OutputPath&gt;                                  
        &lt;/OutputPaths&gt;
        &lt;Connections&gt;
        &lt;Connection Name="HTTP 1" ConnectionName="ZS-HTTP Connection" /&gt;
        &lt;/Connections&gt;                             
    &lt;/CustomComponent&gt;
    &lt;CustomComponent Name="TrashDestination" ComponentTypeName="ZappySys.PowerPack.Adapter.TrashDestination.TrashDestination, ZappySys.PowerPack130, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1903265a93eae502"&gt;
        &lt;InputPaths&gt;
            &lt;InputPath OutputPathName="JsonSource.JsonSourceOutput" Identifier="TrashInput" SsisName="TrashInput"/&gt;
        &lt;/InputPaths&gt;
    &lt;/CustomComponent&gt;
    &lt;/Transformations&gt;
...</pre>
<h2>Resources</h2>
<ul>
<li><a href="https://www.varigence.com/Documentation" target="_blank" rel="noopener">BIML documentation</a></li>
<li><a href="https://www.varigence.com/Documentation/Language/Element/AstCustomTaskNode" target="_blank" rel="noopener">CustomTask documentation</a></li>
<li><a href="https://schemas.varigence.com/Documentation/Language/Element/AstCustomComponentNode" target="_blank" rel="noopener">CustomComponent documentation</a></li>
<li><a href="https://www.varigence.com/Documentation/Language/Element/AstCustomSsisConnectionNode" target="_blank" rel="noopener">CustomSsisConnection documentation</a></li>
</ul>
<h2>Download sample BIMLs</h2>
<ul>
<li><a href="//zappysys.com/blog/wp-content/uploads/2017/09/Sample-BIML-with-PowerPack-components-inside-DataFlow.zip" target="_blank" rel="noopener">Sample BIML with PowerPack DataFlow Components</a></li>
<li><a href="//zappysys.com/blog/wp-content/uploads/2017/09/Sample-BIML-with-PowerPack-components-inside-DataFlow-with-connection.zip" target="_blank" rel="noopener">Sample BIML with PowerPack DataFlow Components with Connection</a></li>
<li><a href="//zappysys.com/blog/wp-content/uploads/2017/09/Sample-BIML-with-PowerPack-Task.zip" target="_blank" rel="noopener">Sample BIML with PowerPack Task</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/how-to-use-biml-script-to-create-biml-custom-task-or-component/">How to create BIML custom task or component</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
