import { EnapoGidMappingDataSource } from "../../datasources/gid-mapping/EnapoGidMappingDataSource"; import { EnapoGidMappingRepository } from "../../repositories/EnapoGidMappingRepository"; import { EnapoGidMappingNormalizer } from "../../helpers/EnapoGidMappingNormalizer"; import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector"; import { ILogger } from "@golemio/core/dist/helpers/logger/LoggerProvider"; import { AbstractTask } from "@golemio/core/dist/integration-engine"; /** * Syncs the ded_gid_mapping CSV export (blob storage) into energetics.enapo_gid_mapping. * * Runs on a daily cron so a new consumption point or a changed mapping in the source reaches production * the next day at the latest. The write is upsert-only (never delete), so a mapping missing from a later * export stays in the table, and running twice over the same input yields the same result. The refresh * takes no parameters - it always ingests the whole export - so there is nothing to validate and the * schema is deliberately undefined. * * The producer delivers the full export (unsupported commodities and junk included) and cannot be forced * to clean it, so rows we cannot process are skipped and logged as a warning rather than failing the run. */ export declare class EnapoGidMappingSyncTask extends AbstractTask> { private logger; private dbConnector; private datasource; private normalizer; private repository; queueName: string; queueTtl: number; protected schema: undefined; /** * The whole export goes in as a single insert per batch, so the batch has to stay below the Postgres * bind-parameter limit (65535); eight columns per row leave room for well over this many. */ private static readonly SAVE_BATCH_SIZE; constructor(logger: ILogger, dbConnector: IDatabaseConnector, datasource: EnapoGidMappingDataSource, normalizer: EnapoGidMappingNormalizer, repository: EnapoGidMappingRepository); execute(): Promise; /** * The routine outcome of a run, including the water/heat rows that are filtered out on purpose. This * is expected volume, so it never warns - it only has to stay visible. */ private logOutcome; /** * Rows that should have been usable but were not. Kept separate from the out-of-scope count so a * large expected filter volume cannot hide a handful of real defects. */ private logSkipped; }