Data Transmission Service (DTS) は、ストリーミングデータをクレンジングおよび変換するための抽出・変換・書き出し (ETL) 機能を提供し、必要なデータを正確かつ効率的に取得するのに役立ちます。このトピックでは、視覚的なドラッグアンドドロップの有向非巡回グラフ (DAG) モードを使用して ETL タスクを設定する方法について説明します。
背景情報
この機能は非推奨になりつつあり、以前に使用したことのあるユーザーのみ無料で利用できます。新規ユーザーはこの機能にアクセスできなくなりました。データ同期またはデータ移行インスタンス内で ETL タスクを設定することを推奨します。詳細については、「DTS データ移行または同期タスクでの ETL タスクの設定」をご参照ください。
ETL タスクを設定する前に、次の情報にご注意ください。
入力/ディメンションテーブル は、ETL タスクのソースデータベースです。
出力は、処理済みデータを受け取るターゲットデータベースです。
d="e94595fc4703u">出力は、処理済みデータを受け取るターゲットデータベースです。 処理済みデータを受け取るデータベースです。
DTS は、ソースデータベースとターゲットデータベースの間に変換コンポーネントを追加できるストリーミング ETL 機能を提供します。これらのコンポーネントはさまざまな変換を実行し、処理されたデータをリアルタイムでターゲットデータベースに書き込みます。たとえば、2 つのストリームテーブルを結合してワイドテーブルにし、そのデータをターゲットデータベースに書き込むことができます。また、ソーステーブルにフィールドを追加し、関数を使用して値を割り当て、変換されたフィールドをターゲットデータベースに書き込むこともできます。
arious transformations and write the processed data to the destination database in real time. For example, you can join two stream tables into a wide table and write its data to the destination database. You can also add a field to a source table, assign it a value using a function, and then write the transformed field to the destination database.
前提条件
ETL タスクは、中国 (杭州)、中国 (上海)、中国 (青島)、中国 (北京)、中国 (張家口)、中国 (深セン)、中国 (広州)、中国 (香港) のリージョンでのみ作成できます。
(Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Shenzhen), China (Guangzhou), and China (Hong Kong).
ソースデータベースは、MySQL、PolarDB for MySQL、Oracle、PostgreSQL、DB2 for iSeries (AS/400)、DB2 for LUW、PolarDB-X (旧 DRDS)、PolarDB for PostgreSQL、MariaDB、PolarDB for Oracle、SQL Server、または PolarDB-X 2.0 のいずれかのタイプである必要があります。
s_dita_dts_web.dita#dts_web/dts.common.item.dbtype.polardbx20">.
ターゲットデータベースは、MySQL、PolarDB for MySQL、Oracle、AnalyticDB for MySQL V3.0、PolarDB for PostgreSQL、PostgreSQL、DB2 for LUW、DB2 for iSeries (AS/400)、AnalyticDB for PostgreSQL、SQL Server、MariaDB、PolarDB-X (旧 DRDS)、PolarDB for Oracle、またはTablestoreのいずれかである必要があります。
f="mcms_dita_dts_web.dita#dts_web/dts.common.item.dbtype.tablestore">.
ETL 機能はスキーマ移行をサポートしていません。変換ロジックに基づいて、ターゲットデータベースに必要なテーブルスキーマを作成する必要があります。たとえば、テーブル A にフィールド 1、フィールド 2、フィールド 3 が含まれ、テーブル B にフィールド 2、フィールド 3、フィールド 4 が含まれ、これら 2 つのテーブルを結合してフィールド 2 とフィールド 3 を含む新しいテーブルを出力する場合、まずターゲットデータベースにフィールド 2 とフィールド 3 を含むターゲットテーブル (テーブル C など) を作成する必要があります。
ation logic. For example, if Table A contains Field 1, Field 2, and Field 3, and Table B contains Field 2, Field 3, and Field 4, and you join the two tables to output a new table that contains Field 2 and Field 3, you must first create a target table, such as Table C, in the destination database containing Field 2 and Field 3.
ETL 機能は増分データのリアルタイム変換のみをサポートし、完全なデータ同期はサポートしていません。
sformation of incremental data only and does not support full data synchronization.
注意事項
すべてのソースデータベースとターゲットデータベースは、同じリージョンにある必要があります。
and the destination database must be in the same region.
すべての ストリームテーブル は、同じインスタンスに属している必要があります。
g to the same instance.
データベース名とテーブル名は一意である必要があります。
le names must be unique.
変換コンポーネントには次の制限があります:
テーブル結合: 2つのテーブル間の結合操作のみをサポートします。
フィールド計算ツールとテーブルレコードフィルター: 単一のテーブルスキーマのみをサポートします。
lator"> and テーブルレコードフィルター: Support only a single table schema. only a single table schema.
設定プロセス

ETL を実装するには、1 つ以上のソースデータベース、必要な変換コンポーネント、および書き込み先のターゲットデータベースを選択できます。次の表に、ETL タスクの作成方法を示します。
タスク | 説明 | 参照 |
ソースデータベースの設定 | 入力/ディメンションテーブル セクションから 1 つ以上のデータ型を選択します。各ソースデータベースについて、次の項目を設定します。 説明 同じデータ型を複数回選択できます。
| |
変換コンポーネントの設定 | 変換 セクションから 1 つ以上のコンポーネントを選択します。各変換コンポーネントについて、以下を設定します。 説明 同じ変換コンポーネントを複数回選択できます。
| |
ターゲットデータベースの設定 | 出力 セクションからターゲットデータベースのタイプを選択し、以下を設定します。
|
操作手順
ETL タスクリストページに移動します。
左側のナビゲーションウィンドウで、ETLをクリックします。
8">
In the left-side navigation pane, click ETL.
b/dts.common.etl.etl">.
左上隅で、
をクリックします。データフローの作成 ダイアログボックスで、データフロー名 フィールドに ETL タスクの名前を入力し、開発方法 で DAG を選択します。
"mcms_dita_dts_web.dita#dts_web/development.mode">, select DAG.
確認 をクリックします。
ETL タスクを設定します。
ETL タスクを作成します。
次に示すプロシージャは、入力/ディメンションテーブル が MySQL で、変換 が フィールド計算ツール で、出力 が MySQL である ETL タスクの例です。
この例では、入力/ディメンションテーブル (MySQL) ノード、フィールド計算ツール ノード、および 出力 (MySQL) ノードを使用します。
1 つ以上のソースデータベースを選択できます。同じタイプのソースデータベースを複数回選択できます。
1 つ以上の変換コンポーネントを選択できます。同じ変換コンポーネントを複数回選択できます。
ターゲットデータベースは 1 つだけ選択できます。
左側のコンポーネントパネルから、入力/ディメンションテーブル (MySQL) ノードを右側のキャンバスにドラッグします。
キャンバス上の Input/Dimension Table MySQL-1 ノードをクリックします。ノード設定、フィールド情報、時間属性を順に設定します。詳細については、「ソースデータベースの設定」をご参照ください。
左側のコンポーネントパネルから、フィールド計算ツール ノードを右側のキャンバスにドラッグします。
Input/Dimension Table MySQL-1 ソースノードにカーソルを合わせ、ドットをクリックして接続線をドラッグし、Input/Dimension Table MySQL -1 ノードと Field Calculator-1 ノードを接続します。
キャンバス上の Field Calculator-1 ノードをクリックします。ノード設定とフィールド情報を順に設定します。詳細については、「変換コンポーネントの設定」をご参照ください。
左側のコンポーネントパネルから、Output MySQL-1 ノードを右側のキャンバスにドラッグします。
Field Calculator-1 ノードにカーソルを合わせ、ドットをクリックして接続線をドラッグし、Field Calculator-1 ノードと Output MySQL-1 ターゲットノードを接続します。
Output MySQL-1 ページで、ノード設定とフィールドマッピング情報を順に設定します。詳細については、「ターゲットデータベースの設定」をご参照ください。
構成を完了したら、Flink SQL 検証の生成 または 公開 をクリックします。
Flink SQL 検証の生成: 検証に成功すると、ページの上部に Flink SQL の検証に成功しました。 というメッセージが表示されます。検証に失敗した場合は、Flink SQL 検証の生成 ボタンの横にある ETL 検証の詳細を表示する をクリックします。詳細に基づいて問題を修正し、Flink SQL 検証を再度実行します。
公開: システムはまず Flink SQL 検証を実行します。事前チェックは、この検証が成功した後にのみ開始できます。ETL 検証の詳細を表示する をクリックすると、検証の詳細を表示できます。
Flink SQL の検証が完了したら、事前チェック を実行します。タスクは、開始前に事前チェックに合格する必要があります。事前チェックに失敗した場合は、失敗した項目の 詳細を表示 をクリックします。詳細に基づいて問題を修正し、再度事前チェックを実行します。
事前チェックが完了したら、ページ下部にある 次:インスタンスの購入 をクリックします。
購入 ページで、インスタンスクラス と コンピューティングユニット (CU) の数を選択します。 次に、Data Transmission Service (従量課金) サービス利用規約とパブリックプレビューのサービス利用規約を読み、チェックボックスを選択します。
購入して起動 をクリックして ETL タスクを開始します。
ETL タスク一覧ページに戻ると、タスクの タスクのステータス を確認できます。
conref="mcms_dita_dts_web.dita#dts_web/etl.Flink.check"> button. Fix the issues based on the details and run the Flink SQL validation again.
公開: The system first runs a Flink SQL validation, which must succeed before a precheck can start. You can click ETL 検証の詳細を表示する to view the validation details.
lculator-1 node on the canvas. Configure the node settings and field information in sequence. For more information, see Configure transformation components. a-node="2896764" baseurl="t2070132_v2_1_2.dita" data-tag="xref" id="xref_szk_xvo_uho" href="t2070130.dita#task_2070130">Configure transformation components.
From the component panel on the left, drag an Output MySQL-1 node to the canvas on the right.
Output MySQL-1 node to the canvas on the right.
Hover over the Field Calculator-1 node, and then click the dot and drag a connection line to connect the Field Calculator-1 node and the Output MySQL-1 destination node.
then click the dot and drag a connection line to connect the Field Calculator-1 node and the Output MySQL-1 destination node.
On the Output MySQL-1 page, configure the node settings and field mapping information in sequence. For more information, see Configure the destination database.
5" baseurl="t2070132_v2_1_2.dita" data-tag="xref" id="xref_uls_otx_t2b" href="t2070131.dita#task_2070131">Configure the destination database.
After you complete the configuration, click Flink SQL 検証の生成 or 公開.
Flink SQL 検証の生成: If the validation succeeds, a Flink SQL の検証に成功しました。 message appears at the top of the page. If the validation fails, click ETL 検証の詳細を表示する next to the Flink SQL 検証の生成 button. Fix the issues based on the details and run the Flink SQL validation again.
公開: The system first runs a Flink SQL validation, which must succeed before a precheck can start. You can click ETL 検証の詳細を表示する to view the validation details.
公開: The system first runs a Flink SQL validation, which must succeed before a precheck can start. You can click ETL 検証の詳細を表示する to view the validation details.
_dts_web.dita#dts_web/etl.checkDetails"> to view the validation details.
After the Flink SQL validation is complete, run a 事前チェック. The task must pass the precheck before it can start. If the precheck fails, click 詳細を表示 for the failed item. Fix the issue based on the details and run the precheck again.
ta#dts_web/dts.task.operation.view.detail"> for the failed item. Fix the issue based on the details and run the precheck again.
After the precheck is complete, click 次:インスタンスの購入 at the bottom of the page.
to.buy"> at the bottom of the page.
On the 購入 page, select an インスタンスクラス and the number of Compute Units (CUs). Then, read and select the Data Transmission Service (Pay-as-you-go) Service Terms and Service Terms for Public Preview checkboxes.
nb">Compute Units (CUs). Then, read and select the Data Transmission Service (Pay-as-you-go) Service Terms and Service Terms for Public Preview checkboxes.
Click 購入して起動 to start the ETL task.
You can return to the ETL task list page to view the task タスクのステータス.
s_web.dita#dts_web/dts.common.info.status">.