Skip to content

Eliminate/reduce query costs for previewer by using table.getRows() #65

Description

@RobbeDeWaele

Hi, thanks a lot for publishing this extension!
I came across a possible improvement and was wondering if you would consider implementing this enhancement:

The current implementation of the preview functionality uses a query along the lines of SELECT * FROM <table> {LIMIT <num_of_rows>} to visualize (a subset of) the rows of a table. Querying the entire table can be pretty costly however and the LIMIT clause does not necessarily reduce the cost for non-clustered tables (see BigQuery API documentation).

There is actually a nice query-less alternative which doesn't infer any cost according to Google: table.getRows()). It supports the current functionality to specify the number of rows returned. You can find the documentation here.

Would it be possible to update the previewer implementation to use this alternative? I've supplied a POC in this pull request.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions