My team is working on a Databricks SQL statement and wanted to see if anyone may have any insights. It looks like our bot isn't showing the responses when we test. The logs show that the actions are running without errors, but the conversation logs show that the output is coming through as null. Since the mapping is Moveworks-specific and a bit complex, I’ve attached the logs so others can take a closer look and help troubleshoot. Statement is something like this, I’ve redacted proprietary information:
{
"statement": "SELECT DISTINCT <InvoiceID>, <SupplierName>, CONCAT(<BusinessUnit_PO>, ' ', <PurchaseOrder>) AS PO_ID, <VoucherStatus>, CASE WHEN <VoucherStatus> = 'STATUS1' THEN <PaymentDate> ELSE NULL END AS PaymentDate, CASE WHEN <VoucherStatus> = 'STATUS1' THEN <PaymentID> ELSE NULL END AS PaymentID, CASE WHEN <VoucherStatus> = 'STATUS2' THEN <ScheduledPayDate> ELSE NULL END AS ScheduledPayDate, CASE WHEN <VoucherStatus> IN ('STATUS3', 'STATUS4', 'STATUS5', 'STATUS6') THEN <RuleDescription> ELSE NULL END AS RuleDescription, CASE WHEN <VoucherStatus> IN ('STATUS3', 'STATUS4', 'STATUS5', 'STATUS6') THEN <RuleCauses> ELSE NULL END AS RuleCauses, CASE WHEN <VoucherStatus> IN ('STATUS3', 'STATUS4', 'STATUS5', 'STATUS6') THEN <RuleCorrectiveAction> ELSE NULL END AS RuleCorrectiveAction FROM <TableName> WHERE REPLACE(<InvoiceID>, '-', '') = REPLACE('<InvoiceNumber>', '-', '') AND RIGHT(REPLACE(<PurchaseOrder>, '-', ''), 4) = '<PO_Number>'"
}








