QueryAirtableTable

Description:

Query records from an Airtable table. Records are incrementally retrieved based on the last modified time of the records. Records can also be further filtered by setting the 'Custom Filter' property which supports the formulas provided by the Airtable API. This processor is intended to be run on the Primary Node only.

Additional Details...

Tags:

airtable, query, database

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
API URLapi-urlhttps://api.airtable.com/v0The URL for the Airtable REST API including the domain and the path to the API (e.g. https://api.airtable.com/v0).
Supports Expression Language: true (will be evaluated using variable registry only)
API Keyapi-keyThe REST API key to use in queries. Should be generated on Airtable's account page.
Sensitive Property: true
Base IDbase-idThe ID of the Airtable base to be queried.
Supports Expression Language: true (will be evaluated using variable registry only)
Table IDtable-idThe name or the ID of the Airtable table to be queried.
Supports Expression Language: true (will be evaluated using variable registry only)
FieldsfieldsComma-separated list of fields to query from the table. Both the field's name and ID can be used.
Supports Expression Language: true (will be evaluated using variable registry only)
Custom Filtercustom-filterFilter records by Airtable's formulas.
Supports Expression Language: true (will be evaluated using variable registry only)
Query Time Window Lagquery-time-window-lag3 sThe amount of lag to be applied to the query time window's end point. Set this property to avoid missing records when the clock of your local machines and Airtable servers' clock are not in sync. Must be greater than or equal to 1 second.
Supports Expression Language: true (will be evaluated using variable registry only)
Web Client Service Providerweb-client-service-providerController Service API:
WebClientServiceProvider
Implementation: StandardWebClientServiceProvider
Web Client Service Provider to use for Airtable REST API requests
Query Page Sizequery-page-sizeNumber of records to be fetched in a page. Should be between 1 and 100 inclusively.
Supports Expression Language: true (will be evaluated using variable registry only)
Max Records Per FlowFilemax-records-per-flowfileThe maximum number of result records that will be included in a single FlowFile. This will allow you to break up very large result sets into multiple FlowFiles. If no value specified, then all records are returned in a single FlowFile.
Supports Expression Language: true (will be evaluated using variable registry only)

Relationships:

NameDescription
successFor FlowFiles created as a result of a successful query.

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
record.countSets the number of records in the FlowFile.
fragment.identifierIf 'Max Records Per FlowFile' is set then all FlowFiles from the same query result set will have the same value for the fragment.identifier attribute. This can then be used to correlate the results.
fragment.countIf 'Max Records Per FlowFile' is set then this is the total number of FlowFiles produced by a single ResultSet. This can be used in conjunction with the fragment.identifier attribute in order to know how many FlowFiles belonged to the same incoming ResultSet.
fragment.indexIf 'Max Records Per FlowFile' is set then the position of this FlowFile in the list of outgoing FlowFiles that were all derived from the same result set FlowFile. This can be used in conjunction with the fragment.identifier attribute to know which FlowFiles originated from the same query result set and in what order FlowFiles were produced

State management:

ScopeDescription
CLUSTERThe last successful query's time is stored in order to enable incremental loading. The initial query returns all the records in the table and each subsequent query filters the records by their last modified time. In other words, if a record is updated after the last successful query only the updated records will be returned in the next query. State is stored across the cluster, so this Processor can run only on the Primary Node and if a new Primary Node is selected, the new node can pick up where the previous one left off without duplicating the data.

Restricted:

This component is not restricted.

Input requirement:

This component does not allow an incoming relationship.

System Resource Considerations:

None specified.