{"prompt": [{"role": "system", "content": "You build CloverDX ETL graphs. Answer with a graph in the compact IR form:\n- with (Metadata, GraphParameters, Dictionary) and sections.\n- In each phase, every is followed by its outgoing .\n- Component properties are attributes; multi-line values (CTL2 code starting with //#CTL2, mappings) are CDATA children.\n- No GUI layout, edge ids or default values. Edges may omit metadata when it propagates from the input.\n- Project parameters from workspace.prm: ${DATAIN_DIR}, ${DATAOUT_DIR}, ${META_DIR}, ${LOOKUP_DIR}, ${ERROR_DIR}, ${PROJECT}.\n- When building a graph, first write ## Plan: Outputs; Flow (numbered chains `ID: what → ID: what`, a node with\n several outputs lists them as `- out N → ...` lines, `→ ID:1` feeds input port 1 of a node that has its own line);\n Records (how each node changes the record); Notes (sort requirements, lookup sides, phases); Phases; CTL.\n Then ## Graph, which must follow the plan exactly."}, {"role": "user", "content": "Child job: read products from parameter INPUT_FILE_URL (default ${DATAIN_DIR}/Retailers/LuxeMart/Products.csv, metadata ${META_DIR}/Product.fmt) with the controlled data policy, and send parse errors to ${ERROR_DIR}/Product_errors.csv (header, no empty file). Compute the average profitMargin per supplierName (input isn't sorted) into Supplier_Margins (pipe-delimited, CRLF; supplier string, profit_margin number) and write it with a header to OUTPUT_FILE_URL (default ${DATAOUT_DIR}/Retailers/${CLIENT}/Suppliers_Margin.csv), creating directories. INPUT_FILE_URL, OUTPUT_FILE_URL and CLIENT are public parameters.\n\nProject metadata files:\n- ${META_DIR}/Customer.fmt: Customer (delimited): id long, fullName string, streetAddress string, city string, postalCode string, state string, country string, email string, phone string, accountCreated date \"yyyy-MM-dd\", isActive boolean\n- ${META_DIR}/FlatFileReader_Error.fmt: FlatFileReader_Error (delimited): recordNo long, fieldNo integer, originalData string, errorMessage string, fileURL string\n- ${META_DIR}/Product.fmt: Product (delimited): productName string, productCode long, unitPrice decimal, supplierName string, profitMargin decimal\n- ${META_DIR}/Transactions.fmt: Transactions (fixed): TransactionId integer, CustomerId integer, Amount decimal, CurrencyId integer"}], "chosen": [{"role": "assistant", "content": "## Plan\nOutputs:\n- ERRORS: write ${ERROR_DIR}/Product_errors.csv\n- OUTPUT: write ${OUTPUT_FILE_URL}\n\nFlow:\n1. INPUT: read ${INPUT_FILE_URL}\n - out 0 → CALCULATE_PROFIT_MARGINS: aggregate per supplierName: profit_margin = avg(profitMargin) → OUTPUT: write ${OUTPUT_FILE_URL}\n - out 1 (parse errors) → ERRORS: write ${ERROR_DIR}/Product_errors.csv\n\nRecords:\n- INPUT → Product: productName string, productCode long, unitPrice decimal, supplierName string, profitMargin decimal\n- INPUT → FlatFileReader_Error: recordNo long, fieldNo integer, originalData string, errorMessage string, fileURL string\n- CALCULATE_PROFIT_MARGINS: Product → Supplier_Margins: supplier string, profit_margin number\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "rejected": [{"role": "assistant", "content": "## Plan\nOutputs:\n- ERRORS: write ${ERROR_DIR}/Product_errors.csv\n- OUTPUT: write ${OUTPUT_FILE_URL}\n\nFlow:\n1. INPUT: read ${INPUT_FILE_URL}\n - out 0 → CALCULATE_PROFIT_MARGINS: aggregate per supplierName: profit_margin = avg(profitMargin) → OUTPUT: write ${OUTPUT_FILE_URL}\n - out 1 (parse errors) → ERRORS: write ${ERROR_DIR}/Product_errors.csv\n\nRecords:\n- INPUT → FlatFileReader_Error: recordNo long, fieldNo integer, originalData string, errorMessage string, fileURL string\n- CALCULATE_PROFIT_MARGINS: Metadata0_v2 → Supplier_Margins: +supplier string, +profit_margin number\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "type": "syntax", "graph": "graph__Example3-Jobflow__Integration_ProcessProducts.grf", "group": "example3", "kind": "edge_meta_ref"} {"prompt": [{"role": "system", "content": "You build CloverDX ETL graphs. Answer with a graph in the compact IR form:\n- with (Metadata, GraphParameters, Dictionary) and sections.\n- In each phase, every is followed by its outgoing .\n- Component properties are attributes; multi-line values (CTL2 code starting with //#CTL2, mappings) are CDATA children.\n- No GUI layout, edge ids or default values. Edges may omit metadata when it propagates from the input.\n- Project parameters from workspace.prm: ${DATAIN_DIR}, ${DATAOUT_DIR}, ${META_DIR}, ${LOOKUP_DIR}, ${ERROR_DIR}, ${PROJECT}.\n- When building a graph, first write ## Plan: Outputs; Flow (numbered chains `ID: what → ID: what`, a node with\n several outputs lists them as `- out N → ...` lines, `→ ID:1` feeds input port 1 of a node that has its own line);\n Records (how each node changes the record); Notes (sort requirements, lookup sides, phases); Phases; CTL.\n Then ## Graph, which must follow the plan exactly."}, {"role": "user", "content": "Child job: read products from parameter INPUT_FILE_URL (default ${DATAIN_DIR}/Retailers/LuxeMart/Products.csv, metadata ${META_DIR}/Product.fmt) with the controlled data policy, and send parse errors to ${ERROR_DIR}/Product_errors.csv (header, no empty file). Compute the average profitMargin per supplierName (input isn't sorted) into Supplier_Margins (pipe-delimited, CRLF; supplier string, profit_margin number) and write it with a header to OUTPUT_FILE_URL (default ${DATAOUT_DIR}/Retailers/${CLIENT}/Suppliers_Margin.csv), creating directories. INPUT_FILE_URL, OUTPUT_FILE_URL and CLIENT are public parameters.\n\nProject metadata files:\n- ${META_DIR}/Customer.fmt: Customer (delimited): id long, fullName string, streetAddress string, city string, postalCode string, state string, country string, email string, phone string, accountCreated date \"yyyy-MM-dd\", isActive boolean\n- ${META_DIR}/FlatFileReader_Error.fmt: FlatFileReader_Error (delimited): recordNo long, fieldNo integer, originalData string, errorMessage string, fileURL string\n- ${META_DIR}/Product.fmt: Product (delimited): productName string, productCode long, unitPrice decimal, supplierName string, profitMargin decimal\n- ${META_DIR}/Transactions.fmt: Transactions (fixed): TransactionId integer, CustomerId integer, Amount decimal, CurrencyId integer"}], "chosen": [{"role": "assistant", "content": "## Plan\nOutputs:\n- ERRORS: write ${ERROR_DIR}/Product_errors.csv\n- OUTPUT: write ${OUTPUT_FILE_URL}\n\nFlow:\n1. INPUT: read ${INPUT_FILE_URL}\n - out 0 → CALCULATE_PROFIT_MARGINS: aggregate per supplierName: profit_margin = avg(profitMargin) → OUTPUT: write ${OUTPUT_FILE_URL}\n - out 1 (parse errors) → ERRORS: write ${ERROR_DIR}/Product_errors.csv\n\nRecords:\n- INPUT → Product: productName string, productCode long, unitPrice decimal, supplierName string, profitMargin decimal\n- INPUT → FlatFileReader_Error: recordNo long, fieldNo integer, originalData string, errorMessage string, fileURL string\n- CALCULATE_PROFIT_MARGINS: Product → Supplier_Margins: supplier string, profit_margin number\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "rejected": [{"role": "assistant", "content": "## Plan\nOutputs:\n- ERRORS: write ${ERROR_DIR}/Product_errors.csv\n- OUTPUT: write ${OUTPUT_FILE_URL}\n\nFlow:\n1. INPUT: read ${INPUT_FILE_URL}\n - out 0 → CALCULATE_PROFIT_MARGINS: aggregate per supplierName: profit_margin = avg(profitMargin) → OUTPUT: write ${OUTPUT_FILE_URL}\n - out 1 (parse errors) → ERRORS: write ${ERROR_DIR}/Product_errors.csv\n\nRecords:\n- INPUT → FlatFileReader_Error: recordNo long, fieldNo integer, originalData string, errorMessage string, fileURL string\n- CALCULATE_PROFIT_MARGINS → Supplier_Margins: supplier string, profit_margin number\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "type": "syntax", "graph": "graph__Example3-Jobflow__Integration_ProcessProducts.grf", "group": "example3", "kind": "edge_meta_missing"} {"prompt": [{"role": "system", "content": "You build CloverDX ETL graphs. Answer with a graph in the compact IR form:\n- with (Metadata, GraphParameters, Dictionary) and sections.\n- In each phase, every is followed by its outgoing .\n- Component properties are attributes; multi-line values (CTL2 code starting with //#CTL2, mappings) are CDATA children.\n- No GUI layout, edge ids or default values. Edges may omit metadata when it propagates from the input.\n- Project parameters from workspace.prm: ${DATAIN_DIR}, ${DATAOUT_DIR}, ${META_DIR}, ${LOOKUP_DIR}, ${ERROR_DIR}, ${PROJECT}.\n- When building a graph, first write ## Plan: Outputs; Flow (numbered chains `ID: what → ID: what`, a node with\n several outputs lists them as `- out N → ...` lines, `→ ID:1` feeds input port 1 of a node that has its own line);\n Records (how each node changes the record); Notes (sort requirements, lookup sides, phases); Phases; CTL.\n Then ## Graph, which must follow the plan exactly."}, {"role": "user", "content": "Child job: read products from parameter INPUT_FILE_URL (default ${DATAIN_DIR}/Retailers/LuxeMart/Products.csv, metadata ${META_DIR}/Product.fmt) with the controlled data policy, and send parse errors to ${ERROR_DIR}/Product_errors.csv (header, no empty file). Compute the average profitMargin per supplierName (input isn't sorted) into Supplier_Margins (pipe-delimited, CRLF; supplier string, profit_margin number) and write it with a header to OUTPUT_FILE_URL (default ${DATAOUT_DIR}/Retailers/${CLIENT}/Suppliers_Margin.csv), creating directories. INPUT_FILE_URL, OUTPUT_FILE_URL and CLIENT are public parameters.\n\nProject metadata files:\n- ${META_DIR}/Customer.fmt: Customer (delimited): id long, fullName string, streetAddress string, city string, postalCode string, state string, country string, email string, phone string, accountCreated date \"yyyy-MM-dd\", isActive boolean\n- ${META_DIR}/FlatFileReader_Error.fmt: FlatFileReader_Error (delimited): recordNo long, fieldNo integer, originalData string, errorMessage string, fileURL string\n- ${META_DIR}/Product.fmt: Product (delimited): productName string, productCode long, unitPrice decimal, supplierName string, profitMargin decimal\n- ${META_DIR}/Transactions.fmt: Transactions (fixed): TransactionId integer, CustomerId integer, Amount decimal, CurrencyId integer"}], "chosen": [{"role": "assistant", "content": "## Plan\nOutputs:\n- ERRORS: write ${ERROR_DIR}/Product_errors.csv\n- OUTPUT: write ${OUTPUT_FILE_URL}\n\nFlow:\n1. INPUT: read ${INPUT_FILE_URL}\n - out 0 → CALCULATE_PROFIT_MARGINS: aggregate per supplierName: profit_margin = avg(profitMargin) → OUTPUT: write ${OUTPUT_FILE_URL}\n - out 1 (parse errors) → ERRORS: write ${ERROR_DIR}/Product_errors.csv\n\nRecords:\n- INPUT → Product: productName string, productCode long, unitPrice decimal, supplierName string, profitMargin decimal\n- INPUT → FlatFileReader_Error: recordNo long, fieldNo integer, originalData string, errorMessage string, fileURL string\n- CALCULATE_PROFIT_MARGINS: Product → Supplier_Margins: supplier string, profit_margin number\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "rejected": [{"role": "assistant", "content": "## Plan\nOutputs:\n- ERRORS: write ${ERROR_DIR}/Product_errors.csv\n- OUTPUT: write ${OUTPUT_FILE_URL}\n\nFlow:\n1. INPUT: read ${INPUT_FILE_URL}\n - out 0 → CALCULATE_PROFIT_MARGINS: aggregate per supplier_name: profit_margin = avg(profitMargin) → OUTPUT: write ${OUTPUT_FILE_URL}\n - out 1 (parse errors) → ERRORS: write ${ERROR_DIR}/Product_errors.csv\n\nRecords:\n- INPUT → Product: productName string, productCode long, unitPrice decimal, supplierName string, profitMargin decimal\n- INPUT → FlatFileReader_Error: recordNo long, fieldNo integer, originalData string, errorMessage string, fileURL string\n- CALCULATE_PROFIT_MARGINS: Product → Supplier_Margins: supplier string, profit_margin number\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "type": "syntax", "graph": "graph__Example3-Jobflow__Integration_ProcessProducts.grf", "group": "example3", "kind": "key_field"} {"prompt": [{"role": "system", "content": "You build CloverDX ETL graphs. Answer with a graph in the compact IR form:\n- with (Metadata, GraphParameters, Dictionary) and sections.\n- In each phase, every is followed by its outgoing .\n- Component properties are attributes; multi-line values (CTL2 code starting with //#CTL2, mappings) are CDATA children.\n- No GUI layout, edge ids or default values. Edges may omit metadata when it propagates from the input.\n- Project parameters from workspace.prm: ${DATAIN_DIR}, ${DATAOUT_DIR}, ${META_DIR}, ${LOOKUP_DIR}, ${ERROR_DIR}, ${PROJECT}.\n- When building a graph, first write ## Plan: Outputs; Flow (numbered chains `ID: what → ID: what`, a node with\n several outputs lists them as `- out N → ...` lines, `→ ID:1` feeds input port 1 of a node that has its own line);\n Records (how each node changes the record); Notes (sort requirements, lookup sides, phases); Phases; CTL.\n Then ## Graph, which must follow the plan exactly."}, {"role": "user", "content": "Runtime contract probe P904 for DataIntersection.\n\nTwo inputs suite_v5/data-in/P904_input_0.csv and P904_input_1.csv: pipe-delimited, quoted, __NULL__ for null, en.US, strict, fields key_id and value_cd as text. Decode key_id to integer.\n\nIntersect on key_id with nulls treated as equal and duplicate keys allowed. Matched pairs: key_id from the right side, pair_txt = left value_cd + ':' + right value_cd. transformLeftOnly and transformRightOnly must raise errors LEFT_HOOK_CALLED / RIGHT_HOOK_CALLED, so the run proves they are not called. Encode the left-only, matched and right-only outputs to text and write suite_v5/data-out/P904_out_0/1/2.csv in the input format."}], "chosen": [{"role": "assistant", "content": "## Plan\nOutputs:\n- Writer0: write suite_v5/data-out/P904_out_0.csv\n- Writer1: write suite_v5/data-out/P904_out_1.csv\n- Writer2: write suite_v5/data-out/P904_out_2.csv\n\nFlow:\n1. Reader0: read suite_v5/data-in/P904_input_0.csv → Decode0: map (CTL) → Test\n2. Reader1: read suite_v5/data-in/P904_input_1.csv → Decode1: map (CTL) → Test:1\n3. Test: intersect on key_id = key_id (CTL)\n - out 0 (only in input 0) → Encode0: map (CTL) → Writer0: write suite_v5/data-out/P904_out_0.csv\n - out 1 (in both) → Encode1: map (CTL) → Writer1: write suite_v5/data-out/P904_out_1.csv\n - out 2 (only in input 1) → Encode2: map (CTL) → Writer2: write suite_v5/data-out/P904_out_2.csv\n\nRecords:\n- Reader0 → RawInput0: key_id string, value_cd string\n- Decode0: RawInput0 → Side: ~key_id string→integer\n- Reader1 → RawInput1: key_id string, value_cd string\n- Decode1: RawInput1 → Side: ~key_id string→integer\n- Test: Side + Side → Side (same fields)\n- Test: Side + Side → Both: +pair_txt string, -value_cd\n- Encode0: Side → RawOutput0: ~key_id integer→string\n- Encode1: Both → RawOutput1: ~key_id integer→string\n- Encode2: Side → RawOutput2: ~key_id integer→string\n\nNotes:\n- Test: an intersection needs inputs sorted on the key: input 0 by key_id (no sort upstream: assumes Reader0 delivers it sorted); input 1 by key_id (no sort upstream: assumes Reader1 delivers it sorted).\n\nCTL: Decode0.transform, Decode1.transform, Test.transform, Encode0.transform, Encode1.transform, Encode2.transform\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "rejected": [{"role": "assistant", "content": "## Plan\nOutputs:\n- Writer0: write suite_v5/data-out/P904_out_0.csv\n- Writer1: write suite_v5/data-out/P904_out_1.csv\n- Writer2: write suite_v5/data-out/P904_out_2.csv\n\nFlow:\n1. Reader0: read suite_v5/data-in/P904_input_0.csv → Decode0: map (CTL) → Test\n2. Reader1: read suite_v5/data-in/P904_input_1.csv → Decode1: map (CTL) → Test:1\n3. Test: intersect on key_id = key_id (CTL)\n - out 0 (only in input 0) → Encode0: map (CTL) → Writer0: write suite_v5/data-out/P904_out_0.csv\n - out 1 (in both) → Encode1: map (CTL) → Writer1: write suite_v5/data-out/P904_out_1.csv\n - out 2 (only in input 1) → Encode2: map (CTL) → Writer2: write suite_v5/data-out/P904_out_2.csv\n\nRecords:\n- Decode0 → Side: key_id integer, value_cd string\n- Reader1 → RawInput1: key_id string, value_cd string\n- Decode1: RawInput1 → Side: ~key_id string→integer\n- Test: Side + Side → Side (same fields)\n- Test: Side + Side → Both: +pair_txt string, -value_cd\n- Encode0: Side → RawOutput0: ~key_id integer→string\n- Encode1: Both → RawOutput1: ~key_id integer→string\n- Encode2: Side → RawOutput2: ~key_id integer→string\n\nNotes:\n- Test: an intersection needs inputs sorted on the key: input 0 by key_id (no sort upstream: assumes Reader0 delivers it sorted); input 1 by key_id (no sort upstream: assumes Reader1 delivers it sorted).\n\nCTL: Decode0.transform, Decode1.transform, Test.transform, Encode0.transform, Encode1.transform, Encode2.transform\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "type": "syntax", "graph": "suite_v5__graph__P904.grf", "group": "suite_v5", "kind": "edge_meta_missing"} {"prompt": [{"role": "system", "content": "You build CloverDX ETL graphs. Answer with a graph in the compact IR form:\n- with (Metadata, GraphParameters, Dictionary) and sections.\n- In each phase, every is followed by its outgoing .\n- Component properties are attributes; multi-line values (CTL2 code starting with //#CTL2, mappings) are CDATA children.\n- No GUI layout, edge ids or default values. Edges may omit metadata when it propagates from the input.\n- Project parameters from workspace.prm: ${DATAIN_DIR}, ${DATAOUT_DIR}, ${META_DIR}, ${LOOKUP_DIR}, ${ERROR_DIR}, ${PROJECT}.\n- When building a graph, first write ## Plan: Outputs; Flow (numbered chains `ID: what → ID: what`, a node with\n several outputs lists them as `- out N → ...` lines, `→ ID:1` feeds input port 1 of a node that has its own line);\n Records (how each node changes the record); Notes (sort requirements, lookup sides, phases); Phases; CTL.\n Then ## Graph, which must follow the plan exactly."}, {"role": "user", "content": "Runtime contract probe P904 for DataIntersection.\n\nTwo inputs suite_v5/data-in/P904_input_0.csv and P904_input_1.csv: pipe-delimited, quoted, __NULL__ for null, en.US, strict, fields key_id and value_cd as text. Decode key_id to integer.\n\nIntersect on key_id with nulls treated as equal and duplicate keys allowed. Matched pairs: key_id from the right side, pair_txt = left value_cd + ':' + right value_cd. transformLeftOnly and transformRightOnly must raise errors LEFT_HOOK_CALLED / RIGHT_HOOK_CALLED, so the run proves they are not called. Encode the left-only, matched and right-only outputs to text and write suite_v5/data-out/P904_out_0/1/2.csv in the input format."}], "chosen": [{"role": "assistant", "content": "## Plan\nOutputs:\n- Writer0: write suite_v5/data-out/P904_out_0.csv\n- Writer1: write suite_v5/data-out/P904_out_1.csv\n- Writer2: write suite_v5/data-out/P904_out_2.csv\n\nFlow:\n1. Reader0: read suite_v5/data-in/P904_input_0.csv → Decode0: map (CTL) → Test\n2. Reader1: read suite_v5/data-in/P904_input_1.csv → Decode1: map (CTL) → Test:1\n3. Test: intersect on key_id = key_id (CTL)\n - out 0 (only in input 0) → Encode0: map (CTL) → Writer0: write suite_v5/data-out/P904_out_0.csv\n - out 1 (in both) → Encode1: map (CTL) → Writer1: write suite_v5/data-out/P904_out_1.csv\n - out 2 (only in input 1) → Encode2: map (CTL) → Writer2: write suite_v5/data-out/P904_out_2.csv\n\nRecords:\n- Reader0 → RawInput0: key_id string, value_cd string\n- Decode0: RawInput0 → Side: ~key_id string→integer\n- Reader1 → RawInput1: key_id string, value_cd string\n- Decode1: RawInput1 → Side: ~key_id string→integer\n- Test: Side + Side → Side (same fields)\n- Test: Side + Side → Both: +pair_txt string, -value_cd\n- Encode0: Side → RawOutput0: ~key_id integer→string\n- Encode1: Both → RawOutput1: ~key_id integer→string\n- Encode2: Side → RawOutput2: ~key_id integer→string\n\nNotes:\n- Test: an intersection needs inputs sorted on the key: input 0 by key_id (no sort upstream: assumes Reader0 delivers it sorted); input 1 by key_id (no sort upstream: assumes Reader1 delivers it sorted).\n\nCTL: Decode0.transform, Decode1.transform, Test.transform, Encode0.transform, Encode1.transform, Encode2.transform\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "rejected": [{"role": "assistant", "content": "## Plan\nOutputs:\n- Writer0: write suite_v5/data-out/P904_out_0.csv\n- Writer1: write suite_v5/data-out/P904_out_1.csv\n- Writer2: write suite_v5/data-out/P904_out_2.csv\n\nFlow:\n1. Reader0: read suite_v5/data-in/P904_input_0.csv → Decode0: map (CTL) → Test\n2. Reader1: read suite_v5/data-in/P904_input_1.csv → Decode1: map (CTL) → Test:1\n3. Test: intersect on key_id = key_id (CTL)\n - out 0 (only in input 0) → Encode0: map (CTL) → Writer0: write suite_v5/data-out/P904_out_0.csv\n - out 1 (in both) → Encode1: map (CTL) → Writer1: write suite_v5/data-out/P904_out_1.csv\n - out 2 (only in input 1) → Encode2: map (CTL) → Writer2: write suite_v5/data-out/P904_out_2.csv\n\nRecords:\n- Reader0 → RawInput0: key_id string, value_cd string\n- Decode0: RawInput0 → Side: ~key_id string→integer\n- Reader1 → RawInput1: key_id string, value_cd string\n- Decode1: RawInput1 → Side: ~key_id string→integer\n- Test: Side + Side → Side (same fields)\n- Test: Side + Side → Both: +pair_txt string, -value_cd\n- Encode0: Side → RawOutput0: ~key_id integer→string\n- Encode1: Both → RawOutput1: ~key_id integer→string\n- Encode2: Side → RawOutput2: ~key_id integer→string\n\nNotes:\n- Test: an intersection needs inputs sorted on the key: input 0 by key_id (no sort upstream: assumes Reader0 delivers it sorted); input 1 by key_id (no sort upstream: assumes Reader1 delivers it sorted).\n\nCTL: Decode0.transform, Decode1.transform, Test.transform, Encode0.transform, Encode1.transform, Encode2.transform\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "type": "syntax", "graph": "suite_v5__graph__P904.grf", "group": "suite_v5", "kind": "ctl_field"} {"prompt": [{"role": "system", "content": "You build CloverDX ETL graphs. Answer with a graph in the compact IR form:\n- with (Metadata, GraphParameters, Dictionary) and sections.\n- In each phase, every is followed by its outgoing .\n- Component properties are attributes; multi-line values (CTL2 code starting with //#CTL2, mappings) are CDATA children.\n- No GUI layout, edge ids or default values. Edges may omit metadata when it propagates from the input.\n- Project parameters from workspace.prm: ${DATAIN_DIR}, ${DATAOUT_DIR}, ${META_DIR}, ${LOOKUP_DIR}, ${ERROR_DIR}, ${PROJECT}.\n- When building a graph, first write ## Plan: Outputs; Flow (numbered chains `ID: what → ID: what`, a node with\n several outputs lists them as `- out N → ...` lines, `→ ID:1` feeds input port 1 of a node that has its own line);\n Records (how each node changes the record); Notes (sort requirements, lookup sides, phases); Phases; CTL.\n Then ## Graph, which must follow the plan exactly."}, {"role": "user", "content": "Runtime contract probe P904 for DataIntersection.\n\nTwo inputs suite_v5/data-in/P904_input_0.csv and P904_input_1.csv: pipe-delimited, quoted, __NULL__ for null, en.US, strict, fields key_id and value_cd as text. Decode key_id to integer.\n\nIntersect on key_id with nulls treated as equal and duplicate keys allowed. Matched pairs: key_id from the right side, pair_txt = left value_cd + ':' + right value_cd. transformLeftOnly and transformRightOnly must raise errors LEFT_HOOK_CALLED / RIGHT_HOOK_CALLED, so the run proves they are not called. Encode the left-only, matched and right-only outputs to text and write suite_v5/data-out/P904_out_0/1/2.csv in the input format."}], "chosen": [{"role": "assistant", "content": "## Plan\nOutputs:\n- Writer0: write suite_v5/data-out/P904_out_0.csv\n- Writer1: write suite_v5/data-out/P904_out_1.csv\n- Writer2: write suite_v5/data-out/P904_out_2.csv\n\nFlow:\n1. Reader0: read suite_v5/data-in/P904_input_0.csv → Decode0: map (CTL) → Test\n2. Reader1: read suite_v5/data-in/P904_input_1.csv → Decode1: map (CTL) → Test:1\n3. Test: intersect on key_id = key_id (CTL)\n - out 0 (only in input 0) → Encode0: map (CTL) → Writer0: write suite_v5/data-out/P904_out_0.csv\n - out 1 (in both) → Encode1: map (CTL) → Writer1: write suite_v5/data-out/P904_out_1.csv\n - out 2 (only in input 1) → Encode2: map (CTL) → Writer2: write suite_v5/data-out/P904_out_2.csv\n\nRecords:\n- Reader0 → RawInput0: key_id string, value_cd string\n- Decode0: RawInput0 → Side: ~key_id string→integer\n- Reader1 → RawInput1: key_id string, value_cd string\n- Decode1: RawInput1 → Side: ~key_id string→integer\n- Test: Side + Side → Side (same fields)\n- Test: Side + Side → Both: +pair_txt string, -value_cd\n- Encode0: Side → RawOutput0: ~key_id integer→string\n- Encode1: Both → RawOutput1: ~key_id integer→string\n- Encode2: Side → RawOutput2: ~key_id integer→string\n\nNotes:\n- Test: an intersection needs inputs sorted on the key: input 0 by key_id (no sort upstream: assumes Reader0 delivers it sorted); input 1 by key_id (no sort upstream: assumes Reader1 delivers it sorted).\n\nCTL: Decode0.transform, Decode1.transform, Test.transform, Encode0.transform, Encode1.transform, Encode2.transform\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "rejected": [{"role": "assistant", "content": "## Plan\nOutputs:\n- Writer0: write suite_v5/data-out/P904_out_0.csv\n- Writer1: write suite_v5/data-out/P904_out_1.csv\n- Writer2: write suite_v5/data-out/P904_out_2.csv\n\nFlow:\n1. Reader0: read suite_v5/data-in/P904_input_0.csv → Decode0: map (CTL) → Test\n2. Reader1: read suite_v5/data-in/P904_input_1.csv → Decode1: map (CTL) → Test:1\n3. Test: intersect on keyId = key_id (CTL)\n - out 0 (only in input 0) → Encode0: map (CTL) → Writer0: write suite_v5/data-out/P904_out_0.csv\n - out 1 (in both) → Encode1: map (CTL) → Writer1: write suite_v5/data-out/P904_out_1.csv\n - out 2 (only in input 1) → Encode2: map (CTL) → Writer2: write suite_v5/data-out/P904_out_2.csv\n\nRecords:\n- Reader0 → RawInput0: key_id string, value_cd string\n- Decode0: RawInput0 → Side: ~key_id string→integer\n- Reader1 → RawInput1: key_id string, value_cd string\n- Decode1: RawInput1 → Side: ~key_id string→integer\n- Test: Side + Side → Side (same fields)\n- Test: Side + Side → Both: +pair_txt string, -value_cd\n- Encode0: Side → RawOutput0: ~key_id integer→string\n- Encode1: Both → RawOutput1: ~key_id integer→string\n- Encode2: Side → RawOutput2: ~key_id integer→string\n\nNotes:\n- Test: an intersection needs inputs sorted on the key: input 0 by keyId (no sort upstream: assumes Reader0 delivers it sorted); input 1 by key_id (no sort upstream: assumes Reader1 delivers it sorted).\n\nCTL: Decode0.transform, Decode1.transform, Test.transform, Encode0.transform, Encode1.transform, Encode2.transform\n\n## Graph\n```xml\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```"}], "type": "syntax", "graph": "suite_v5__graph__P904.grf", "group": "suite_v5", "kind": "key_field"}