2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【仕様変更対応】Azure Data Factory or Azure Synapse のパイプラインでローカルファイルシステムにアクセスする方法

Posted at

はじめに

検証準備として、セルフホステッド統合ランタイムでローカルファイルをアップしようとしていたところうまくいかず、サポート利用して確認したところ最新のセルフホステッド統合ランタイムでは追加の設定が必要であることがわかったため、共有します。

仕様内容内容

からダウンロードできるリリースノートに以下のような記載があります。

5.23.8355.1
What’s new

Azure Data Factory: introduce a new security control for the Self-hosted Integration Runtime (SHIR) admin that lets them allow or disallow local SHIR file system access through File system connector.

SHIR admins can use the local command line (dmgcmd.exe -DisableLocalFolderPathValidation/-EnableLocalFolderPathValidation) to disallow or allow. Refer here to learn more.

Note: We have changed the default setting to disallow local SHIR file system access from SHIR versions (>= 5.22.8297.1). Using the above command line, you should explicitly opt-out the security control and allow local SHIR file system if needed.

要約すると、「version 5.22.8297.1 以降、既定ではローカルファイルシステムへのアクセスを禁止されたけれど、version 5.23.8355.1 で追加したコマンドラインから許可設定を変更可能」とのことでした。(随分長いこと気づかなかったな)

手順

dmgcmd.exe を実行することで、設定を変更します。

準備

  1. UI を使用してセルフホステッド IR を作成するを参考に、セルフホステッド統合ランタイムをインストールします。

2023-02-21-08-01-52.png

2.インストール後、ファイルシステムのリンクサービスを作成します。

2023-02-21-07-57-26.png

3.セルフホステッド統合ランタイムをインストールしたマシンのローカルパスを入力して、テスト接続が失敗することを確認します。

2023-02-21-08-13-45.png

統合ランタイムがセルフホステッド統合ランタイムとなっているよう注意しましょう。

ちなみに今回は検証用に、ローカル管理者ユーザーを作成しています。ドメインユーザーで検証する際は {ドメイン名} \ {ユーザー名} でリンクサービスを設定しましょう。

2023-02-21-08-03-18.png

ローカルドライバーへのアクセスを許可する

  1. まずは、dmgcmd.exeの場所を確認します。通常は C:\Program Files\Microsoft Integration Runtime\ {version}\Shared\ フォルダーに置かれます。

2023-02-21-08-09-34.png

2.Power Shell を管理者実行して、目的のパスまで移動します。


cd 'C:\Program Files\Microsoft Integration Runtime\5.0\Shared\'

3.セキュリティ検証を無効にして、ローカル コンピューターのファイル システムへのアクセスを有効にします。


.\dmgcmd.exe -DisableLocalFolderPathValidation

2023-02-21-08-15-14.png

4.Azure 側で再度テスト接続し、成功を確認します。

2023-02-21-08-15-43.png

これでローカルファイルにアクセス可能になりました。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?