SAP HANA Cloud Query input and output data

SAP HANA Cloud Query input and output data

This page provides examples of what your input and output data look like in the SAP HANA Cloud Query function in your stream. These views help you troubleshoot and confirm that the function works as intended.

Input data

In this example, each input record contains a customerId field. The SAP HANA Cloud Query function uses the value of this field in the SQL statement to look up the matching account in SAP HANA Cloud.

SQL statement:

SELECT name, plan, country FROM customers WHERE customer_id = '${customerId}'
SAP HANA Cloud Query input data

Output data

After the function runs, the results from SAP HANA Cloud Query are appended to the payload as queryResult, and the original fields in the record are preserved. queryResult is an array in which each item represents a row returned by the SQL statement. In this example, the query returns the matching customer's name, plan, and country. If no rows match, queryResult is an empty array.

The tree view shows the output because queryResult is a nested array. The table view flattens each array element into its own columns, so the tree view gives a clearer picture of the complete record.

SHCQ-output.png
SAP HANA Cloud Query output data