Skip to content

Structs lack proper names as dicts and arrays get turned into array of dicts #23

Closed
@jasonqng

Description

@jasonqng

Version 0.1.4

This query returns a improperly named dict:

q = """
select struct(a,b) col
from
(SELECT 1 a, 2 b)
"""
df = gbq.read_gbq(q, dialect='standard', verbose=False)

image

Compare with result from Big Query:
image

An array of items also get turned into a arrays of dicts sometimes. For example:

q = """
select array_agg(a)
from
(select "1" a UNION ALL select "2" a)
"""
gbq.read_gbq(q, dialect='standard', verbose=False, project_id='project')

outputs:
image

Compare to Big Query:
image

These issues may or may not be related?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedWe'd love to have community involvement on this issue.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions