接続の確立
コネクタ内で利用可能なオブジェクトは、"cdata.airtable" モジュールからアクセスできます。モジュールのオブジェクトを直接使用するには、はじめに以下のようにモジュールをインポートする必要があります。
import cdata.airtable as mod
そこで、コネクタオブジェクトからconnect() メソッドを呼び出すと、以下のような適切な接続文字列を使用して接続を確立できます。
mod.connect("APIKey=keymz3adb53RqsU;BaseId=appxxN2fe34r3rjdG7;TableNames=TableA,TableB,TableC;ViewNames=TableA.ViewA,TableA.ViewB,..,TableX.ViewY;")
Airtable への接続
The 本製品 requests tables and views from Airtable.Authenticate, specify a base, and specify a list of tables to connect.
- ApiKey:Log into Airtable and navigate to the Account icon in the top-right corner.Then, select Account from the dropdown menu.From the Account page, navigate to the API section.Then, click Generate API key.Set the ApiKey to the generated key.
- BaseId:同じ[API]セクションで、BaseId を特定します。この値を特定するには、https://airtable.com/api に移動してベースを選択します。In the introduction section of the Airtable documentation for the selected base, note the value specified in "The ID of this base is Id."
- TableNames:A comma-separated list of table names for the selected base in the format TableA,TableB..etc..Supply the table names exactly as they are displayed in the Airtable UI.
- ViewNames(オプション):その形式のビューのカンマ区切りリスト。 TableA.ViewA,TableA.ViewB,..etc。 これらは、UI にあるビューと同じ名前です。
Note: カラム名に'.' 文字は使用しないでください。これは、パスに基づいてカラム名を作成する際に使用され、INSERT / UPDATE ステートメントを破壊する危険性があります。すでに'.' 文字を含むカラム名が存在する場合は、PathDelimiter をカラム名に使用しない文字に設定してください。