Introduction In this post you will learn how to use MongoDB ExecuteSQL Task for SSIS to insert multiple documents into MongoDB collection using SSIS. This task can be used to perform any DDL or DML operations for MongoDB natively inside SSIS without using any command line utilities. It gives you flexibility and security of SSIS. […]
Category Archives: SSIS PowerPack
Calling SOAP Web Service in SSIS (XML Source)
Introduction In this article, you will learn how to call SOAP Web Service in SSIS. We will use drag and drop approach to consume SOAP Webservice using SSIS XML Source Connector. This same XML Connector can be used to consume data from local XML Files (wild card allowed e.g. *.xml) or you can consume XML stored in […]
How to add / remove MongoDB User in SSIS
Introduction In this blog post, you will learn how to call MongoDB Shell Commands from SSIS using MongoDB ExecuteSQL task Some of the use cases of calling MongoDB shell commands are listed here. How to call MongoDB Shell Commands in SSIS Download and install SSIS PowerPack from here From toolbox of SSIS designer drag ZS […]
REST API File Upload using SSIS (Multi Part POST)
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 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 […]
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 […]
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 […]