@8ms/helpers 1.40.2 → 1.40.3
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import getClient from "
|
|
1
|
+
import getClient from "../storage/getClient.mjs";
|
|
2
|
+
import getClient$1 from "./getClient.mjs";
|
|
2
3
|
import isTableExists from "./IsTableExists.mjs";
|
|
3
|
-
import getClient$1 from "../storage/getClient.mjs";
|
|
4
4
|
//#region src/google/bigQuery/loadData.ts
|
|
5
5
|
/**
|
|
6
6
|
* Load data into a given table.
|
|
@@ -11,8 +11,8 @@ const loadData = async ({ file, table }) => {
|
|
|
11
11
|
projectId: table.projectId,
|
|
12
12
|
tableId: table.tableId
|
|
13
13
|
})) {
|
|
14
|
-
let bigqueryClient = getClient({ projectId: table.projectId });
|
|
15
|
-
let storageClient = getClient
|
|
14
|
+
let bigqueryClient = getClient$1({ projectId: table.projectId });
|
|
15
|
+
let storageClient = getClient({ projectId: file.projectId });
|
|
16
16
|
await bigqueryClient.dataset(table.datasetId).table(table.tableId).load(storageClient.bucket(file.bucket).file(file.key), file.metadata);
|
|
17
17
|
}
|
|
18
18
|
};
|