diff --git a/ui/app/mirrors/create/handlers.ts b/ui/app/mirrors/create/handlers.ts index 5654c480a2..9da47bb4b4 100644 --- a/ui/app/mirrors/create/handlers.ts +++ b/ui/app/mirrors/create/handlers.ts @@ -32,9 +32,12 @@ const validateFlowFields = ( }; const reformattedTableMapping = (tableMapping: TableMapRow[]) => { - const mapping: { [key: string]: string } = {}; - tableMapping.forEach((row) => { - mapping[row.source] = row.destination; + const mapping = tableMapping.map((row) => { + return { + sourceTableIdentifier: row.source, + destinationTableIdentifier: row.destination, + partitionKey: '', + }; }); return mapping; }; @@ -58,7 +61,7 @@ export const handleCreate = async ( const isValid = validateFlowFields(rows, setMsg, config); if (!isValid) return; const tableNameMapping = reformattedTableMapping(rows); - config['tableNameMapping'] = tableNameMapping; + config['tableMappings'] = tableNameMapping; config['flowJobName'] = flowJobName; setLoading(true); const statusMessage = await fetch('/api/mirrors/cdc', { diff --git a/ui/app/mirrors/create/helpers/common.ts b/ui/app/mirrors/create/helpers/common.ts index f7a5384e9f..9f15e676a9 100644 --- a/ui/app/mirrors/create/helpers/common.ts +++ b/ui/app/mirrors/create/helpers/common.ts @@ -20,7 +20,7 @@ export const blankCDCSetting: FlowConnectionConfigs = { destination: undefined, flowJobName: '', tableSchema: undefined, - tableNameMapping: {}, + tableMappings: [], srcTableIdNameMapping: {}, tableNameSchemaMapping: {}, metadataPeer: undefined,