Skip to content

Enable to get a compiled SQL query #5

@yu-iskw

Description

@yu-iskw

Motivation

The query method enables us to fetch data from the warehouse through Lightdash. That would be great to enhance the integration with other ecosystem. If the data we want to fetch is quite large which exceeds the limitation in Lightdash, we might want to use other tools. For instance, bigframes enables ua to deal with even a large BigQuery table or query results. If the python SDK provides a method to compile query by dimensions, metrics and other parameters, that would be very useful to enhance the Lightdash integration.

query = orders.compile_query(
    dimensions=[orders.dimensions.xxx, orders.dimensions.xxx],
    limit=10000000,
)

# Create a dataframe with the compiled query
import bigframes.pandas as bpd

bq_df = bpd.read_gbq(query)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions