jonas_kalderstam
01/13/2022, 10:32 AMtarget-bigquery
. Trying to load data from postgres into bigquery and getting this error
2022-01-13T10:29:57.794779Z [info ] ERROR failed to load table t_public-e_address_9bf781de077049efa9ab87068bb1e228 from file: 400 POST <https://bigquery.googleapis.com/upload/bigquery/v2/projects/marketing-333110/jobs?uploadType=resumable>: Field point is type RECORD but has no schema cmd_type=loader job_id=yobify-to-bigquery name=target-bigquery run_id=8125ef19-fb9f-47a6-ad34-5f59831972c0 stdio=stderr
2022-01-13T10:29:57.795270Z [info ] CRITICAL 400 POST <https://bigquery.googleapis.com/upload/bigquery/v2/projects/marketing-333110/jobs?uploadType=resumable>: Field point is type RECORD but has no schema cmd_type=loader job_id=yobify-to-bigquery name=target-bigquery run_id=8125ef19-fb9f-47a6-ad34-5f59831972c0 stdio=stderr
It complains that public-e_address.point
has no schema. But the strange bit is that it is listed as excluded:
$ meltano select tap-postgres --list --all | grep point
[...]
[excluded ] public-e_address.point
[...]
So I don't understand why it is even uploading this field.jonas_kalderstam
01/13/2022, 12:03 PMtap.properties.json
, I see that point is included:
"point": {},
but without any type defined. The database type is a PostGIS geometry so it's not surprising there is no support for it.jonas_kalderstam
01/13/2022, 12:51 PMtap-postgres
with
schema:
'*':
point:
type: 'null'
default: null
(also tried string and such). but the result is the same.
Looking in the run
dir, the metadata for the tap matches what I've configured.
But the log output when running etl shows that an empty schema is transmitted:
2022-01-13T12:49:57.192021Z [info ] INFO public-e_address schema: { [...] 'point': {} [...]
jonas_kalderstam
01/13/2022, 1:26 PMjonas_kalderstam
01/13/2022, 2:39 PMtaylor
01/13/2022, 4:06 PMpeter_huss
03/23/2022, 7:27 PMtap-jira
and target-bigquery
and I'm wondering if it's simply impossible to use these in combination since tap-jira
doesn't fully define types for all the attributes in its catalogpeter_huss
03/23/2022, 7:31 PMcody_hanson
03/23/2022, 7:43 PMpeter_huss
03/23/2022, 7:44 PMtap-jira
and not tap-postgres
, but it seems the same in naturecody_hanson
03/23/2022, 8:02 PMtap-jira
and patch it to work for your use case and then use that fork for the time being.aaronsteers
03/23/2022, 9:04 PMWe’re releasing soon the stream maps functionality that could intercept these messages and do the fix you’re wanting...I'll post some general guidance in a new "workaround" section of the issue @jonas_kalderstam correctly linked regarding taps not applying selection logic to schema.
aaronsteers
03/23/2022, 9:04 PMpeter_huss
03/23/2022, 9:06 PMaaronsteers
03/23/2022, 9:15 PMaaronsteers
03/23/2022, 9:16 PMpeter_huss
03/23/2022, 9:16 PMpeter_huss
03/23/2022, 10:07 PMplugins:
extractors:
- name: tap-jira
variant: singer-io
pip_url: git+<https://github.com/singer-io/tap-jira.git>
config:
base_url: *******
start_date: '2022-03-01'
username: *******
select:
- issues.*
- '!issues.renderedFields'
- '!issues.versionedRepresentations'
loaders:
- name: target-bigquery
variant: adswerve
pip_url: git+<https://github.com/adswerve/target-bigquery.git@0.11.3>
config:
credentials_path: *******
dataset_id: *******
project_id: *******
mappers:
- name: meltano-map-transformer
variant: meltano
pip_url: git+<https://github.com/MeltanoLabs/meltano-map-transform.git>
mappings:
- name: remove-bad-cols
config:
stream_maps:
issues:
renderedFields: null
versionedRepresentations: null
I've tested this basic config to remove two problematic fields (issues.renderedFields
and issues.versionedRepresentations
) but I still encounter the same error as before when running meltano run tap-jira remove-bad-cols target-bigquery
Perhaps I'm missing something obvious?peter_huss
03/23/2022, 10:08 PMgoogle.api_core.exceptions.BadRequest: 400 POST <https://bigquery.googleapis.com/upload/bigquery/v2/projects/***/jobs?uploadType=resumable>: Field renderedFields is type RECORD but has no schema
peter_huss
03/23/2022, 10:18 PMtarget-bigquery
complaining early on about the issues
schema
2022-03-23T22:16:27.021628Z [info ] WARNING the pipeline might fail because of undefined fields: an empty object/dictionary indicated as {} cmd_type=elb consumer=True name=target-bigquery producer=False stdio=stderr string_id=target-bigquery
peter_huss
03/23/2022, 10:22 PMtarget-bigquery
still printing out the schema with the two columns I've attempted to remove
(removed other parts since the log message is long)
2022-03-23T22:16:27.021085Z [info ] INFO issues schema: {[...] 'renderedFields': {'type': ['null', 'object'], 'patternProperties': {'.+': {}}},'versionedRepresentations': {'type': ['null', 'object'], 'patternProperties': {'.+': {'type': ['null', 'object'], 'patternProperties': {'.+': {}}}}},} cmd_type=elb consumer=True name=target-bigquery producer=False stdio=stderr string_id=target-bigquery
jose_riego_valenzuela
03/25/2022, 1:19 PMjose
11/22/2022, 10:58 AMjose
11/22/2022, 12:00 PM- name: target-bigquery
variant: transferwise
pip_url: git+<https://github.com/jmriego/pipelinewise-target-bigquery.git>
and then did a meltano install loader target-bigquery
shubham
07/24/2023, 7:51 PM