( nodeId: string, textValue: string, inputData: DBTablesNodeData, rawConfig?: unknown, executionContext?: FlowExecutionContext, )
| 4697 | } |
| 4698 | |
| 4699 | async function executeGenerateRowsNode( |
| 4700 | nodeId: string, |
| 4701 | textValue: string, |
| 4702 | inputData: DBTablesNodeData, |
| 4703 | rawConfig?: unknown, |
| 4704 | executionContext?: FlowExecutionContext, |
| 4705 | ): Promise<NodeExecutionResult> { |
| 4706 | hotPathLog(executionContext, `Generate Rows Node ${nodeId}: Starting execution`); |
| 4707 | |
| 4708 | // 1. Parse configuration from textValue |
| 4709 | let config: { |
| 4710 | transformations: Array<{ |
| 4711 | sourceColumn: string; |
| 4712 | transformationType: |
| 4713 | | "none" |
| 4714 | | "prefix" |
| 4715 | | "suffix" |
| 4716 | | "add" |
| 4717 | | "subtract" |
| 4718 | | "multiply" |
| 4719 | | "divide" |
| 4720 | | "concatenate" |
| 4721 | | "formula" |
| 4722 | | "counter" |
| 4723 | | "counter_range" |
| 4724 | | "filterequal" |
| 4725 | | "filternotequal"; |
| 4726 | prefix?: string; |
| 4727 | suffix?: string; |
| 4728 | numericValue?: number; |
| 4729 | startNumber?: number; |
| 4730 | rangeStart?: string; // For counter_range (supports flow options) |
| 4731 | endNumber?: string; // For counter_range (supports flow options) |
| 4732 | rangeIncrement?: string; // For counter_range (supports flow options) |
| 4733 | separator?: string; |
| 4734 | formula?: string; |
| 4735 | filterValue?: string; |
| 4736 | outputColumnName: string; |
| 4737 | targetTableHandleId: string; // Which output table this transformation is for |
| 4738 | }>; |
| 4739 | outputTables: Array<{ |
| 4740 | handleId: string; |
| 4741 | name: string; |
| 4742 | existingTableName: string; |
| 4743 | tableVersion?: number; |
| 4744 | columnMapping: string[]; |
| 4745 | staticValues?: Record<string, string>; |
| 4746 | }>; |
| 4747 | DBNameToDBVersions?: Record<string, DBVersion[]>; |
| 4748 | customSchemaData?: Array<{ id: string; name: string; type: string }> | null; |
| 4749 | }; |
| 4750 | |
| 4751 | try { |
| 4752 | hotPathLog(executionContext, `Generate Rows Node ${nodeId}: textValue to parse:`, textValue); |
| 4753 | const parsedConfig = getNodeConfig<typeof config>(rawConfig, textValue); |
| 4754 | if (!parsedConfig) { |
| 4755 | throw new Error("Invalid configuration"); |
| 4756 | } |
no test coverage detected