Fabric Semantic Model Spark connector

This connector is used to query a Microsoft Fabric Semantic Model and return a Spark DataFrame.

Warning: a Spark connector can be used only with another Spark connector. It is not possible to use a Spark connector with a non-Spark connector.

See Spark documentation for more information.

Connection configuration

NameMandatoryDefaultDescription
semanticmodelnameyesSemantic model (dataset) name in Fabric
workspace_namenonullFabric workspace name. If omitted, default workspace context is used

Configuration

Test case configuration

NameMandatoryDefaultDescription
methodyesQuery method. Allowed values: DAX Query, Table, Measure
daxquerynonullDAX query text. Used when method: DAX Query
tabletoquerynonullTable name to read. Used when method: Table
measuretoquerynonullMeasure name to evaluate. Used when method: Measure
groupbynonullList of grouping columns for measure evaluation. Used when method: Measure
filterstoapplynonullDictionary of filters for measure evaluation. Used when method: Measure
column_namesyesList of output column names. List size must match returned column count

Examples

Example Fabric Semantic Model DAX:
  source:
    type: fabricsemanticmodel_spark
    connection: testfabricsemanticmodelspark
    method: DAX Query
    dax_query: |
      EVALUATE SUMMARIZECOLUMNS(
        'CountrySales'[Country],
        'CountrySales'[Sales]
      )
    column_names:
      - Country
      - Sales
  expected:
    type: empty_spark
Example Fabric Semantic Model Measure:
  source:
    type: fabricsemanticmodel_spark
    connection: testfabricsemanticmodelspark
    method: Measure
    measuretoquery: Sales with tax
    group_by:
      - "'CountrySales'[Country]"
    filterstoapply:
      {"'CountrySales'[Country]" : ["France", "Germany"]}
  expected:
    type: empty_spark
Example Fabric Semantic Model Table:
  source:
    type: fabricsemanticmodel_spark
    connection: testfabricsemanticmodelspark
    method: Table
    tabletoquery: CountrySales
    column_names:
      - Country
      - Sales
  expected:
    type: empty_spark