Skip to content

Fails to read array from bigquery #818

@cpita-mutt

Description

@cpita-mutt

What language are you using?

Python

What version are you using?

0.4.3

What database are you using?

BigQuery

What dataframe are you using?

Pandas

Can you describe your bug?

Any query involving array columns fails. For example:

SELECT ARRAY [1]

What are the steps to reproduce the behavior?

Connect to bigquery using the python client and run the query above.

What is the error?

File ~/.venvs/tiktok/lib/python3.10/site-packages/connectorx/__init__.py:386, in read_sql(conn, query, return_type, protocol, partition_on, partition_range, partition_num, index_col, strategy, pre_execution_query)
    383 if return_type in {"modin", "dask", "pandas"}:
    384     try_import_module("pandas")
--> [386]     result = _read_sql(
    387         conn,
    388         "pandas",
    389         queries=queries,
    390         protocol=protocol,
    391         partition_query=partition_query,
    392         pre_execution_queries=pre_execution_queries,
    393     )
    394     df = reconstruct_pandas(result)
    396     if index_col is not None:

RuntimeError: cannot get str from json value

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions