Skip to main content

Extract Data from Semantic Model

Current configuration of the Extract Data from Semantic Model task in the Workflow Designer

The Extract Data from Semantic Model task runs a query against a published model and generates a JSON, CSV, or XLSX file.

Configuration

FieldDescription
Semantic ModelPublished model to query.
QueryJSON document specifying fields, measures, aggregations, filters, and sorts.
FormatJSON, CSV, or XLSX.
File NameName of the generated file, without sensitive information.

The query uses the same semantic definition available in the model's Preview. You can specify:

  • select: fields to return;
  • measures: measures;
  • aggregations: aggregate calculations;
  • filters: conditions;
  • orderBy: sorting;
  • pageSize: maximum number of rows, up to the limit shown by the Inspector.

A minimal example:

{
"schemaVersion": 1,
"select": [
{"field": "cliente.nome"}
],
"measures": [
{"measure": "ordini.totale"}
],
"filters": [],
"orderBy": [],
"page": 1,
"pageSize": 1000
}

Use the references proposed by the model, rather than inferring them from displayed labels.

Results

The task produces:

  • exported file, ready for subsequent tasks such as E-mail;
  • number of rows and columns;
  • model version and generation used;
  • indication of potentially stale data;
  • diagnostic message in case of error.

Before automating the export, test the same selection in the Semantic Query Preview.