How to manage SSIS script component output columns and its properties programmatically

后端 未结 1 1413
悲哀的现实
悲哀的现实 2020-12-21 08:47

I am developing a source in SSIS VS 2017 which calls REST API using script Component and serialises JSON and provides records which I am storing in SQL Table. While designi

相关标签:
1条回答
  • 2020-12-21 09:27

    I totally agree with @Arthur comment, you should build the whole package programmatically. You have two approaches to create packages programatically:

    (1) Build SSIS using C#

    If you are familiar with C# you have two choices:

    (a) Using SQL Server Client SDK assemblies

    This is the official traditional way to create ssis packages programmatically, there are many link on the internet that you can refer to such as:

    • Creating a Package Programmatically
    • Samples for creating SSIS packages programmatically
    • Creating and Executing an SSIS Package Programmatically
    • Building Packages Programmatically

    (b) Using EzApi – Alternative package creation API

    EzAPI is a .NET library written in C# by Evgeny Koblov one of the testers on the SSIS team to abstracts away a lot of the cumbersome low-level coding needed to create SSIS packages XML directly in a programming language

    • GitHub - EzApi2016
    • NuGet Gallery - EzApi

    There are many link on the internet that you can refer to such as:

    • EzAPI – Alternative package creation API
    • EzAPI Overview
    • EzApi a C# library for creating SSIS packages programatically
    • Getting Started with EzAPI

    (2) Build SSIS using BIML

    If you are familiar with XML, then you should use BIML (Business Intelligence Markup Language) which is a markup language developed by Varigence and can be integrated within Visual Studio to create packages without the need of coding experience.

    • Biml Website

    There are many links that you can refer to learn BIML:

    • One Learning Path for Biml
    • Introduction to Business Intelligence Markup Language (BIML) for SSIS

    Update 1 - C# approach

    Recently i started a new project on Git-Hub, which is a class library developed using C#. You can use it to import tabular data from excel, word , powerpoint, text, csv, html, json and xml into SQL server table with a different schema definition using schema mapping approach. check it out at:

    • SchemaMapper: C# Schema mapping class library

    You can follow this Wiki page for a step-by-step guide:

    • Import data from multiple files into one SQL table step by step guide

    You can use this library to read from json and import into SQL (without changing the schema) with a few lines of code.

    0 讨论(0)
提交回复
热议问题