andrey_tatarinov
05/26/2022, 5:03 PMkey_properties
while BigQuery does not have this notion and in most cases you cannot guess from column type whether it is a primary key. So we need to put this data into tap config.
What would be the best place to put this data and in which form?andrey_tatarinov
05/26/2022, 5:04 PMmetadata
and somehow use *
functionality from Meltano. But I do not understand how to extract this data at discover stage.andrey_tatarinov
05/26/2022, 5:05 PMandrey_tatarinov
05/26/2022, 5:56 PMaaronsteers
05/26/2022, 6:05 PMaaronsteers
05/26/2022, 6:06 PMsterling_paramore
05/26/2022, 6:07 PMsterling_paramore
05/26/2022, 6:07 PMandrey_tatarinov
05/26/2022, 7:10 PMmetadata:
'*':
replication-method: FULL_TABLE
ml_test_db-ml_models:
key-properties: [model_version]
andrey_tatarinov
05/26/2022, 7:11 PMandrey_tatarinov
05/26/2022, 7:15 PMandrey_tatarinov
05/26/2022, 7:16 PMtap-bigquery
following AJ youtube stream, with couple of bugfixes for singer_sdk:
https://github.com/epoch8/tap-bigqueryaaronsteers
05/26/2022, 11:05 PMupdatedOn
).sterling_paramore
06/13/2022, 11:31 PMtap-bigquery
extractor and having trouble getting the key-properties to work. Here’s what I’ve got in `meltano.yml`:
extractors:
- name: tap-bigquery
config:
credentials_path: .secrets/client_secrets.json
start_datetime: '2000-01-01 00:00:00'
project_id: mse-prod-field-1
select:
- customer-package.*
metadata:
'*':
replication-method: FULL_TABLE
customer-package:
replication-method: INCREMENTAL
key-properties: [timestamp]
But in the log, key_properties
is empty
2022-06-13T23:29:11.264565Z [debug ] {"type": "SCHEMA", "stream": "customer-package", "schema": {"properties": {"device": {"type": ["string"]}, "device.serial_number": {"type": ["string", "null"]}, "device.nickname": {"type": ["string", "null"]}, "device.facility_id": {"type": ["string", "null"]}, "device.type_id": {"type": ["string", "null"]}, "device.sequence": {"type": ["integer", "null"]}, "timestamp": {"format": "date-time", "type": ["string"]}, "energy_reactiveDelivered": {"type": ["number", "null"]}, "energy_reactiveReceived": {"type": ["number", "null"]}, "energy_realDelivered": {"type": ["number", "null"]}, "energy_realReceived": {"type": ["number", "null"]}, "insert_timestamp": {"format": "date-time", "type": ["string", "null"]}}, "type": "object"}, "key_properties": []} cmd_type=extractor name=tap-bigquery (out) run_id=128403b4-1348-473f-9b51-f110cd925aba state_id=field-customer stdio=stdout
aaronsteers
06/13/2022, 11:50 PMkey-properties
- which would be odd for something like bigquery, or else is it expected in a different place within metadata
. If all else fails, you could use a mapper to override this setting between tap and target, although that adds additional complexity here that probably shouldn't be needed.sterling_paramore
06/14/2022, 3:09 PMandrey_tatarinov
06/14/2022, 4:40 PM