reaname services

This commit is contained in:
Dzmitry_Tamashevich@epam.com
2020-10-23 12:04:03 +03:00
committed by Daniel Hutzel
parent 30d5c789bc
commit 49b8f4ef95
7 changed files with 64 additions and 18 deletions

View File

@@ -89,7 +89,13 @@ const logProcessArgs = () => {
const insertQuery = constructInsertQuery(targetEntityName, targetColumns);
const srcEntityName = camelCaseToSnake(targetEntityName.split(".").pop());
let srcResultRows = await srcStorage.read(srcEntityName); // e.g. [ { AlbumId:1, ArtistId:1, Title:'some' }, ... ]
let srcResultRows;
try {
srcResultRows = await srcStorage.read(srcEntityName); // e.g. [ { AlbumId:1, ArtistId:1, Title:'some' }, ... ]
} catch (e) {
console.log("[ERROR]: while trying to read source table", e.message);
continue;
}
if (!srcResultRows || srcResultRows.length < ZERO_VALUE) {
console.log(
`[LOG] Skipping ${targetEntityName}.