{
  "version": "2.0.0",
  "exportedAt": "2026-03-08T16:25:16.177Z",
  "pipeline": {
    "id": "pipeline-1772985143818",
    "name": "Shipment CSV+XML Enrichment",
    "label": "Ad-hoc CSV+XML Data Wrangling",
    "version": "1.0.0",
    "changeVersion": 1843,
    "variables": {
      "ResultSheet": "Shipments",
      "FileName": "Invoice.pdf"
    },
    "nodes": [
      {
        "id": "pipeline-1772985143818_node_4",
        "type": "table:write",
        "position": {
          "x": 464.31239480071144,
          "y": 209.8661572299229
        },
        "config": {
          "tableName": "EnrichedShipments",
          "writeMode": "overwrite",
          "createIfMissing": true,
          "sheetName": "${ResultSheet}",
          "startCell": "A1"
        },
        "dependencies": [
          "clean-and-merge"
        ]
      },
      {
        "id": "pipeline-1772985143818_node_5",
        "type": "transform:python",
        "position": {
          "x": 216.68039116552478,
          "y": 344.1859085701957
        },
        "config": {
          "packages": "",
          "code": "import xml.etree.ElementTree as ET\n\nxml_raw = input_0\nroot = ET.fromstring(xml_raw)\n\n# Find the first Attachment with mimeType application/pdf\nattachments = root.find('Attachments')\npdf_b64 = ''\nif attachments is not None:\n    for att in attachments.findall('Attachment'):\n        if att.get('mimeType') == 'application/pdf':\n            data_el = att.find('Data')\n            if data_el is not None and data_el.text:\n                pdf_b64 = data_el.text.strip()\n                break\n\nif not pdf_b64:\n    raise ValueError('No PDF attachment found in XML')\n\npdf_b64\n",
          "enableCache": false
        },
        "dependencies": [
          "read-xml"
        ]
      },
      {
        "id": "node-1772985170761",
        "type": "data:static",
        "dependencies": [],
        "position": {
          "x": -138.65789402944853,
          "y": 309.24915168545374
        },
        "config": {
          "data": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ShipmentInvoiceSet xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" generatedBy=\"KvernaDemo\" domain=\"shipping\" recordCount=\"3\">\n  <Attachments>\n    <Attachment id=\"ATT-BUNDLE-001\" mimeType=\"application/pdf\" encoding=\"base64\">\n      <FileName>kverna-demo-bundle-shipping.pdf</FileName>\n      <Data>JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSAvQ29udGVudHMgNCAwIFIgL1Jlc291cmNlcyA8PCAvRm9udCA8PCAvRjEgNSAwIFIgPj4gPj4gPj4KZW5kb2JqCjQgMCBvYmoKPDwgL0xlbmd0aCA0NCA+PgpzdHJlYW0KQlQgL0YxIDEyIFRmIDEwMCA3MDAgVGQgKEt2ZXJuYSBEZW1vIERvY3VtZW50KSBUaiBFVAplbmRzdHJlYW0KZW5kb2JqCjUgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9CYXNlRm9udCAvSGVsdmV0aWNhID4+CmVuZG9iagp4cmVmCjAgNgowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAwMDkgMDAwMDAgbiAKMDAwMDAwMDA2MyAwMDAwMCBuIAowMDAwMDAwMTE4IDAwMDAwIG4gCjAwMDAwMDAyOTYgMDAwMDAgbiAKMDAwMDAwMDM5MyAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDYgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjQ2OAolJUVPRg==</Data>\n    </Attachment>\n  </Attachments>\n\n  <ShipmentInvoice id=\"ORD-A043BAE160\" sequence=\"1\">\n    <Header>\n      <OrderID>ORD-A043BAE160</OrderID>\n      <IssueDate>2025-09-12</IssueDate>\n      <DueDate>2025-12-01</DueDate>\n      <Status>CANCELLED</Status>\n      <Currency>SGD</Currency>\n      <TotalGrossAmount>38957.29</TotalGrossAmount>\n      <PaymentTerms>NET30</PaymentTerms>\n      <InternalRef>REF-D3DE77</InternalRef>\n    </Header>\n    <Parties>\n      <Seller>\n        <Name>Apex Trade Ltd</Name>\n        <VATNumber>GB123456789</VATNumber>\n        <City>London</City>\n        <Country>United Kingdom</Country>\n      </Seller>\n      <Buyer>\n        <Name>BlueSea Carriers Pte</Name>\n        <VATNumber>SG201912345</VATNumber>\n        <City>Singapore</City>\n        <Country>Singapore</Country>\n      </Buyer>\n    </Parties>\n    <LineItems count=\"2\">\n      <LineItem id=\"LI-34317C\" sequence=\"1\">\n        <SKU>ECI-6500</SKU>\n        <Description>Electrical Cabinet IP65</Description>\n        <Quantity unit=\"EA\">16</Quantity>\n        <UnitPrice currency=\"SGD\">1875.00</UnitPrice>\n        <Discount rate=\"0.0970\">2910.00</Discount>\n        <NetAmount>27090.00</NetAmount>\n        <VATRate>0.21</VATRate>\n        <VATAmount>5688.90</VATAmount>\n        <GrossAmount>32778.90</GrossAmount>\n      </LineItem>\n      <LineItem id=\"LI-05C3AB\" sequence=\"2\">\n        <SKU>CPM-3300</SKU>\n        <Description>Control Panel Module</Description>\n        <Quantity unit=\"EA\">3</Quantity>\n        <UnitPrice currency=\"SGD\">1240.00</UnitPrice>\n        <Discount rate=\"0.0369\">137.27</Discount>\n        <NetAmount>3582.73</NetAmount>\n        <VATRate>0.21</VATRate>\n        <VATAmount>752.37</VATAmount>\n        <GrossAmount>4335.10</GrossAmount>\n      </LineItem>\n    </LineItems>\n    <ShipmentDetails>\n      <Method>SEA_FCL</Method>\n      <Incoterm>DDP</Incoterm>\n      <BillOfLadingNumber>BL-7AE85C6BD4B5</BillOfLadingNumber>\n      <ContainerID>CNTR-83ACE5F40FA</ContainerID>\n      <EstimatedDelivery>2025-09-23</EstimatedDelivery>\n      <PortOfLoading>Rotterdam</PortOfLoading>\n      <PortOfDischarge>Houston</PortOfDischarge>\n    </ShipmentDetails>\n    <AuditTrail>\n      <Event sequence=\"1\">\n        <Type>CREATED</Type>\n        <Timestamp>2025-09-12T08:17:00Z</Timestamp>\n        <User>system</User>\n        <Comment>Auto-processed</Comment>\n      </Event>\n      <Event sequence=\"2\">\n        <Type>APPROVED</Type>\n        <Timestamp>2025-09-16T13:50:00Z</Timestamp>\n        <User>approver@corp</User>\n        <Comment>Manual review</Comment>\n      </Event>\n    </AuditTrail>\n    <AttachmentRef refId=\"ATT-BUNDLE-001\" />\n  </ShipmentInvoice>\n\n  <ShipmentInvoice id=\"ORD-3803A839C0\" sequence=\"2\">\n    <Header>\n      <OrderID>ORD-3803A839C0</OrderID>\n      <IssueDate>2025-01-13</IssueDate>\n      <DueDate>2025-03-29</DueDate>\n      <Status>DELIVERED</Status>\n      <Currency>SGD</Currency>\n      <TotalGrossAmount>11524.63</TotalGrossAmount>\n      <PaymentTerms>NET60</PaymentTerms>\n      <InternalRef>REF-534571</InternalRef>\n    </Header>\n    <Parties>\n      <Seller>\n        <Name>NordShip AS</Name>\n        <VATNumber>NO912345678</VATNumber>\n        <City>Oslo</City>\n        <Country>Norway</Country>\n      </Seller>\n      <Buyer>\n        <Name>TransGlobal Corp</Name>\n        <VATNumber>US-EIN-8812</VATNumber>\n        <City>Chicago</City>\n        <Country>United States</Country>\n      </Buyer>\n    </Parties>\n    <LineItems count=\"2\">\n      <LineItem id=\"LI-B8C2DD\" sequence=\"1\">\n        <SKU>BRG-24PK</SKU>\n        <Description>Bearing Set (24-pack)</Description>\n        <Quantity unit=\"PK\">7</Quantity>\n        <UnitPrice currency=\"SGD\">112.75</UnitPrice>\n        <Discount rate=\"0.0408\">32.20</Discount>\n        <NetAmount>757.05</NetAmount>\n        <VATRate>0.19</VATRate>\n        <VATAmount>143.84</VATAmount>\n        <GrossAmount>900.89</GrossAmount>\n      </LineItem>\n      <LineItem id=\"LI-1CB0CA\" sequence=\"2\">\n        <SKU>HPA-7710</SKU>\n        <Description>Hydraulic Pump Assembly</Description>\n        <Quantity unit=\"EA\">11</Quantity>\n        <UnitPrice currency=\"SGD\">940.50</UnitPrice>\n        <Discount rate=\"0.0560\">579.35</Discount>\n        <NetAmount>9766.15</NetAmount>\n        <VATRate>0.00</VATRate>\n        <VATAmount>0.00</VATAmount>\n        <GrossAmount>9766.15</GrossAmount>\n      </LineItem>\n    </LineItems>\n    <ShipmentDetails>\n      <Method>SEA_LCL</Method>\n      <Incoterm>FCA</Incoterm>\n      <BillOfLadingNumber>BL-1F81884FC924</BillOfLadingNumber>\n      <ContainerID>CNTR-E800E0616BE</ContainerID>\n      <EstimatedDelivery>2025-02-02</EstimatedDelivery>\n      <PortOfLoading>Shanghai</PortOfLoading>\n      <PortOfDischarge>Houston</PortOfDischarge>\n    </ShipmentDetails>\n    <AuditTrail>\n      <Event sequence=\"1\">\n        <Type>CREATED</Type>\n        <Timestamp>2025-01-13T18:51:00Z</Timestamp>\n        <User>system</User>\n        <Comment>OK</Comment>\n      </Event>\n      <Event sequence=\"2\">\n        <Type>APPROVED</Type>\n        <Timestamp>2025-01-16T15:14:00Z</Timestamp>\n        <User>user.a@corp</User>\n        <Comment>Manual review</Comment>\n      </Event>\n    </AuditTrail>\n    <AttachmentRef refId=\"ATT-BUNDLE-001\" />\n  </ShipmentInvoice>\n\n  <ShipmentInvoice id=\"ORD-B488B91BAF\" sequence=\"3\">\n    <Header>\n      <OrderID>ORD-B488B91BAF</OrderID>\n      <IssueDate>2025-11-16</IssueDate>\n      <DueDate>2026-01-05</DueDate>\n      <Status>DELIVERED</Status>\n      <Currency>CHF</Currency>\n      <TotalGrossAmount>71181.83</TotalGrossAmount>\n      <PaymentTerms>2/10NET30</PaymentTerms>\n      <InternalRef>REF-28E36F</InternalRef>\n    </Header>\n    <Parties>\n      <Seller>\n        <Name>Acme Logistics GmbH</Name>\n        <VATNumber>DE291837465</VATNumber>\n        <City>Berlin</City>\n        <Country>Germany</Country>\n      </Seller>\n      <Buyer>\n        <Name>Ironclad Supplies BV</Name>\n        <VATNumber>NL854321987</VATNumber>\n        <City>Rotterdam</City>\n        <Country>Netherlands</Country>\n      </Buyer>\n    </Parties>\n    <LineItems count=\"2\">\n      <LineItem id=\"LI-720245\" sequence=\"1\">\n        <SKU>ICU-4400</SKU>\n        <Description>Industrial Compressor Unit</Description>\n        <Quantity unit=\"EA\">10</Quantity>\n        <UnitPrice currency=\"CHF\">2850.00</UnitPrice>\n        <Discount rate=\"0.0948\">2701.80</Discount>\n        <NetAmount>25798.20</NetAmount>\n        <VATRate>0.10</VATRate>\n        <VATAmount>2579.82</VATAmount>\n        <GrossAmount>28378.02</GrossAmount>\n      </LineItem>\n      <LineItem id=\"LI-D314C3\" sequence=\"2\">\n        <SKU>ICU-4400</SKU>\n        <Description>Industrial Compressor Unit</Description>\n        <Quantity unit=\"EA\">15</Quantity>\n        <UnitPrice currency=\"CHF\">2850.00</UnitPrice>\n        <Discount rate=\"0.0381\">1628.78</Discount>\n        <NetAmount>41121.22</NetAmount>\n        <VATRate>0.00</VATRate>\n        <VATAmount>0.00</VATAmount>\n        <GrossAmount>41121.22</GrossAmount>\n      </LineItem>\n    </LineItems>\n    <ShipmentDetails>\n      <Method>ROAD_LTL</Method>\n      <Incoterm>DDP</Incoterm>\n      <BillOfLadingNumber>BL-A0A577E703A9</BillOfLadingNumber>\n      <ContainerID>N/A</ContainerID>\n      <EstimatedDelivery>2025-11-26</EstimatedDelivery>\n      <PortOfLoading>Felixstowe</PortOfLoading>\n      <PortOfDischarge>New York</PortOfDischarge>\n    </ShipmentDetails>\n    <AuditTrail>\n      <Event sequence=\"1\">\n        <Type>DISPATCHED</Type>\n        <Timestamp>2025-11-16T12:49:00Z</Timestamp>\n        <User>approver@corp</User>\n        <Comment>Manual review</Comment>\n      </Event>\n      <Event sequence=\"2\">\n        <Type>APPROVED</Type>\n        <Timestamp>2025-11-19T14:26:00Z</Timestamp>\n        <User>approver@corp</User>\n        <Comment>See attached</Comment>\n      </Event>\n    </AuditTrail>\n    <AttachmentRef refId=\"ATT-BUNDLE-001\" />\n  </ShipmentInvoice>\n\n</ShipmentInvoiceSet>\n"
        },
        "label": "Shipping"
      },
      {
        "id": "node-1772985172785",
        "type": "data:static",
        "dependencies": [],
        "position": {
          "x": -145.26290957068147,
          "y": 181.7436342807828
        },
        "config": {
          "data": "OrderID,RecordDate,Carrier,Amount,Currency,Status,TrackingNumber,PortOfLoading,PortOfDischarge,Notes\nORD-A043BAE160,2025-09-12,MSC,38957.29,SGD,Cancelled,TRK-29D04D0777FE,Rotterdam,Houston,\nORD-3803A839C0,,Maersk Line,39044.41,GBP,Delivered,TRK-C8EDD910FCFC,Hamburg,Houston,On schedule\nORD-B488B91BAF,2025-06-21,Hapag-Lloyd,10384.31,NOK,Delivered,TRK-0A4279E3D47D,Singapore,Houston,Fragile\nORD-5D7798221A-DUP,2025-06-10,DB Schenker,82368.08,EUR,Delivered,TRK-011734301FAD,Felixstowe,Oslo,On schedule\nORD-7BEF4958F5,17/05/2025,MSC,43550.31,NOK,In Transit,TRK-633DB32C0F37,Rotterdam,Antwerp,See invoice\nord-deadbeef01,2025/02/21,DHL Express,123747.93,GBP,Returned,TRK-16B85BCA27A0,Rotterdam,Dubai,Checked OK\nORD-MISSING001,31/13/2024,FedEx International,36073.14,CHF,Cancelled,TRK-29D04D0777FE,Rotterdam,Antwerp,\nORD-BADAMT0001,2025-03-08,Kuehne+Nagel,N/A,SGD,Customs Hold,TRK-16F4300E52DE,Hamburg,Oslo,Checked OK\nORD-EUROFMT001,2025-06-28,Hapag-Lloyd,\"63.108,49\",USD,In Transit,TRK-1815C83CA43C,Shanghai,Antwerp,Slight delay\nORD-USFMT0001,2025-05-07,MSC,\"$37,551\",SGD,In Transit,TRK-E9290F07C087,Hamburg,Antwerp,See invoice\n,2025-07-09,DHL Express,58223.84,GBP,Pending,TRK-5FD1B7FC4CF6,Shanghai,New York,On schedule\n"
        },
        "label": "CSV"
      },
      {
        "id": "transform:python-1772985474011-403",
        "type": "transform:python",
        "position": {
          "x": 206.23878705841128,
          "y": 168.8207777870661
        },
        "config": {
          "packages": [
            "pandas"
          ],
          "code": "import pandas as pd\nimport io\nimport json\nimport re\nimport math\nfrom datetime import datetime\n\ncsv_raw = input_0\ndf = pd.read_csv(io.StringIO(csv_raw), dtype=str, keep_default_na=False)\n\ndf['OrderID'] = df['OrderID'].str.upper().str.strip()\ndf = df[df['OrderID'] != ''].copy()\ndf['IsDuplicate'] = df['OrderID'].str.endswith('-DUP')\ndf['OrderID'] = df['OrderID'].str.replace(r'-DUP$', '', regex=True)\ndf = df.drop_duplicates(subset='OrderID', keep='first').copy()\n\ndef parse_date(val):\n    if not val or val.strip() == '':\n        return None\n    val = val.strip()\n    for fmt in ('%Y-%m-%d', '%d/%m/%Y', '%Y/%m/%d', '%d-%m-%y', '%d-%m-%Y'):\n        try:\n            return datetime.strptime(val, fmt).strftime('%Y-%m-%d')\n        except ValueError:\n            continue\n    return None\n\ndf['RecordDate'] = df['RecordDate'].apply(parse_date)\n\ndef clean_amount(val):\n    if not val or val.strip() in ('', 'N/A'):\n        return None\n    val = val.strip().replace('$', '').replace(' ', '')\n    if re.match(r'^\\d{1,3}(\\.\\d{3})+(,\\d+)?$', val):\n        val = val.replace('.', '').replace(',', '.')\n    else:\n        val = val.replace(',', '')\n    try:\n        return float(val)\n    except ValueError:\n        return None\n\ndf['Amount'] = df['Amount'].apply(clean_amount)\n\nlookup = {}\nfor _, row in df.iterrows():\n    lookup[row['OrderID']] = {\n        'csv_RecordDate':     row.get('RecordDate'),\n        'csv_Carrier':        row.get('Carrier', ''),\n        'csv_Amount':         row.get('Amount'),\n        'csv_Currency':       row.get('Currency', ''),\n        'csv_Status':         row.get('Status', ''),\n        'csv_TrackingNumber': row.get('TrackingNumber', ''),\n        'csv_PortOfLoading':  row.get('PortOfLoading', ''),\n        'csv_PortOfDischarge':row.get('PortOfDischarge', ''),\n        'csv_Notes':          row.get('Notes', ''),\n        'csv_IsDuplicate':    str(row.get('IsDuplicate', False))\n    }\n\nimport xml.etree.ElementTree as ET\nroot = ET.fromstring(input_1)\n\nrows = []\nfor inv in root.findall('ShipmentInvoice'):\n    hdr     = inv.find('Header')\n    ship    = inv.find('ShipmentDetails')\n    parties = inv.find('Parties')\n    seller  = parties.find('Seller') if parties is not None else None\n    buyer   = parties.find('Buyer')  if parties is not None else None\n    audit   = inv.find('AuditTrail')\n\n    def txt(el, tag, default=''):\n        if el is None: return default\n        node = el.find(tag)\n        return node.text.strip() if node is not None and node.text else default\n\n    order_id = txt(hdr, 'OrderID')\n    csv_data = lookup.get(order_id, {})\n\n    li_el = inv.find('LineItems')\n    li_count    = int(li_el.get('count', 0)) if li_el is not None else 0\n    net_total   = sum(float(li.findtext('NetAmount')   or 0) for li in (li_el or []))\n    gross_total = sum(float(li.findtext('GrossAmount') or 0) for li in (li_el or []))\n    vat_total   = sum(float(li.findtext('VATAmount')   or 0) for li in (li_el or []))\n\n    last_event = last_event_ts = ''\n    if audit is not None:\n        events = audit.findall('Event')\n        if events:\n            last_event    = events[-1].findtext('Type', '')\n            last_event_ts = events[-1].findtext('Timestamp', '')\n\n    rows.append({\n        'OrderID':             order_id,\n        'IssueDate':           txt(hdr, 'IssueDate'),\n        'DueDate':             txt(hdr, 'DueDate'),\n        'XML_Status':          txt(hdr, 'Status'),\n        'Currency':            txt(hdr, 'Currency'),\n        'TotalGrossAmount':    txt(hdr, 'TotalGrossAmount'),\n        'PaymentTerms':        txt(hdr, 'PaymentTerms'),\n        'InternalRef':         txt(hdr, 'InternalRef'),\n        'Seller':              txt(seller, 'Name'),\n        'SellerCountry':       txt(seller, 'Country'),\n        'Buyer':               txt(buyer, 'Name'),\n        'BuyerCountry':        txt(buyer, 'Country'),\n        'LineItemCount':       li_count,\n        'LineItems_NetTotal':  round(net_total, 2),\n        'LineItems_VATTotal':  round(vat_total, 2),\n        'LineItems_GrossTotal':round(gross_total, 2),\n        'ShipMethod':          txt(ship, 'Method'),\n        'Incoterm':            txt(ship, 'Incoterm'),\n        'BillOfLading':        txt(ship, 'BillOfLadingNumber'),\n        'ContainerID':         txt(ship, 'ContainerID'),\n        'EstimatedDelivery':   txt(ship, 'EstimatedDelivery'),\n        'XML_PortOfLoading':   txt(ship, 'PortOfLoading'),\n        'XML_PortOfDischarge': txt(ship, 'PortOfDischarge'),\n        'LastAuditEvent':      last_event,\n        'LastAuditTimestamp':  last_event_ts,\n        'CSV_RecordDate':      csv_data.get('csv_RecordDate', ''),\n        'CSV_Carrier':         csv_data.get('csv_Carrier', ''),\n        'CSV_Amount':          csv_data.get('csv_Amount', ''),\n        'CSV_Currency':        csv_data.get('csv_Currency', ''),\n        'CSV_Status':          csv_data.get('csv_Status', ''),\n        'CSV_TrackingNumber':  csv_data.get('csv_TrackingNumber', ''),\n        'CSV_PortOfLoading':   csv_data.get('csv_PortOfLoading', ''),\n        'CSV_PortOfDischarge': csv_data.get('csv_PortOfDischarge', ''),\n        'CSV_Notes':           csv_data.get('csv_Notes', ''),\n        'CSV_WasDuplicate':    csv_data.get('csv_IsDuplicate', ''),\n        'CSV_Matched':         'Yes' if csv_data else 'No'\n    })\n\ndef sanitise(v):\n    if isinstance(v, float) and math.isnan(v):\n        return None\n    return v\n\nclean_rows = [{k: sanitise(v) for k, v in r.items()} for r in rows]\njson.dumps(clean_rows)\n",
          "enableCache": false
        },
        "dependencies": [
          "read-csv",
          "read-xml"
        ],
        "label": "Clean and enrich from csv"
      },
      {
        "id": "node-1772985603245",
        "type": "data:download",
        "dependencies": [],
        "position": {
          "x": 383.13833372795466,
          "y": 498.4972056712152
        },
        "config": {
          "filename": "${FileName}",
          "base64": true
        }
      }
    ],
    "triggers": [
      {
        "type": "manual",
        "enabled": true,
        "id": "pipeline-1772985143818_trigger_1",
        "position": {
          "x": -63.72113714470647,
          "y": 0.6059707351274923
        }
      }
    ],
    "edges": [
      {
        "source": "node-1772985170761",
        "target": "pipeline-1772985143818_node_5",
        "sourceHandle": "data-out",
        "targetHandle": "input-0",
        "id": "node-1772985170761-pipeline-1772985143818_node_5-data-out-orderedInput",
        "type": "orderedInput",
        "inputIndex": 0
      },
      {
        "source": "pipeline-1772985143818_trigger_1",
        "target": "pipeline-1772985143818_node_5",
        "sourceHandle": "execution-out",
        "targetHandle": "execution-in",
        "id": "pipeline-1772985143818_trigger_1-pipeline-1772985143818_node_5-execution-out-execution",
        "type": "execution"
      },
      {
        "source": "node-1772985172785",
        "target": "transform:python-1772985474011-403",
        "sourceHandle": "data-out",
        "targetHandle": "input-0",
        "id": "node-1772985172785-transform:python-1772985474011-403-data-out-orderedInput",
        "type": "orderedInput",
        "inputIndex": 0
      },
      {
        "source": "node-1772985170761",
        "target": "transform:python-1772985474011-403",
        "sourceHandle": "data-out",
        "targetHandle": "input-1",
        "id": "node-1772985170761-transform:python-1772985474011-403-data-out-orderedInput",
        "type": "orderedInput",
        "inputIndex": 1
      },
      {
        "source": "pipeline-1772985143818_trigger_1",
        "target": "transform:python-1772985474011-403",
        "sourceHandle": "execution-out",
        "targetHandle": "execution-in",
        "id": "pipeline-1772985143818_trigger_1-transform:python-1772985474011-403-execution-out-execution",
        "type": "execution"
      },
      {
        "source": "pipeline-1772985143818_node_5",
        "target": "node-1772985603245",
        "sourceHandle": "data-out",
        "targetHandle": "data-in",
        "id": "pipeline-1772985143818_node_5-node-1772985603245-data-out-data",
        "type": "data"
      },
      {
        "source": "pipeline-1772985143818_node_5",
        "target": "node-1772985603245",
        "sourceHandle": "execution-out",
        "targetHandle": "execution-in",
        "id": "pipeline-1772985143818_node_5-node-1772985603245-execution-out-execution",
        "type": "execution"
      },
      {
        "source": "transform:python-1772985474011-403",
        "target": "pipeline-1772985143818_node_4",
        "sourceHandle": "data-out",
        "targetHandle": "data-in",
        "id": "transform:python-1772985474011-403-pipeline-1772985143818_node_4-data-out-data",
        "type": "data"
      },
      {
        "source": "transform:python-1772985474011-403",
        "target": "pipeline-1772985143818_node_4",
        "sourceHandle": "execution-out",
        "targetHandle": "execution-in",
        "id": "transform:python-1772985474011-403-pipeline-1772985143818_node_4-execution-out-execution",
        "type": "execution"
      }
    ],
    "description": "This pipeline is meant to demonstrate an otherwise time consuming data wrangling task. Two files, an inbound external invoice list from a shipment system (complex XML), and a manually maintained CSV meant to enrich the invoice.\nProcess: User adds two static nodes, one for csv, one for xml. Mark: Large files in static nodes might affect performance and the ability to save pipelines to sheet. For a one-off, this might be fine, but in general large files should be loaded from an external source like SharePoint or OneDrive. They connect both to a new python node and press \"Run\". The python node will now have sample data. In the python configuration, copy the LLM prompt (this will include sample data). The user pastes this to his favorite LLM, and state the purpose (clean csv, combine with invoice data, return as a clean list).\nLLM produces code, this is copied to the python node. The user hits Run. If something fails, the user can either copy the error (found in the Results tab), or CTRL-C the entire node and CTRL-V into the LLM chat. On a strong LLM, this is normally from 0 to 2 ping pongs before success. Then a second python node is made to extract the base64 encoded pdf. There are many different ways to solve the same challenge, and this is one way. This solution would make into a replayable pipeline for the next invoice. If this was a one-off the download and write to table nodes might have been skipped, and the user could have just downloaded massaged files from the results tab\n\n"
  }
}
