Skip to content

bigquery provider's - BigQueryCursor missing implementation for description property. #22328

@utkarsharma2

Description

@utkarsharma2

Apache Airflow version

2.2.4 (latest released)

What happened

When trying to run following code:

import pandas as pd
from airflow.providers.google.cloud.hooks.bigquery import BigqueryHook 

#using default connection
hook = BigqueryHook()

df = pd.read_sql(
        "SELECT * FROM table_name", con=hook.get_conn()
)

Running into following issue:

  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
    exec(exp, global_vars, local_vars)
  File "<string>", line 1, in <module>
  File "/Users/utkarsharma/sandbox/astronomer/astro/.nox/dev/lib/python3.8/site-packages/pandas/io/sql.py", line 602, in read_sql
    return pandas_sql.read_query(
  File "/Users/utkarsharma/sandbox/astronomer/astro/.nox/dev/lib/python3.8/site-packages/pandas/io/sql.py", line 2117, in read_query
    columns = [col_desc[0] for col_desc in cursor.description]
  File "/Users/utkarsharma/sandbox/astronomer/astro/.nox/dev/lib/python3.8/site-packages/airflow/providers/google/cloud/hooks/bigquery.py", line 2599, in description
    raise NotImplementedError
NotImplementedError

What you think should happen instead

The property should be implemented in a similar manner as postgres_to_gcs.py

How to reproduce

No response

Operating System

macOS

Versions of Apache Airflow Providers

apache-airflow-providers-google==6.5.0

Deployment

Virtualenv installation

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions