bulky-park-65916
01/22/2021, 3:25 PM[2021-01-22 09:21:53,814] {bash_operator.py:157} INFO - target-bigquery | CRITICAL 400 Provided Schema does not match Table ads_insights_platform_and_device. Field impression_device has changed mode from NULLABLE to REQUIRED
[2021-01-22 09:21:53,972] {bash_operator.py:157} INFO - ELT could not be completed: Target failed
Did the schema change from FB's side, or is it a Meltano related issue?
Why is NULLABLE to REQUIRED causing an issue?
Additonal info:
Log:[2021-01-22 09:21:53,814] {bash_operator.py:157} INFO - target-bigquery | CRITICAL 400 Provided Schema does not match Table ads_insights_platform_and_device. Field impression_device has changed mode from NULLABLE to REQUIRED
[2021-01-22 09:21:53,817] {bash_operator.py:157} INFO - target-bigquery | CRITICAL ['Traceback (most recent call last):\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/__init__.py", line 93, in main\n for state in state_iterator:\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/process.py", line 63, in process\n for s in handler.on_stream_end():\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/processhandler.py", line 260, in on_stream_end\n self._do_temp_table_based_load(rows)\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/processhandler.py", line 168, in _do_temp_table_based_load\n raise e\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/processhandler.py", line 160, in _do_temp_table_based_load\n job_config=copy_config\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/google/cloud/bigquery/job.py", line 812, in result\n return super(_AsyncJob, self).result(timeout=timeout)\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/google/api_core/future/polling.py", line 130, in result\n raise self._exception\n', 'google.api_core.exceptions.BadRequest: 400 Provided Schema does not match Table digitalabi:abi.ads_insights_platform_and_device. Field impression_device has changed mode from NULLABLE to REQUIRED\n']
[2021-01-22 09:21:53,953] {bash_operator.py:157} INFO - meltano | Loading failed (2): CRITICAL ['Traceback (most recent call last):\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/__init__.py", line 93, in main\n for state in state_iterator:\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/process.py", line 63, in process\n for s in handler.on_stream_end():\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/processhandler.py", line 260, in on_stream_end\n self._do_temp_table_based_load(rows)\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/processhandler.py", line 168, in _do_temp_table_based_load\n raise e\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/target_bigquery/processhandler.py", line 160, in _do_temp_table_based_load\n job_config=copy_config\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/google/cloud/bigquery/job.py", line 812, in result\n return super(_AsyncJob, self).result(timeout=timeout)\n', ' File "/projects/.meltano/loaders/target-bigquery/venv/lib/python3.6/site-packages/google/api_core/future/polling.py", line 130, in result\n raise self._exception\n', 'google.api_core.exceptions.BadRequest: 400 Provided Schema does not match Table digitalabi:abi.ads_insights_platform_and_device. Field impression_device has changed mode from NULLABLE to REQUIRED\n']
[2021-01-22 09:21:53,972] {bash_operator.py:157} INFO - ELT could not be completed: Target failed
[2021-01-22 09:21:54,345] {bash_operator.py:161} INFO - Command exited with return code 1
[2021-01-22 09:21:54,386] {taskinstance.py:1150} ERROR - Bash command failed
Traceback (most recent call last):
File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 984, in _run_raw_task
result = task_copy.execute(context=context)
File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.6/site-packages/airflow/operators/bash_operator.py", line 165, in execute
raise AirflowException("Bash command failed")
airflow.exceptions.AirflowException: Bash command failed
ripe-musician-59933
01/22/2021, 4:15 PMimpression_device
property as ["null", "string"]
(https://gitlab.com/meltano/tap-facebook/-/blob/master/tap_facebook/schemas/ads_insights_platform_and_device.json#L17-22), so I'm not sure where target-bigquery is now getting the idea from that that field should be required rather than nullable. 😕meltano --log-level=debug
), can you share the SCHEMA
message for the ads_insights_platform_and_device
stream that includes the impression_device
property? I'd like to see if the type
there still says ["null", "string"]
bulky-park-65916
01/22/2021, 4:54 PMripe-musician-59933
01/22/2021, 4:55 PMbulky-park-65916
01/22/2021, 5:01 PMripe-musician-59933
01/22/2021, 5:53 PMpip_url
are you using for target-bigquery
? Have you pinned a specific version or are you using the latest commit of https://github.com/adswerve/target-bigquery?bulky-park-65916
01/22/2021, 5:57 PMripe-musician-59933
01/22/2021, 5:58 PMbulky-park-65916
01/22/2021, 5:58 PMripe-musician-59933
01/22/2021, 5:59 PMmeltano install
run again recently?bulky-park-65916
01/22/2021, 5:59 PMripe-musician-59933
01/22/2021, 5:59 PMbulky-park-65916
01/22/2021, 5:59 PMripe-musician-59933
01/22/2021, 5:59 PMbulky-park-65916
01/22/2021, 6:00 PMripe-musician-59933
01/22/2021, 6:58 PMbulky-park-65916
01/22/2021, 7:02 PMlemon-london-61072
01/24/2021, 4:58 PMbulky-park-65916
01/24/2021, 5:11 PMlemon-london-61072
01/24/2021, 6:28 PMbulky-park-65916
01/25/2021, 12:39 PM_time_loaded
rows, as they hold redundant and unnecessary information.
I've already figured out an additional process of filtering the data and appending them to a different table, so if it's not reasonable to change schema, I'd just use this approach.ripe-musician-59933
02/02/2021, 6:21 PMThe thing is: would it be reasonable at all to change the tap-facebook's schema fields to NULLABLE?@bulky-park-65916 They already are nullable, aren't they? https://meltano.slack.com/archives/CFG3C3C66/p1611337929007500?thread_ts=1611329142.003700&cid=CFG3C3C66
target-bigquery
complains that "Field impression_device has changed mode from NULLABLE to REQUIRED", but tap-facebook has always said that it's "nullable", so I'm not sure where it's getting the idea that it was changed to "required".
As far as I can see, tap-facebook is doing everything right (correctly communicating that that field could be null), while target-bigquery is getting confused and likely has a bug somewherebulky-park-65916
02/02/2021, 6:26 PMripe-musician-59933
02/02/2021, 6:45 PMbulky-park-65916
02/02/2021, 7:04 PM