Introduction In this post you will learn how to use SSIS REST API Task to perform REST API File Upload (i.e. RESTful file upload) to web server. Typically to access REST API you may have to use programming language but in this post we will use visual drag and drop approach. File upload using HTTP/HTTPS […]
Calling Web API in SSIS with Authorization and Redirect
Introduction In some cases when you call API to http URL it may redirect you to different location (Also known as 301 or 302 redirect). Best example is when you type https://www.zappysys.com it will redirect you to https://zappysys.com. This can cause issue in some case if you are passing credentials (i.e. UserID / Password) because […]
How to count file columns in SSIS using C# Script
Here is the snippet which can be used to count total columns in your flat file. Below script assume that you have column count based on separator=comma. if you use different separator then just change script accordingly
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
public void Main() { // TODO: Add your code here var colCnt = GetFileColumns("file1",','); MessageBox.Show("Your file has total " + colCnt + " columns"); Dts.TaskResult = (int)ScriptResults.Success; } private int GetFileColumns(string connName,char colSeperator= ',') { var filePath=Dts.Connections[connName].ConnectionString; string firstline; using (System.IO.StreamReader sr = new System.IO.StreamReader(filePath)) { firstline= sr.ReadLine(); } var colArr=firstline.Split(new char[]{colSeperator}); return colArr.Length; } |
How to register Google OAuth Application (Get ClientID and ClientSecret)
Introduction In our previous article we understood little bit about OAuth 2.0 Protocol. We talked how to use Default App for ease of use. However In this post you will learn how to register Google OAuth Application so you can access various Google Services programmatically (e.g Youtube, Google Analytics, AdWords, DoubleClick etc.). Here is the […]
How to do REST API Pagination in SSIS / ODBC Drivers
Introduction In our previous blog, we saw how to call REST in SSIS including concepts of Authentication / Error Handling. Now in this post, we will cover API Pagination. You will learn concepts and patterns about REST API Pagination (for JSON / XML / SOAP or CSV API). We will describe methods and steps to implement REST API […]
How to check Amazon S3 Bucket location (Region)
Problem Sometimes if you loading data to Redshift via COPY command or using SSIS Redshift Data Transfer Task to move data to redshift then you will have to make sure your S3 Bucket is in the same region as Redshift Cluster. Many people don’t know how to verify that because its hidden in the console. This […]
SSIS – Loading data into MongoDB (Upsert, Delete, Update)
Introduction MongoDB is one of the most poplar NoSQL database out there. In this article you will learn how to use ZappySys MongoDB Destination Connector to perform various bulk operations on MongoDB such as Insert, Update, Delete and Upsert. If you wish to learn how to Update MongoDB Array items then check this blog post instread. […]
SSIS check file is locked and wait until file is unlocked (C# Script)
Introduction In this small blog post you will learn How to move files using SSIS Advanced File System Task and How to wait until file is unlocked using C# Script Task. How to check if file is locked (SSIS C# Script Task) If you want to check if file is locked in C# then below […]
Amazon Redshift data load in Informatica PowerCenter
Introduction In our previous post you learned how to load data into Redshift using SSIS. Now in this post you will learn how to load data into Redshift using Informatica PowerCenter. For PowerCenter we will use ZappyShell Command line for Redshift Data Load. This small powerful command line utility can handle load of several millions […]
Get list of files in SSIS for Looping
Introduction In this post you will learn how to use Advanced File System Task to get list of files and folders into variable. Advanced File System Task is significantly better than native SSIS File System Task How to get list of files in SSIS Most simplest way to get list of files in SSIS is […]