ノーコードでクラウド上のデータとの連携を実現。
詳細はこちら →Shopify定期購買アプリのデータをAzure SQL Databaseにレプリケートしてみた
はじめに
対象アプリケーション
![](https://files.cdata.com/media/media/rebfinjl/huckleberry01.png?rmode=max&width=500)
実現イメージ
![](https://files.cdata.com/media/media/0incroid/huckleberry22.png)
必要な情報
-
Shopify定期購買アプリのAPIが利用できるご契約APIキー、および、ストアURL(例:sample.myshopify.com)
- CData Sync(30日間の無償評価版あり)
- AzureのSQL Databaseの環境
手順
Shopify定期購買アプリのAPIキーとストアURLの確認
CData Syncの入手、および、インストール、初期設定
- .NET版の場合:インストール後に自動で起動
- Java版の場合: http://localhost(もしくはホスト名):8181 にブラウザからアクセス
![](https://files.cdata.com/media/media/qisbwggs/huckleberry03.png?rmode=max&width=500)
定期購買アプリの定義ファイルを入手
定期購買アプリへの接続
![](https://files.cdata.com/media/media/2utbjv0r/huckleberry04.png?rmode=max&width=500)
![](https://files.cdata.com/media/media/kv5ptmrn/huckleberry06.png?rmode=max&width=500)
![](https://files.cdata.com/media/media/rizijhqd/huckleberry07.png?rmode=max&width=500)
![](https://files.cdata.com/media/media/bxdbvnro/huckleberry08.png?rmode=max&width=500)
![](https://files.cdata.com/media/media/kfxeg5nw/huckleberry09.png?rmode=max&width=500)
shop=storeURLの値;apikey=apikeyの値;sleeptime=2;
※storeURLの値は「sample.myshopify.com」の「sample」
![](https://files.cdata.com/media/media/eblgwhqk/huckleberry10.png?rmode=max&width=500)
![](https://files.cdata.com/media/media/0ygnn3ik/huckleberry11.png?rmode=max&width=500)
SQL Databaseへの接続
![](https://files.cdata.com/media/media/gtumy3wl/huckleberry12.png?rmode=max&width=500)
- 名前:任意(例:SQLDatabase)
- Server: サーバー名(例:xxxxxxx.database.windows.net)
- Port: 接続ポート番号
- Database: データベース名
- User: ログインユーザ名
- Passowrd: ログインパスワード
![](https://files.cdata.com/media/media/g3lhxuqm/huckleberry13.png?rmode=max&width=500)
![](https://files.cdata.com/media/media/0upkfstw/huckleberry14.png?rmode=max&width=500)
ジョブの設定
![](https://files.cdata.com/media/media/bulbakh4/huckleberry15.png?rmode=max&width=500)
- ジョブ名:任意(例:huckleberry-subscription2SQLDatabase)
- データソース:[REST]
- 同期先:[Azure SQL DataBase]が選択されていることを確認して、レプリケーションの種類
- レプリケーションの種類:標準(個別設定)
![](https://files.cdata.com/media/media/5gimuuln/huckleberry16.png?rmode=max&width=500)
![](https://files.cdata.com/media/media/tqdeorb3/huckleberry17.png?rmode=max&width=500)
![](https://files.cdata.com/media/media/exlgwwol/huckleberry18.png?rmode=max&width=500)
![](https://files.cdata.com/media/media/eldolgvm/huckleberry19.png?rmode=max&width=500)
Azure SQL Databaseからの確認
![](https://files.cdata.com/media/media/sbggdku2/huckleberry20.png?rmode=max&width=500)
ジョブの定期実行
![](https://files.cdata.com/media/media/v4ohgmvq/huckleberry21.png?rmode=max&width=500)