@malloydata/db-bigquery 0.0.32-dev230414175311 → 0.0.32-dev230428002803
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.
|
@@ -87,6 +87,7 @@ export declare class BigQueryConnection implements Connection, PersistSQLResults
|
|
|
87
87
|
}>;
|
|
88
88
|
private createBigQueryJobAndGetResults;
|
|
89
89
|
private createBigQueryJob;
|
|
90
|
+
initiateJobAndGetLinkToConsole(sqlCommand: string, dryRun?: boolean): Promise<string>;
|
|
90
91
|
runSQLStream(sqlCommand: string, options?: Partial<BigQueryQueryOptions>): AsyncIterableIterator<QueryDataRow>;
|
|
91
92
|
close(): Promise<void>;
|
|
92
93
|
}
|
|
@@ -565,6 +565,14 @@ class BigQueryConnection {
|
|
|
565
565
|
});
|
|
566
566
|
return job;
|
|
567
567
|
}
|
|
568
|
+
async initiateJobAndGetLinkToConsole(sqlCommand, dryRun = false) {
|
|
569
|
+
const job = await this.createBigQueryJob({
|
|
570
|
+
query: sqlCommand,
|
|
571
|
+
dryRun,
|
|
572
|
+
});
|
|
573
|
+
const url = `https://console.cloud.google.com/bigquery?project=${this.projectId}&j=bq:${this.location}:${job.id}&page=queryresults`;
|
|
574
|
+
return url;
|
|
575
|
+
}
|
|
568
576
|
runSQLStream(sqlCommand, options = {}) {
|
|
569
577
|
const bigQuery = this.bigQuery;
|
|
570
578
|
function streamBigQuery(onError, onData, onEnd) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-bigquery",
|
|
3
|
-
"version": "0.0.32-
|
|
3
|
+
"version": "0.0.32-dev230428002803",
|
|
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.32-
|
|
28
|
+
"@malloydata/malloy": "^0.0.32-dev230428002803",
|
|
29
29
|
"gaxios": "^4.2.0"
|
|
30
30
|
}
|
|
31
31
|
}
|