BhuviTheDataGuy opened a new issue #11545:
URL: https://github.com/apache/airflow/issues/11545


   Version : 1.10.12
   
   Im trying to get a SQL query results on BigQuery with BigQuery Hook. But in 
the logs, seems its showing the warning.
   ```py
   WARNING - 
/root/.local/lib/python3.7/site-packages/airflow/contrib/hooks/bigquery_hook.py:800:
 DeprecationWarning: Deprecated parameter `bql` used in 
`BigQueryBaseCursor.run_query` Use `sql` parameter instead to pass the sql to 
be executed. `bql` parameter is deprecated and will be removed in a future 
version of Airflow.
     category=DeprecationWarning)
   ```
   My code:
   
   ```py
   from airflow.contrib.operators.gcs_to_bq import 
GoogleCloudStorageToBigQueryOperator
   def get_dag_ids(tablename,**kwargs):
       bq_hook = 
BigQueryHook(bigquery_conn_id='bigquery_default',use_legacy_sql=False, 
location='US')
       records = bq_hook.get_records(sql="select max(time) from 
project.dataset.{};".format(tablename))
       return records[0][0]
   ```
   Is this something  I need to fix from my code, or from it has to be updated 
on Airflow's hook itself? 
   


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


Reply via email to