EugeneYushin opened a new issue, #45512:
URL: https://github.com/apache/airflow/issues/45512

   ### Apache Airflow Provider(s)
   
   google
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Apache Airflow version
   
   2.7.3
   
   ### Operating System
   
   Darwin Kernel Version 23.6.0
   
   ### Deployment
   
   Google Cloud Composer
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   Using `BigQueryCreateExternalTableOperator` with `autodetect=True` doesn't 
trigger schema to be created in BQ:
   <img width="744" alt="image" 
src="https://github.com/user-attachments/assets/a8c5bb21-a5ba-41d1-a007-85b45868a017";
 />
   <img width="668" alt="Screenshot 2025-01-09 at 17 10 16" 
src="https://github.com/user-attachments/assets/9e2fa0e2-b507-4e0e-b58f-d3c32416d544";
 />
   
   
   ### What you think should happen instead
   
   Running the similar command from CLI leads to correct schema discovery 
processing:
   ```
   bq mk --table \
     --external_table_definition=@CSV=gs://.../test.csv \
    <dataset_name>.airflow_test_2
   ```
   <img width="827" alt="image" 
src="https://github.com/user-attachments/assets/b7dc61b6-0aed-4ad7-ad11-6866edfd5cd1";
 />
   
   
   ### How to reproduce
   
   Upload CSV file to GCS:
   ```
   name,age
   Bill,42
   Sally,15
   ```
   
   Run `BigQueryCreateExternalTableOperator`:
   ```python
   BigQueryCreateExternalTableOperator(
           task_id="bq_op",
           bucket="***",
           source_objects=["test.csv"],
           destination_project_dataset_table="***",
           source_format="CSV",
           autodetect=True,
           skip_leading_rows=1,
           location="us-east4",
       )
   ```
   
   ### Anything else
   
   Most probably switching from deprecated to led to that behavior
   https://github.com/apache/airflow/pull/24363
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to