dlt version
1.17.1
Source name
airtable
Describe the problem
The airtable source assumes the airtable primary field is functionally equivalent to a primary key. However it isn't, it can be null and include duplicates (it's actually the first field of the table, and users can change field order). The actual "primary key" should probably be the hidden "id" field which is a uuid and is not null and unique.
|
primary_key_id = table["primaryFieldId"] |
Expected behavior
Can replicate airtables that have a primary field that contains nulls or duplicates
Steps to reproduce
Create an airtable base with a table where the primary (first field) contains blanks or duplicates and try and replicate to duckdb or others, an exception is thrown because dlt sets the primary_key property in the airtable_resource function to the (non-unique) primary field rather than the id field of the airtable.
How you are using the source?
I run this source in production.
Operating system
Linux, macOS
Runtime environment
Local
Python version
3.10
dlt destination
duckdb
Additional information
No response
dlt version
1.17.1
Source name
airtable
Describe the problem
The airtable source assumes the airtable primary field is functionally equivalent to a primary key. However it isn't, it can be null and include duplicates (it's actually the first field of the table, and users can change field order). The actual "primary key" should probably be the hidden "id" field which is a uuid and is not null and unique.
verified-sources/sources/airtable/__init__.py
Line 52 in b3ef9bf
Expected behavior
Can replicate airtables that have a primary field that contains nulls or duplicates
Steps to reproduce
Create an airtable base with a table where the primary (first field) contains blanks or duplicates and try and replicate to duckdb or others, an exception is thrown because dlt sets the primary_key property in the
airtable_resourcefunction to the (non-unique) primary field rather than the id field of the airtable.How you are using the source?
I run this source in production.
Operating system
Linux, macOS
Runtime environment
Local
Python version
3.10
dlt destination
duckdb
Additional information
No response