Skip to content

Commit

Permalink
feat: BigQuery external rollup support
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Jul 19, 2019
1 parent e8af88d commit 10c635c
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 141 deletions.
6 changes: 6 additions & 0 deletions packages/cubejs-bigquery-driver/driver/BigQueryDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ class BigQueryDriver extends BaseDriver {
}
}

async tableColumnTypes(table) {
const [schema, name] = table.split('.');
const [bigQueryTable] = await this.bigquery.dataset(schema).table(name).getMetadata();
return bigQueryTable.schema.fields.map(c => ({ name: c.name, type: this.toGenericType(c.type) }));
}

async createSchemaIfNotExists(schemaName) {
await this.bigquery.dataset(schemaName).get({ autoCreate: true });
}
Expand Down
Loading

0 comments on commit 10c635c

Please sign in to comment.