Preview Analytics Merge
Try a merge before you save it, as the app's merge editor previews one: send the same dataSources and transformCode Create Analytics Data Source takes for a merge source. It answers each input after its SQL and what the code returns. Nothing is saved. A code error comes back in output.error, so you can fix it and try again.
Headers
Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with "Use this key across all of your organizations" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See Organizations.
Body
The inputs, each one of your sync or fixed sources with an alias and optional SQL.
The sources to combine, as Create Analytics Data Source takes them for a merge source.
dataSourceIdstringrequiredThe input source, a sync or fixed source of yours, from List Analytics Data Sources.
aliasstringrequiredThe name the merge SQL and code read this input by.
querystringSQL that shapes this input before the merge, reading it as `src`. Leave it out to use the input as is.
The code that combines them.
The code that combines them, as for a merge source. Leave it out to see the inputs only.
Response fields
inputsarray of objectsEach input after its SQL: its alias and its first 10 rows.
aliasstringThe alias the code reads it by.
rowCountnumberHow many rows there are in all.
columnsarrayThe column names.
rowsarrayThe first rows.
isPartialbooleanTrue when an input is still on its first fetch, so only its rows so far were used.
outputobjectWhat the code returned: its first 50 rows, or error when it failed. Null when no transformCode was sent.
rowCountnumberHow many rows there are in all.
columnsarrayThe column names.
rowsarrayThe first rows.
errorstringWhy the code failed, or null when it ran.