@pittica/google-business-intelligence-csv 1.4.3 → 1.4.4
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/scripts/day.js +2 -2
- package/dist/scripts/file.js +1 -1
- package/package.json +5 -5
package/dist/scripts/day.js
CHANGED
|
@@ -57,7 +57,7 @@ exports.day = async (date, source = null, temporary = null, destination = null)
|
|
|
57
57
|
const day = formatDate(typeof date === "string" ? stringToDate(date) : date);
|
|
58
58
|
const now = getNow();
|
|
59
59
|
log.info(`Starting "${day}" day import...`);
|
|
60
|
-
|
|
60
|
+
exports.run(day, now, source ?? config.bucket.upload, temporary ?? config.bucket.temporary, destination ?? config.bucket.archive);
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
|
|
@@ -78,7 +78,7 @@ exports.run = async (day, now, source, temporary, destination) => {
|
|
|
78
78
|
const bucketSource = await storage.bucket(source);
|
|
79
79
|
const bucketTemporary = await storage.bucket(temporary);
|
|
80
80
|
const bucketDestination = await storage.bucket(destination);
|
|
81
|
-
getFiles(storage, source, `${day}-`).then(response =>
|
|
81
|
+
getFiles(storage, source, `${day}-`).then(response => exports.process(dataset, bucketSource, bucketTemporary, bucketDestination, sort(mapStorageResponse(response, config.files.sql)), now));
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
/**
|
package/dist/scripts/file.js
CHANGED
|
@@ -62,7 +62,7 @@ exports.file = async (name, bucketSource = null, bucketTemporary = null, bucketD
|
|
|
62
62
|
});
|
|
63
63
|
const day = getNow();
|
|
64
64
|
const table = await ds.table(getTemporaryTableName(filedata, config.dataset.temporary.prefix));
|
|
65
|
-
return await
|
|
65
|
+
return await exports.run(table, bucketDestination ?? config.bucket.archive, file, filedata, day, clean);
|
|
66
66
|
}
|
|
67
67
|
return false;
|
|
68
68
|
}).catch(logErrors);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pittica/google-business-intelligence-csv",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.4",
|
|
5
5
|
"description": "CSV importer for business intelligence for Google Cloud.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/pittica/google-business-intelligence-csv#README.md",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@pittica/google-bigquery-helpers": "^1.4.
|
|
28
|
+
"@pittica/google-bigquery-helpers": "^1.4.6",
|
|
29
29
|
"@pittica/google-business-intelligence-helpers": "^1.12.7",
|
|
30
|
-
"@pittica/google-cloud-storage-helpers": "^1.3.
|
|
31
|
-
"@pittica/logger-helpers": "^1.0.
|
|
30
|
+
"@pittica/google-cloud-storage-helpers": "^1.3.6",
|
|
31
|
+
"@pittica/logger-helpers": "^1.0.5",
|
|
32
32
|
"date-and-time": "^4.1.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@babel/cli": "^7.28.
|
|
35
|
+
"@babel/cli": "^7.28.6",
|
|
36
36
|
"mkdirp": "^3.0.1",
|
|
37
37
|
"prettier": "^3.7.4",
|
|
38
38
|
"rimraf": "^6.1.2"
|