@malloydata/db-bigquery 0.0.166-dev240815161035 → 0.0.166
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.
|
@@ -2,7 +2,7 @@ import { RowMetadata } from '@google-cloud/bigquery';
|
|
|
2
2
|
import bigquery from '@google-cloud/bigquery/build/src/types';
|
|
3
3
|
import { ResourceStream } from '@google-cloud/paginator';
|
|
4
4
|
import { Connection, ConnectionConfig, FetchSchemaOptions, MalloyQueryData, PersistSQLResults, QueryData, QueryDataRow, QueryOptionsReader, QueryRunStats, RunSQLOptions, SQLBlock, StreamingConnection, StructDef } from '@malloydata/malloy';
|
|
5
|
-
import { BaseConnection } from '@malloydata/malloy/connection';
|
|
5
|
+
import { BaseConnection, TableMetadata } from '@malloydata/malloy/connection';
|
|
6
6
|
export interface BigQueryManagerOptions {
|
|
7
7
|
credentials?: {
|
|
8
8
|
clientId: string;
|
|
@@ -100,6 +100,7 @@ export declare class BigQueryConnection extends BaseConnection implements Connec
|
|
|
100
100
|
private createBigQueryJob;
|
|
101
101
|
initiateJobAndGetLinkToConsole(sqlCommand: string, dryRun?: boolean): Promise<string>;
|
|
102
102
|
runSQLStream(sqlCommand: string, { rowLimit, abortSignal }?: RunSQLOptions): AsyncIterableIterator<QueryDataRow>;
|
|
103
|
+
fetchTableMetadata(tablePath: string): Promise<TableMetadata>;
|
|
103
104
|
close(): Promise<void>;
|
|
104
105
|
}
|
|
105
106
|
export {};
|
|
@@ -602,6 +602,12 @@ class BigQueryConnection extends connection_1.BaseConnection {
|
|
|
602
602
|
};
|
|
603
603
|
return (0, malloy_1.toAsyncGenerator)(streamBigQuery);
|
|
604
604
|
}
|
|
605
|
+
async fetchTableMetadata(tablePath) {
|
|
606
|
+
const tablePathInfo = tablePath.split('.');
|
|
607
|
+
return {
|
|
608
|
+
url: `https://console.cloud.google.com/bigquery?ws=!1m5!1m4!4m3!1s${tablePathInfo[0]}!2s${tablePathInfo[1]}!3s${tablePathInfo[2]}`,
|
|
609
|
+
};
|
|
610
|
+
}
|
|
605
611
|
async close() {
|
|
606
612
|
return;
|
|
607
613
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-bigquery",
|
|
3
|
-
"version": "0.0.166
|
|
3
|
+
"version": "0.0.166",
|
|
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": "^7.3.0",
|
|
26
26
|
"@google-cloud/common": "^5.0.1",
|
|
27
27
|
"@google-cloud/paginator": "^5.0.0",
|
|
28
|
-
"@malloydata/malloy": "^0.0.166
|
|
28
|
+
"@malloydata/malloy": "^0.0.166",
|
|
29
29
|
"gaxios": "^4.2.0"
|
|
30
30
|
}
|
|
31
31
|
}
|