-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚨🚨 Source AirTable: parse formula to simple data types (#31181)
Co-authored-by: artem1205 <[email protected]>
- Loading branch information
Showing
9 changed files
with
319 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 43 additions & 42 deletions
85
airbyte-integrations/connectors/source-airtable/integration_tests/expected_records.jsonl
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...-integrations/connectors/source-airtable/unit_tests/expected_schema_for_sample_table.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"additionalProperties": true, | ||
"properties": { | ||
"_airtable_created_time": { | ||
"type": ["null", "string"] | ||
}, | ||
"_airtable_id": { | ||
"type": ["null", "string"] | ||
}, | ||
"assignee_(from_table_6)": { | ||
"items": { | ||
"type": ["null", "number"] | ||
}, | ||
"type": ["null", "array"] | ||
}, | ||
"barcode": { | ||
"type": ["null", "string"] | ||
}, | ||
"float": { | ||
"type": ["null", "number"] | ||
}, | ||
"formula_1": { | ||
"type": ["null", "number"] | ||
}, | ||
"formula_2_(array)": { | ||
"items": { | ||
"type": ["null", "string"] | ||
}, | ||
"type": ["null", "array"] | ||
}, | ||
"formula_3_simple_text": { | ||
"type": ["null", "string"] | ||
}, | ||
"integer": { | ||
"type": ["null", "number"] | ||
}, | ||
"name": { | ||
"type": ["null", "string"] | ||
}, | ||
"status": { | ||
"type": ["null", "string"] | ||
}, | ||
"table_6": { | ||
"items": { | ||
"type": ["null", "string"] | ||
}, | ||
"type": ["null", "array"] | ||
} | ||
}, | ||
"type": "object" | ||
} |
139 changes: 139 additions & 0 deletions
139
airbyte-integrations/connectors/source-airtable/unit_tests/sample_table_with_formulas.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
{ | ||
"id": "tblSXpxKHg0OiLxbI", | ||
"name": "Table 1", | ||
"primaryFieldId": "some_id", | ||
"fields": [ | ||
{ | ||
"type": "singleLineText", | ||
"id": "some_id", | ||
"name": "Name" | ||
}, | ||
{ | ||
"type": "formula", | ||
"options": { | ||
"isValid": true, | ||
"formula": "1+1", | ||
"referencedFieldIds": [], | ||
"result": { | ||
"type": "number", | ||
"options": { | ||
"precision": 0 | ||
} | ||
} | ||
}, | ||
"id": "fldG2UVGl3hEglGJq", | ||
"name": "Formula 1" | ||
}, | ||
{ | ||
"type": "formula", | ||
"options": { | ||
"isValid": true, | ||
"formula": "ARRAYFLATTEN(1,2,3)", | ||
"referencedFieldIds": [], | ||
"result": { | ||
"type": "string", | ||
"options": { | ||
"precision": 0 | ||
} | ||
} | ||
}, | ||
"id": "fldG2UVGl3hEg123Jq", | ||
"name": "Formula 2 (array)" | ||
}, | ||
|
||
{ | ||
"type": "formula", | ||
"options": { | ||
"isValid": true, | ||
"formula": "CONCAT(1,2,3)", | ||
"referencedFieldIds": [], | ||
"result": { | ||
"type": "string", | ||
"options": { | ||
"precision": 0 | ||
} | ||
} | ||
}, | ||
"id": "fldG2UVGl3hEg123Jq", | ||
"name": "Formula 3 simple text" | ||
}, | ||
{ | ||
"type": "singleSelect", | ||
"options": { | ||
"choices": [ | ||
{ | ||
"id": "seleFjJiXuyLDHNUM", | ||
"name": "Todo", | ||
"color": "redLight2" | ||
}, | ||
{ | ||
"id": "selskIXEljPBrKHLz", | ||
"name": "In progress", | ||
"color": "yellowLight2" | ||
}, | ||
{ | ||
"id": "selg4w4LeypED2gpW", | ||
"name": "Done", | ||
"color": "greenLight2" | ||
} | ||
] | ||
}, | ||
"id": "fldpwaVKzdfcHe2YV", | ||
"name": "Status" | ||
}, | ||
{ | ||
"type": "number", | ||
"options": { | ||
"precision": 1 | ||
}, | ||
"id": "fldZNvmdvMZymPxUc", | ||
"name": "Float" | ||
}, | ||
{ | ||
"type": "number", | ||
"options": { | ||
"precision": 0 | ||
}, | ||
"id": "fldsjTjrIkKTv6KjG", | ||
"name": "Integer" | ||
}, | ||
{ | ||
"type": "barcode", | ||
"id": "fld899obV6ycadgWS", | ||
"name": "Barcode" | ||
}, | ||
{ | ||
"type": "multipleRecordLinks", | ||
"options": { | ||
"linkedTableId": "tblSXpxKHg0OiLxbI", | ||
"isReversed": false, | ||
"prefersSingleRecordLink": false | ||
}, | ||
"id": "fldMkP8CfDgqc5r3j", | ||
"name": "Table 6" | ||
}, | ||
{ | ||
"type": "multipleLookupValues", | ||
"options": { | ||
"isValid": true, | ||
"recordLinkFieldId": "fldMkP8CfDgqc5r3j", | ||
"fieldIdInLinkedTable": "fldG2UVGl3hEglGJq", | ||
"result": { | ||
"type": "number", | ||
"options": { | ||
"precision": 0 | ||
} | ||
} | ||
}, | ||
"id": "fldLQOO0P7mB4lm7x", | ||
"name": "Assignee (from Table 6)" | ||
} | ||
], | ||
"views": [ | ||
{ | ||
"id": "viwadxF7ds4lOBf3R", | ||
"name": "Grid view", | ||
"type": "grid" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Airtable Migration Guide | ||
|
||
## Upgrading to 4.0.0 | ||
Columns with Formulas are narrowing from `array` to `string` or `number`. You may need to refresh the connection schema (with the reset), and run a sync. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters