Browse Source

(*)数据采集过滤掉临时表

master
peng.peng 2 years ago
parent
commit
6ee995cd74
  1. 8
      api/app/lib/controllers/metadataAcquisition/taskHandle.js

8
api/app/lib/controllers/metadataAcquisition/taskHandle.js

@ -21,7 +21,13 @@ async function handleTask(app, task) {
if (dataSource) {
const dbOptions = createDbOptions(dataSource.config);
const automate = new Automate(dbOptions, {});
const tables = await automate.getTables(); //获取当前采集任务数据源pg库表字段索引外键数据
const tablesOrign = await automate.getTables(); //获取当前采集任务数据源pg库表字段索引外键数据
const tables = {}
Object.keys(tablesOrign).forEach(key => {
if (key.indexOf('_airbyte_raw') < 0) { //过滤掉临时表 后端同步的库里存在临时表(_airbyte_raw开头)
tables[key] = tablesOrign[key]
}
})
const dataToSave = {
code: dataSource.config.database,
name: dataSource.config.database,

Loading…
Cancel
Save