Skip to content

Importing @google-cloud/bigquery fails in JS snippets #1489

Answered by Fil
benminer asked this question in Q&A
Discussion options

You must be logged in to vote

The module you are trying to import seems to work only with node.js, and there is no equivalent of "fs" for the browser. (I think this explains why Framework's attempts to massage the code with rollup fail.)

Our model with data loaders is that you handle all of this in "data snapshots" that download the data once (authenticating properly) and then present it statically to the browser. You can still operate queries again this data snapshot, using sql, but the browser doesn't get to talk to bigquery directly.

The recommendation (if there is a lot of data) is to save the snapshot in the efficient parquet format. If this still makes files too large, you can consider sharding the data into sev…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by benminer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn’t working
2 participants
Converted from issue

This discussion was converted from issue #1488 on June 26, 2024 21:31.