> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sync.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure Data Lake Storage

CData Sync アプリケーションからAzure Data Lake Storage コネクタを使用して、サポートされている任意のデータソースから同期先のAzure Data Lake Storage へデータを移動できます。これを行うには、コネクタを追加し、コネクタへの認証を行い、接続を完了する必要があります。

## LakeBridge Connector for Delta Parquet and Apache Iceberg

**Delta Parquet** および**Apache Iceberg** ファイル形式には、LakeBridge コネクタが必要です。Azure Data Lake Storage 同期先をこれらのいずれかのファイル形式で構成する前に、Sync にLakeBridge コネクタをインストールしてください。

Sync は、起動時に、ローカルマシン上でLakeBridge サーバーをバックグラウンドサービスとして起動します。Delta Parquet またはApache Iceberg のジョブが実行されると、LakeBridge サーバーはそのジョブ専用のSpark JVM を起動し、ジョブの終了後にシャットダウンします。これにより、各ジョブのメモリが分離され、独立したSpark セッションで複数のジョブを並列に実行できます。

デフォルトでは、最大3つのLakeBridge ジョブを同時に実行できます。この上限は、**システム設定** > **高度な設定** > **その他の設定**の`MaxConcurrentLakeBridgeJobs` 設定で変更できます。詳細については、[メモリ管理](https://docs.sync.cdata.com/26.4/ja/getting-started/installation-and-configuration/memory-management.md)を参照してください。

LakeBridge コネクタをインストールするには：

<ol>
  <li>Sync で、**接続**に移動します。</li>

  <li>
    Azure Data Lake Storage の行の末尾にある\*\*... > コネクタをアップデート\*\*を選択します。

    > [!NOTE]
    >
    > この手順を完了する前に、Azure Data Lake Storage コネクタを追加する必要があります。手順については、以下の「Azure Data Lake Storage コネクタを追加」を参照してください。
  </li>

  <li>**コネクタをアップデート**ダイアログで**新しいバージョンを追加**を選択します。</li>
  <li>CData Sync サポートチームから提供された`lakebridge.zip` ファイルをアップロードします。</li>
  <li>**更新**をクリックします。</li>
</ol>

新しいバージョンのLakeBridge コネクタをインストールすると、LakeBridge サーバーが停止し、次回のジョブ実行時に自動的に再起動します。Sync の再起動は不要です。

## Microsoft Windows Prerequisites for Delta Parquet

Microsoft Windows オペレーティングシステム（OS）でAzure Data Lake Storage 同期先を**Delta Parquet** ファイル形式で設定する前に、お使いの環境が以下で説明する要件を満たしていることを確認してください。これらの前提条件により、Sync がWindows 環境下で必要なHadoop バイナリを検出し、Delta Lake と正しく連携できるようになります。

以下のようにWindows OS を設定します：

<ul><li>Hadoop バイナリをダウンロードします（推奨バージョン：2.8.1 以降）。</li>
<li>`HADOOP_HOME` 環境変数がHadoop のインストールディレクトリを指すようにします。</li>
<li>`%HADOOP_HOME%\bin` が`PATH` システム変数に含まれていることを確認します（具体的には、`%HADOOP_HOME%\bin\winutils.exe` にアクセスできる必要があります）。</li></ul>

この設定が必要な理由は、Delta Lake（Spark 上）がHadoop のファイルシステムAPI を使用して、ローカルストレージ、Hadoop 分散ファイルシステム（HDFS）、およびAzure Data Lake Storage のようなクラウドオブジェクトストアにアクセスするためです。Windows 環境下では、Spark が正しく機能するために、Hadoop バイナリ（winutils.exe やその他のネイティブライブラリを含む）を検出できる必要があります。この設定を行わないと、Delta テーブルへの書き込み、チェックポイントの管理、クラウドストレージへのアクセスなどの操作が、権限エラーやファイルシステムエラーで失敗することがあります。

## Supported File Formats

When Sync writes data to Azure Data Lake Storage, you can choose the file format for the exported data. The following file formats are supported for the Azure Data Lake Storage destination:

* (Default) **Delta Parquet：** A format that uses a Delta Lake storage layer on top of the Parquet file format that is used by Sync to support delta processing. *Delta processing* is a method where, after your initial job run, only new or modified files are written or read in subsequent runs, which can reduce job times and resource use.

  **Limitations:**

  * **Naming restrictions:** Table and column names cannot include special characters or reserved SQL and Delta Lake keywords. Examples of special characters include spaces, commas, semicolons, braces, parentheses, equal signs, and the newline (`\n`) and tab (`\t`) characters.
  * **Primary keys:** Primary key constraints are not supported. Sync uses the source primary keys for incremental replication.
  * **Data types:** Unlike traditional databases, Delta Lake does not support column-size definitions (for example, `VARCHAR(100)`). It supports only a fixed set of data types and allows type widening when necessary.
  * **Schema changes:** The ALTER TABLE command supports only adding new columns. Changing the data type of an existing column (for example, from INT to VARCHAR) is not supported.
  * **Delete operations:** In standard jobs, both hard and soft deletions are supported. In CDC and enhanced CDC jobs, only soft deletions are supported.
* **Apache Iceberg：** A high-performance table format that supports atomicity, consistency, isolation, and durability (ACID) transactions and schema evolution.
* **CSV：** Plain text comma-separated values.
* **Avro：** A row-based binary format that supports schema evolution.
* **Parquet：** A columnar storage format that is optimized for analytics.

## Azure Data Lake Storage コネクタを追加

Sync でAzure Data Lake Storage のデータを使用できるようにするには、まず以下の手順でコネクタを追加する必要があります：

<ol>
  <li>Sync のダッシュボードから**接続**ページを開きます。</li>
  <li>**接続を追加**をクリックして**コネクタを選択**ページを開きます。</li>
  <li>**同期先**タブをクリックして
  **Azure Data Lake Storage** 行に移動します。</li>

  <li>
    行末にある**接続を設定**アイコンをクリックして、**新しい接続**ページを開きます。この操作により、
    **接続を追加**ダイアログボックスが開きます。

    **Note：** **接続を設定**アイコンが表示されない場合は、**コネクタをダウンロード**アイコンをクリックして Azure Data Lake Storage コネクタをインストールしてください。
  </li>

  <li>**接続を追加**ダイアログボックスに接続名を入力します。</li>
  <li>**追加**をクリックして、コネクタの**設定**タブを開きます。</li>
</ol>

新しいコネクタのインストールについての詳細は、
[接続](https://docs.sync.cdata.com/26.4/ja/connections/connections.md)を参照してください。

## Azure Data Lake Storage への認証

After you add the connector, you need to set the required properties.

* **File Format:** Select the file format that you want to use: **Delta Parquet**, **Apache Iceberg** (default), **CSV**, **Avro**, or **Parquet**.
* **URI:** Enter the path of the file system and folder that contains your files (for example, `abfss://MyFileSystem/FolderName`).
* **Azure Storage Account:** Enter the name of your Azure storage account.

CData Sync supports authenticating to Azure Data Lake Storage in several ways. Select your authentication method below to proceed to the relevant section that contains the authentication details.

* [**Azure Active Directory**](#azure-active-directory) (default)
* [**Azure Managed Service Identity**](#azure-managed-service-identity)
* [**Azure Service Principal**](#azure-service-principal)
* [**Azure Service Principal Certificate**](#azure-service-principal-certificate)
* [**Access Key**](#access-key)
* [**Azure Storage SAS**](#azure-shared-access-signature)

**Note:** The full list of authentication methods above are for all file formats except **Delta Parquet**. That format uses only the **Access Key** method.

### Azure Active Directory

To connect with an Azure Active Directory (AD) user account, specify the following properties:

* **Auth Scheme:** Select **AzureAD**.
* **Use Lake Formation:** Select whether you want the AWS Lake Formation service to retrieve temporary credentials. These temporary credentials enforce access policies against the user based on the configured IAM role. You can use this service when you authenticate through AzureAD, Okta, ADFS, and PingFederate, while providing a Security Assertion Markup Language (SAML) assertion. By default, the **Enable** checkbox is not selected.

### Azure Managed Service Identity

Azure 仮想マシン上でCData Sync が実行されている場合にAzure マネージドサービスID（MSI）を利用するには、**Auth Scheme** で**Azure MSI** を選択します。追加のプロパティは必要ありません。

### Azure Service Principal

Azure サービスプリンシパルとクライアントシークレットで接続するには、次のプロパティを設定します：

<ul><li>\*\*Auth Scheme：\*\***AzureServicePrincipal** を選択。</li>
<li>\*\*Azure Tenant：\*\*接続するMicrosoft Online テナントを入力。</li>
<li>\*\*OAuth Client Id：\*\*OAuth 認証サーバーにアプリケーションを登録した際に割り当てられたクライアントId を入力。</li>
<li>\*\*OAuth Client Secret：\*\*OAuth 認証サーバーにアプリケーションを登録した際に割り当てられたクライアントシークレットを入力。</li>
<li>（オプション）\*\*Scope：\*\*アプリケーションへのアクセス範囲を入力。</li>
<li>（オプション）\*\*OAuth Authorization URL：\*\*OAuth サービスのOAuth 認可URL を入力。</li>
<li>（オプション）\*\*OAuth Access Token URL：\*\*アクセストークンを取得するURL を入力。</li>
<li>（オプション）\*\*OAuth Refresh Token URL：\*\*OAuth トークンを更新するURL を入力。</li></ul>

アプリケーションのOAuth クライアントId およびクライアントシークレットを取得するには：

<ol><li>[Azure ポータル](https://portal.azure.com)にログインします。</li>
<li>左ナビゲーションペインで**すべてのサービス**を選択します。次に**アプリの登録**を検索し選択します。</li>
<li>**新規登録**をクリックします。</li>
<li>アプリケーションの名前を入力して**任意のAzure AD ディレクトリ - マルチテナント**を選択します。</li>
<li>アプリケーションを作成したら、**概要**セクションに表示されるアプリケーション (クライアント) ID の値をコピーします。この値をOAuth クライアントId として使用します。</li>
<li>**証明書とシークレット**セクションに移動して、アプリケーションの**新しいクライアント シークレット**を選択します。</li>
<li>有効期間を指定してクライアントシークレットを保存します。保存するとキーの値が表示されます。</li>
<li>値は一度しか表示されないので、コピーしておきます。この値をOAuth クライアントシークレットとして使用します。</li>
<li>**認証**タブで、必ず**アクセストークン (暗黙的なフローに使用)** を選択します。</li></ol>

### Azure Service Principal Certificate

Azure サービスプリンシパルとクライアント証明書で接続するには、次のプロパティを設定します：

<ul><li>\*\*Auth Scheme：\*\***AzureServicePrincipalCert** を選択。</li>
<li>\*\*Azure Tenant：\*\*接続するMicrosoft Online テナントを入力。</li>
<li>\*\*OAuth JWT Cert：\*\*Java web token（JWT）証明書ストアを入力。</li>
<li>**OAuth JWT Cert Type：**JWT 証明書を格納するキーストアの種類を入力。デフォルトの種類は**PEMKEY\_BLOB** です。</li>
<li>\*\*OAuth Client Id：\*\*OAuth 認証サーバーにアプリケーションを登録した際に割り当てられたクライアントId を入力。</li>
<li>（オプション）\*\*Scope：\*\*アプリケーションへのアクセス範囲を入力。</li>
<li>（オプション）\*\*OAuth Authorization URL：\*\*OAuth サービスのOAuth 認可URL を入力。</li>
<li>（オプション）\*\*OAuth Access Token URL：\*\*アクセストークンを取得するURL を入力。</li>
<li>（オプション）\*\*OAuth Refresh Token URL：\*\*OAuth トークンを更新するURL を入力。</li>
<li>（オプション）\*\*OAuth JWT Cert Password：\*\*OAuth JWT 証明書のパスワードを入力。</li>
<li>（オプション）\*\*OAuth JWT Cert Subject：\*\*OAuth JWT 証明書のサブジェクトを入力。</li></ul>

アプリケーションのOAuth 証明書を取得するには：

<ol><li>[Azure ポータル](https://portal.azure.com)にログインします。</li>
<li>左ナビゲーションペインで**すべてのサービス**を選択します。次に**アプリの登録**を検索し選択します。</li>
<li>**新規登録**をクリックします。</li>
<li>アプリケーションの名前を入力して**任意のAzure AD ディレクトリ - マルチテナント**を選択します。</li>
<li>アプリケーションを作成したら、**概要**セクションに表示されるアプリケーション (クライアント) ID の値をコピーします。この値をOAuth クライアントId として使用します。</li>
<li>**証明書とシークレット**セクションに移動して**証明書のアップロード**を選択します。次に、ローカルマシンからアップロードする証明書を選択します。</li>
<li>有効期間を指定してクライアントシークレットを保存します。保存するとキーの値が表示されます。</li>
<li>値は一度しか表示されないので、コピーしておきます。この値をOAuth クライアントシークレットとして使用します。</li>
<li>**認証**タブで、必ず**アクセストークン (暗黙的なフローに使用)** を選択します。</li></ol>

### Azure Access Key

Azure のアクセスキーで接続するには、次のプロパティを設定します：

<ul><li>\*\*Auth Scheme：\*\***Access Key** を選択。</li>
<li>\*\*Azure Access Key：\*\*ストレージアカウントに関連付けられているアクセスキーを入力。</li></ul>

アクセスキーを取得するには：

<ol><li>[Azure ポータル](https://portal.azure.com/)にルートアカウントの資格情報を使用してサインインします。</li>
<li>**ストレージ アカウント**をクリックして、使用するストレージアカウントを選択します。</li>
<li>**設定**の**アクセス キー**をクリックします。ページ上にストレージ アカウント名とキーが表示されます。</li></ol>

### Azure Shared Access Signature

Azure の共有アクセス署名で接続するには、次のプロパティを設定します：

<ul><li>\*\*Auth Scheme：\*\***AzureStorageSAS** を選択。</li>
<li>\*\*Azure Shared Access Signature：\*\*ストレージアカウントに関連付けられている共有アクセス署名を入力。</li></ul>

Azure 共有アクセス署名を作成するには：

<ol><li>[Azure ポータル](https://portal.azure.com)にルートアカウントの資格情報を使用してサインインします。</li>
<li>**ストレージ アカウント**をクリックして、使用するストレージアカウントを選択します。</li>
<li>**設定**の**Shared Access Signature** をクリックします。</li>
<li>アクセスポリシーとトークンの有効期限を設定します。</li>
<li>**SAS の生成**をクリックし、生成されたトークンをコピーします。</li></ol>

## 接続を完了する

To complete your connection:

1. Specify the following properties:

   **For the Delta Parquet and CSV file formats:**

   * **FMT:** Enter the format that you want to use to parse all text files. The default format is **CsvDelimited**.
   * **Aggregate Files:** Select whether you want to aggregate all the files that are located in the URI directory and that have the same schema into a single table named AggregatedFiles. By default, the **Enable** checkbox is not selected.
   * **Include Column Headers:** Select whether you want to obtain column headers from the first lines of the specified files. By default, the **Enable** checkbox is already selected.

   **For the Avro and Parquet file formats:**

   * **Data Model:** Select the data model that you want to use to parse documents for your format and to generate the database metadata. The default data model is **Document**.
   * **Aggregate Files:** Select whether you want to aggregate all the files that are located in the URI directory and that have the same schema into a single table named AggregatedFiles. By default, the **Enable** checkbox is not selected.

<ol start="2"><li>**Advanced** タブで詳細な接続設定を定義します。（ただし、ほとんどの場合、これらの設定は不要です。）</li>
<li>AzureAD で認証する場合は、**Azure Data Lake Storage への接続**をクリックして Azure Data Lake Storage アカウントに接続します。</li>
<li>**作成およびテスト**をクリックして接続を作成します。</li></ol>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.