Skip to main content
Skip table of contents

Data access

Overview

Use this category when you want to bring uploaded/source data into node formulas or call an external service to compute and return a result back into the model. Data access functions are the bridge between your model logic and external inputs.

Start here if…

  • You want to reference a measure from an uploaded table (Excel/CSV/etc.).

  • You want to connect data using the UI.

  • You want to send cube inputs to an external service and receive a cube back.

Not here if…


Mental model

  • DATA(...) returns the values from a specific DataTable measure into your node.

  • API_CALL(...) sends one or more input cubes to an external endpoint and expects a cube back, including specific result levels you declare up front.


Common patterns

  • Connect an uploaded table measure to a nodeDATA("DataSourceName","TableName","MeasureName")
    Use when your node should directly represent a measure from a data table.

  • Set/override the unit on a DATA resultDATA("Model Data","Gross_Sales","Price","EUR")
    Optional, use when you want to explicitly supply a unit.

  • Use the UI to connect data
    Use the “Data” button in the Function Editor to select DataSource → Table → Measure and let Valsight write the DATA call.

  • Enrich or compute a result via an external serviceAPI_CALL("https://externalServer.com/sumTwoNodes", ['Node A', 'Node B'], ["Year", "Country"])
    Use when logic or data lives outside Valsight and you want the external system to return a result cube.


Functions in this category

Function

Description

DATA

References a DataTable measure and returns its values.

API_CALL

Sends input nodes to an external URL via POST and returns the result to the model.


Choosing between similar functions

  • DATA vs API_CALL

    • Use DATA when the values already exist in your uploaded/source tables and should be directly consumed in the model.

    • Use API_CALL when the values must be computed or retrieved externally and returned as a cube.


Pitfalls & troubleshooting

  • DATA returns empty: verify DataSource / Table / Measure names match exactly (they’re passed as text in double quotes).

  • DATA is empty for specific slices: check whether your model dimensions, levels and level values match the uploaded table values (name/case).

  • Units behave unexpectedly: confirm whether you rely on measure metadata or explicitly set the optional unit parameter in DATA.

  • API_CALL is unavailable: it may require enablement (for example a separate subscription or configuration).

  • API_CALL errors: ensure the response follows the expected Valsight table/cube JSON structure and includes the required result shape; otherwise Valsight can’t cast it into a node.

  • API_CALL fails due to restrictions: check configuration limits (for example allowed URLs, payload size/row limits, and timeouts).


Related sections

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.