@malloydata/db-bigquery 0.0.33-dev230508155332 → 0.0.33
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.
- package/dist/bigquery_connection.js +10 -3
- package/package.json +2 -2
|
@@ -153,7 +153,7 @@ class BigQueryConnection {
|
|
|
153
153
|
return true;
|
|
154
154
|
}
|
|
155
155
|
async _runSQL(sqlCommand, options = {}, rowIndex = 0) {
|
|
156
|
-
var _a, _b, _c, _d;
|
|
156
|
+
var _a, _b, _c, _d, _e;
|
|
157
157
|
const defaultOptions = this.readQueryOptions();
|
|
158
158
|
const pageSize = (_a = options.rowLimit) !== null && _a !== void 0 ? _a : defaultOptions.rowLimit;
|
|
159
159
|
try {
|
|
@@ -170,8 +170,15 @@ class BigQueryConnection {
|
|
|
170
170
|
throw new Error('Schema not present');
|
|
171
171
|
}
|
|
172
172
|
// TODO even though we have 10 minute timeout limit, we still should confirm that resulting metadata has "jobComplete: true"
|
|
173
|
-
const
|
|
174
|
-
const
|
|
173
|
+
const queryCostBytes = (_d = jobResult[2]) === null || _d === void 0 ? void 0 : _d.totalBytesProcessed;
|
|
174
|
+
const data = {
|
|
175
|
+
rows: jobResult[0],
|
|
176
|
+
totalRows,
|
|
177
|
+
runStats: {
|
|
178
|
+
queryCostBytes: queryCostBytes ? +queryCostBytes : undefined,
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
const schema = (_e = jobResult[2]) === null || _e === void 0 ? void 0 : _e.schema;
|
|
175
182
|
return { data, schema };
|
|
176
183
|
}
|
|
177
184
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-bigquery",
|
|
3
|
-
"version": "0.0.33
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@google-cloud/bigquery": "^5.5.0",
|
|
26
26
|
"@google-cloud/common": "^3.6.0",
|
|
27
27
|
"@google-cloud/paginator": "^4.0.1",
|
|
28
|
-
"@malloydata/malloy": "^0.0.33
|
|
28
|
+
"@malloydata/malloy": "^0.0.33",
|
|
29
29
|
"gaxios": "^4.2.0"
|
|
30
30
|
}
|
|
31
31
|
}
|