Skip to content

Commit

Permalink
Rename ID to record_id to accomodate columns named ID
Browse files Browse the repository at this point in the history
  • Loading branch information
NiallRees committed Aug 19, 2021
1 parent 04b38ad commit bf21cb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tap_airtable/airtable_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def match_record_with_keys(cls, schema, records, remove_emojis):

Relations.save_if_list_of_ids(record.get('fields').get(key), id)

record_to_dump['id'] = record.get('id')
record_to_dump['record_id'] = record.get('id')

records_to_dump.append(record_to_dump)

Expand Down
4 changes: 2 additions & 2 deletions tap_airtable/services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def run_discovery(self, args):
"name": table_name,
"properties": columns}

columns["id"] = {"type": ["null", "string"], 'key': True}
columns["record_id"] = {"type": ["null", "string"], 'key': True}

for field in table["fields"]:
if not field["name"] == "Id":
Expand Down Expand Up @@ -57,7 +57,7 @@ def run_sync(self, config, properties):
response.json().get('records'),
config['remove_emojis'])

singer.write_schema(table, schema, 'id')
singer.write_schema(table, schema, 'record_id')
singer.write_records(table, records)

offset = response.json().get("offset")
Expand Down

0 comments on commit bf21cb0

Please sign in to comment.