CData Python Connector for Airtable

Build 21.0.7930

Establishing a Connection

The objects available within our connector are accessible from the "cdata.airtable" module. In order to use the module's objects directly, the module must first be imported as below:

import cdata.airtable as mod

From there, the connect() method can be called from the connector object to establish a connection using an appropriate connection string, such as the below:

mod.connect("APIKey=keymz3adb53RqsU;BaseId=appxxN2fe34r3rjdG7;TableNames=TableA,TableB,TableC;ViewNames=TableA.ViewA,TableA.ViewB,..,TableX.ViewY;")

Connecting to Airtable

The Airtable data source only supports the simple token-based authentication method.

To establish a connection begin by locating your ApiKey. You can find this by logging into your Airtable account and navigating to the API section. Then, click Generate API key.

From the same API section, identify your BaseId. Click on Airtable API, or navigate to https://airtable.com/api and select a base.

Supply the following to connect to data:

  • ApiKey: Set this to your API key noted earlier.
  • BaseId: Set this to your Base Id noted earlier. In the introduction section you can find "The ID of this base is appxxN2ftedc0nEG7."
  • TableNames: A comma separated list of table names for the selected base. These are the same names of tables as found in the UI.

You may also optionally specify the following to further refine data access:

  • ViewNames: A comma separated list of views in the format TableA.ViewA,TableA.ViewB,..etc. These are the same names of the views as found in the UI.

Important note : '.' character is not suggested to be used for column names since it is used for bulding column names based on paths and may risk breaking INSERT/UPDATE statements. If you already have column names that contain '.' character, please set PathDelimiter connection property to a character that is not used in column names. PathDelimiter is equal to '.' by default.

  • PathDelimiter: The character which will be used as delimiter for bulding column names based on paths.

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930