SSIS Components for Redis

Build 24.0.8963

変換先コンポーネントの使用

データソースへの接続の確立 後、CData Redis 変換先コンポーネントをワークフローに追加してRedis にデータをロードします。

データフローのRedis への書き込み

下記の手順に従って、Redis に接続しデータを更新します。

  1. SSIS ツールボックスで、CData Redis 変換先コンポーネントをデータフロータスクにドラッグします。
  2. 変換元コンポーネントの出力をCData Redis 変換先コンポーネントに接続します。
  3. CData Redis 変換先コンポーネントをダブルクリックします。CData Redis 変換先エディターダイアログが開きます。
  4. Connection Manager メニューで、有効なCData Redis 接続マネージャーを選択するか、利用可能な接続マネージャーがまだない場合は新規作成します。
  5. Use a Table を更新したいテーブルに設定します。
  6. Action をデータ操作アクションに設定します。各アクションの詳細については、次の説明を参照してください。
  7. Columns タブを選択し、上記ステップ5で指定したテーブルで利用可能なカラムを検出します。
  8. Mappings タブで、変換元から変換先へのマッピングを構成します。詳細については、次の説明を参照してください。

カラムの設定

You can edit the name, data types, length, precision, and scale of your destination columns in the Destination component's Columns tab.

Select a property in the list to edit it. You can also add, reorder, and remove columns using the buttons near the bottom of the interface.

If you want to revert any changes you have made to the columns to their defaults, click Refresh. Note that this will also delete any new columns you have added.

Column Mapping

In the Destination component's Mappings tab, you can map columns from the output of the inbound source component to columns in the table specified in the destination component.

Note: Opening the Columns tab retrieves metadata for the selected destination table. You must select this tab before columns will appear in the Mappings tab.

The Mappings tab is broken up into two tabs: TableView and DiagramView.

TableView

The TableView tab represents column mappings as a table with the following columns. It displays extra information not visible on the DiagramView tab.

  • Available Input Columns: Select a column from the input columns to map to a destination column.
    • If you opened the Columns tab before opening the Mappings tab for the first time, the input columns are autopopulated.
  • Available Destination Columns: Displays the column from the destination columns that the input column maps to.
  • Data Type: Displays the data type of the destination column.
  • Column Size: Displays the column size of the destination column.
  • Mapped: Toggles whether the current mapping is active.

You can also filter the displayed columns using the Filter box and the Read-only columns, Mapped columns, and Unmapped columns checkboxes at the top of the tab.

DiagramView

The DiagramView tab provides a visual representation of the column mappings.

Drag an input column's name from the Available Input Columns box to a column in the Available Destination Columns box to create a mapping. Each active mapping is represented by a line between the input column name and destination column name.

コマンド実行

データフローを実行すると、本製品 は次のいずれかの処理を実行して変換先のテーブルを更新します。

Insert

コンポーネントは、マッピングされた値を受け取り、データをテーブルに新しい行として挿入します。変換先コンポーネントのプロパティでOutputKey プロパティをTrue に設定すると、Redirect row エラー動作を使用してコンポーネントのエラー出力に挿入された結果を取得することができます。

Update

コンポーネントは、提供された主キーに基づいて既存の行を更新します。主キーカラムはマッピングする必要があります。また、主キーカラムをnull にすることはできません。変換先コンポーネントのプロパティでOutputKey プロパティをTrue に設定すると、Redirect row エラー動作を使用してコンポーネントのエラー出力に更新された結果を取得することができます。

Upsert

コンポーネントは、主キーを使用して、行を挿入するか更新するかを判断します。主キーカラムがマッピングされ、null ではない場合、コンポーネントは、提供された主キーに基づいて既存の行を更新します。主キーカラムがマッピングされていないか、null の場合、CData Redis 変換先コンポーネントは、データを新しい行として挿入します。変換先コンポーネントのプロパティでOutputKey プロパティをTrue に設定すると、Redirect row エラー動作を使用してコンポーネントのエラー出力にupsert された結果を取得することができます。

Delete

コンポーネントは、提供された主キーに基づいて、既存の行を削除します。主キーカラムはマッピングする必要があります。また、主キーカラムをnull にすることはできません。

バルク操作

デフォルトでは、変換先コンポーネントはバルク操作を使ってデータソースを更新します。この動作は、変換先コンポーネントのプロパティペインにあるBatchMode およびBatchSize プロパティで制御されます。BatchSize は、コンポーネントに一度に送信するバッチの最大サイズを制御します。送信されるデータの量に応じてBatchSize を大きくするとスループットは向上しますが、より大きなメモリを使用します。

BatchMode およびBatchSize に加えて、データフロータスクのプロパティペインには、グローバルな最大サイズを定義するプロパティとして、DefaultBufferMaxRows およびDefaultBufferSize があります。これらのプロパティのデフォルト値は非常に低いため、非常に大きな書き込み操作を行う場合に最高のパフォーマンスを得るためには、これらの値を大きくする必要があります。

SSIS はデフォルトで自身のバッファーサイズを10MB に、最大行数を10k 行に制限しています。バイト数に制限があるため、SSIS が奇数行を変換先に送信し、行数から想定したとおりの数値にならない場合があります。

バッファープロパティの調整について詳しくは、 Improve Data Flow Performance with SSIS AutoAdjustBufferSize を参照してください。

DefaultBufferMaxRows は、変換先コンポーネントのバッチサイズに使用する値と一致するか、それを上回る必要がありますが、DefaultBufferSize をテストして反復し、適切な値に到達させなければならない場合があります。参考として、DefaultBufferSize の値100000000は〜100MB に相当し、これを出発点としても使用できます。

SSIS 2016+ のデータフロータスクのプロパティリストにはAutoAdjustBufferSize という別のパッケージプロパティがあり、自動的に適切なサイズを決定しますが、これは数回の反復を要し、一般に手動での反復と比較してパフォーマンスが劣るため、手動での反復をお勧めします。

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.8963