Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigQuery and TypeScript #329

Open
duncanbeevers opened this issue Aug 22, 2024 · 1 comment
Open

BigQuery and TypeScript #329

duncanbeevers opened this issue Aug 22, 2024 · 1 comment

Comments

@duncanbeevers
Copy link

A -typed ecosystem for BigQuery

In order to get the same kind of type-safety for BigQuery as is offered for Postgres by pg-typed, and in the same vein as this request to create sqlite-typed, I'd like to see this project extend its support.

Steps to get a -typed ecosystem for BigQuery

  • create bigquery-schema-cli to generate TypeScript types from BigQuery schemas
    • get table names and column schemas for a dataset using the Google BigQuery getTables() and getMetadata() methods.
    • generate TypeScript interfaces for tables and for the overall dataset
  • create bigquery-typed to expose the -typed interface over BigQuery tables
  • (optional) create bigquery-bulk to expose BigQuery's batch loading methods
@duncanbeevers
Copy link
Author

I've written utilities for gathering the BigQuery dataset schemas, and for generating TypeScript interfaces from those schemas here, which could serve as a starting point for bigquery-schema-cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant