Export Data from SQL Server to Azure Data Lake Storage through SSIS

Easily push SQL Server data to Azure Data Lake Storage using the CData SSIS Tasks for ADLS.

古川えりか
コンテンツスペシャリスト

最終更新日:2011-07-10
azuredatalake ロゴ

CData

ssis ロゴ画像
SSIS ロゴ

こんにちは!ドライバー周りのヘルプドキュメントを担当している古川です。

SQL Server databases are commonly used to store enterprise records. It is often necessary to move this data to other locations. The CData SSIS Task for ADLS allows you to easily transfer Azure Data Lake Storage データ. In this article you will export data from SQL Server to Azure Data Lake Storage.

Add Source and Destination Components

To get started, add a new ADO.NET Source control and a new Azure Data Lake Storage Destination control to the data flow task.

The source and destination components used in this example. (Salesforce is shown.)

Configure the ADO.NET Source

Follow the steps below to specify properties required to connect to the SQL Server instance.

  1. Open the ADO.NET Source and add a new connection. Enter your server and database information here.
  2. In the Data access mode menu, select "Table or view" and select the table or view to export into Azure Data Lake Storage. The SQL Server  table to export into Azure Data Lake Storage. (Salesforce is shown.)
  3. Close the ADO NET Source wizard and connect it to the destination component.

Create a New Connection Manager for ADLS

Follow the steps below to set required connection properties in the Connection Manager.

  1. Create a new connection manager: In the Connection Manager window, right-click and then click New Connection. The Add SSIS Connection Manager dialog is displayed.
  2. Select CData ADLS Connection Manager in the menu.
  3. Configure the connection properties. A typical connection requires:
    • Schema
    • Account
    • FileSystem
    • AccessKey

    Azure DataLakeStorage 接続プロパティの取得・設定方法

    Azure DataLakeStorage Gen 1 への接続

    Gen 1 DataLakeStorage アカウントに接続するには、はじめに以下のプロパティを設定します。

    • SchemaADLSGen1 を指定。
    • Account:アカウント名に設定。
    • AzureTenant:テナントId に設定。Azure Portal 内のAzure Data Lake プロパティから取得できます。
    • Directory:(オプション)複製したファイルを格納するためのパスを設定。指定しない場合は、ルートディレクトリが使用されます。

    Azure DataLakeStorage Gen 1 への認証

    Gen 1 は、認証方法としてAzure Active Directory OAuth(AzureAD)およびマネージドサービスID(AzureMSI)をサポートしています。認証方法は、ヘルプドキュメントの「Azure DataLakeStorage Gen 1 への認証」セクションを参照してください。

    Azure DataLakeStorage Gen 2 への接続

    Gen 2 DataLakeStorage アカウントに接続するには、はじめに以下のプロパティを設定します。

    • SchemaADLSGen2 に設定。
    • Account:ストレージアカウント名に設定。
    • FileSystem:このアカウントで使用するファイルシステム名に設定。例えば、Azure Blob コンテナ名など。
    • Directory:(オプション)複製したファイルを格納するためのパスを設定。指定しない場合は、ルートディレクトリが使用されます。

    Azure DataLakeStorage Gen 2 への認証

    Gen 2は、認証方法としてアクセスキー、共有アクセス署名(SAS)、Azure Active Directory OAuth(AzureAD)、マネージドサービスID(AzureMSI)など多様な方法をサポートしています。AzureAD、AzureMSI での認証方法は、ヘルプドキュメントの「Azure DataLakeStorage Gen 2 への認証」セクションを参照してください。

    アクセスキーを使用した認証

    アクセスキーを使用して接続するには、AccessKey プロパティを取得したアクセスキーの値に、AuthScheme を「AccessKey」に設定します。

    Azure ポータルからADLS Gen2 ストレージアカウントのアクセスキーを取得できます。

    1. Azure ポータルのADLS Gen2 ストレージアカウントにアクセスします。
    2. 設定で「アクセスキー」を選択します。
    3. 利用可能なアクセスキーの1つの値を「AccessKey」接続プロパティにコピーします。

    共有アクセス署名(SAS)

    共有アクセス署名を使用して接続するには、SharedAccessSignature プロパティを接続先リソースの有効な署名に設定して、AuthScheme を「SAS」に設定します。 共有アクセス署名は、Azure Storage Explorer などのツールで生成できます。

    The Connection Manager. (Salesforce is shown.)

Configure the Azure Data Lake Storage Destination

In the destination component Connection Manager, define mappings from the SQL Server source table into the Azure Data Lake Storage destination table.

  1. Double-click the Azure Data Lake Storage destination to open the destination component editor.
  2. In the Connection Managers tab, select the connection manager previously created. The connection manager specified for the destination component. (Salesforce is shown.)
  • Specify the table into which the data will be exported: On the Component Properties tab, enter the table name in the TableName property, under the Custom Properties section. In this case, you will transfer Resources records. The table into which the data will be exported. (Salesforce is shown.)
  • On the Column Mappings tab, configure the mappings from the input columns to the destination columns. The mappings from the SQL Server source to the SSIS destination component. (Salesforce is shown.)
  • Run the Project

    You can now run the project. After the SSIS Task has finished executing, data from your SQL table will be exported to the chosen table.

    The completed export. (Salesforce is shown.)

    トライアル・お問い合わせ

    30日間無償トライアルで、CData のリアルタイムデータ連携をフルにお試しいただけます。記事や製品についてのご質問があればお気軽にお問い合わせください。