@shushed/helpers 0.0.31 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1091,7 +1091,12 @@ var BigQueryHelper = class extends Runtime {
1091
1091
  const fullTableId = `${this.bigQuery.projectId}.${datasetId}.${tableName}`;
1092
1092
  const [tableExists] = await table.exists();
1093
1093
  if (!tableExists) {
1094
- throw new Error(`Table ${fullTableId} does not exist.`);
1094
+ await dataset.createTable(tableName, {
1095
+ schema: {
1096
+ fields: incomingSchema
1097
+ }
1098
+ });
1099
+ return fullTableId;
1095
1100
  }
1096
1101
  const [metadata] = await table.getMetadata();
1097
1102
  const existingSchema = metadata.schema.fields;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shushed/helpers",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",