Skip to content

Commit

Permalink
Merge pull request #16 from hotgluexyz/fix/replicationKeys
Browse files Browse the repository at this point in the history
Fix/replication keys
  • Loading branch information
hsyyid authored Feb 4, 2022
2 parents 12df852 + b3359c3 commit 1320f76
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='tap-netsuite',
version='1.5.9',
version='1.5.10',
description='Singer.io tap for extracting data from the NetSuite SOAP',
author='hotglue',
url='https://hotglue.xyz/',
Expand Down
2 changes: 2 additions & 0 deletions tap_netsuite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ def do_discover(ns):
if replication_key:
mdata = metadata.write(
mdata, (), 'valid-replication-keys', [replication_key])
mdata = metadata.write(mdata, (), 'replication-key', replication_key)
mdata = metadata.write(mdata, (), 'replication-method', 'INCREMENTAL')
else:
mdata = metadata.write(
mdata,
Expand Down
4 changes: 2 additions & 2 deletions tap_netsuite/netsuite/schemas/object_definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
{"displayName": "IsTaxable", "name": "isTaxable", "type": "string"},
{"displayName": "ItemList", "name": "itemList", "type": "string"},
{"displayName": "Job", "name": "job", "type": "string"},
{"displayName": "LastModifiedDate", "name": "lastModifiedDate", "type": "string"},
{"displayName": "LastModifiedDate", "name": "lastModifiedDate", "type": "datetime"},
{"displayName": "LeadSource", "name": "leadSource", "type": "string"},
{"displayName": "Location", "name": "location", "type": "string"},
{"displayName": "Memo", "name": "memo", "type": "string"},
Expand Down Expand Up @@ -851,4 +851,4 @@
{"displayName": "TranId", "name": "tranId", "type": "string"},
{"displayName": "VatRegNum", "name": "vatRegNum", "type": "string"}
]
}
}
3 changes: 2 additions & 1 deletion tap_netsuite/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ def sync_records(ns, catalog_entry, state, counter):
time_extracted=start_time))

if replication_key:
_rec = rec.get(replication_key, None)
__rec = {k.lower(): v for k, v in rec.items()}
_rec = __rec.get(replication_key.lower(), None)
original_replication_key_value = ""
replication_key_value = None
if replication_key and _rec is not None:
Expand Down

0 comments on commit 1320f76

Please sign in to comment.