You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/06/22 04:52:40 UTC
[GitHub] [airflow] Kiollpt opened a new issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Kiollpt opened a new issue #16578:
URL: https://github.com/apache/airflow/issues/16578
<!--
Welcome to Apache Airflow! For a smooth issue process, try to answer the following questions.
Don't worry if they're not all applicable; just try to include what you can :-)
If you need to include code snippets or logs, please put them in fenced code
blocks. If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>
Please delete these comment blocks before submitting the issue.
-->
<!--
IMPORTANT!!!
PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
Please complete the next sections or the issue will be closed.
These questions are the first thing we need to know to understand the context.
-->
**Apache Airflow version**: 2.1.0
**apache-airflow-providers-google**: 4.0.0rc1
**What happened**:
<!-- (please include exact error messages if you can) -->
```python
t1 = GCSToBigQueryOperator(
task_id='ingest_data',
bucket='harry-airflow-dev',
source_objects=['log_raw_data_0'],
source_format='PARQUET',
destination_project_dataset_table=f"{DATASET_NAME}.{TABLE_NAME}",
write_disposition='WRITE_TRUNCATE'
)
```
**error messages**:
```log
Traceback (most recent call last):
File "/home/harry/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1137, in _run_raw_task
self._prepare_and_execute_task_with_callbacks(context, task)
File "/home/harry/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1311, in _prepare_and_execute_task_with_callbacks
result = self._execute_task(context, task_copy)
File "/home/harry/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1341, in _execute_task
result = task_copy.execute(context=context)
File "/home/harry/airflow/plugins/operators/gcs_to_bq.py", line 107, in execute
cursor.run_load(
File "/home/harry/.local/lib/python3.8/site-packages/airflow/providers/google/cloud/hooks/bigquery.py", line 2688, in run_load
return self.hook.run_load(*args, **kwargs)
File "/home/harry/.local/lib/python3.8/site-packages/airflow/providers/google/cloud/hooks/bigquery.py", line 1921, in run_load
job = self.insert_job(configuration=configuration, project_id=self.project_id)
File "/home/harry/.local/lib/python3.8/site-packages/airflow/providers/google/common/hooks/base_google.py", line 425, in inner_wrapper
return func(self, *args, **kwargs)
File "/home/harry/.local/lib/python3.8/site-packages/airflow/providers/google/cloud/hooks/bigquery.py", line 1641, in insert_job
job.result()
File "/home/harry/.local/lib/python3.8/site-packages/google/cloud/bigquery/job/base.py", line 679, in result
return super(_AsyncJob, self).result(timeout=timeout, **kwargs)
File "/home/harry/.local/lib/python3.8/site-packages/google/api_core/future/polling.py", line 134, in result
raise self._exception
google.api_core.exceptions.Conflict: 409 Already Exists: Table bigdata-dev-287803:z_harry_test.gcs_to_bq_table
```
**What you expected to happen**:
As the document said, using `WRITE_TRUNCATE ` should erase the data and the schema in the existing table.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] eladkal commented on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-865678794
@Kiollpt does it work with `apache-airflow-providers-google: 3.0.0` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-865549031
Thanks for opening your first issue here! Be sure to follow the issue template!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] lucas-houles commented on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
lucas-houles commented on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-1000325251
Hello @eladkal,
Can i work on this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] eladkal commented on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-945772716
Feel free to open PR if you have the fix :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk closed issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
potiuk closed issue #16578:
URL: https://github.com/apache/airflow/issues/16578
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Kiollpt commented on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
Kiollpt commented on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-866451843
@eladkal I haven't tested it with that version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] thenaturalist commented on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
thenaturalist commented on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-945746029
@eladkal I can confirm this is still an ongoing issue, when using `apache-airflow-providers-google: 3.0.0`.
For reference, I encountered this in Cloud Composer, using verision `composer-1.17.0-airflow-2.0.2`.
See CC versions & Python packages at https://cloud.google.com/composer/docs/concepts/versioning/composer-versions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] lucas-houles commented on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
lucas-houles commented on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-1009795737
@Kiollpt I've tested with Apache Airflow version: 2.1.0 and apache-airflow-providers-google: 4.0.0rc1 and its working.
We can close this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] thenaturalist commented on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
thenaturalist commented on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-945770252
@eladkal I believe this is caused by using the `writeDisposition` vs. the `write_disposition` arg, like in this issue: https://github.com/googleapis/google-cloud-python/issues/2326#issuecomment-247925082
Relevant line is in the `run_load`, `run_copy` configs here: https://github.com/apache/airflow/blob/e5422f0233b993acfe7c881dfa72178e662f8e46/airflow/providers/google/cloud/hooks/bigquery.py#L1836
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-1000330848
Feel free @lucas-houles
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-865549031
Thanks for opening your first issue here! Be sure to follow the issue template!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] eladkal edited a comment on issue #16578: GCSToBigQueryOperator WRITE_TRUNCATE is not working
Posted by GitBox <gi...@apache.org>.
eladkal edited a comment on issue #16578:
URL: https://github.com/apache/airflow/issues/16578#issuecomment-865678794
@Kiollpt does it work with `apache-airflow-providers-google: 3.0.0` ?
FYI @potiuk
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org