Identifiers represent real-world concepts within a business context, like customers, transactions, or ad campaigns. Analyses frequently revolve around specific identifiers, for example, in customer churn analysis or annual recurring revenue modeling. In semantic models, these identifiers are represented by ID columns, which act as join keys to link different semantic models within the semantic graph.
Identifiers offer a clear structure to the underlying data, enabling more coherent and insightful analysis.
Every identifier requires a name and type. The name can reference the key column name from the data table, or function as an alias with the column name referenced in the expr parameter.
Name
Refers to the key column name from the underlying data table or serves as an
alias if the actual column name is specified in the expr parameter.
Type
Defines the identifier’s role in join logic and determines the join type
(e.g., Primary, Foreign, Unique).
Expression (optional)
Specifies the underlying column for the identifier. If omitted, it defaults
to the identifier’s name.
Identifiers are defined using the following parameters:
identifiers: - name: [name] type: [Primary or Natural or Foreign or Unique] description: [description of the field or role] expr: [column name or expression, defaults to the name if not provided]
For example, in a semantic model for sales data, identifiers could be defined as follows:
identifiers: - name: transaction type: primary expr: id_transaction - name: order type: foreign expr: id_order - name: user type: foreign expr: substring(id_order from 2)
Findly uses different join logic based on the identifier type:
A primary identifier indicates that each row in the table represents a
unique record, encompassing all records in the data platform.
A primary identifier indicates that each row in the table represents a
unique record, encompassing all records in the data platform.
A unique key ensures one record per row in the table. It might represent a
subset of records in the data warehouse and can include nulls.
Foreign keys can have none, one, or multiple instances of the same record
and may include null values.
Identifiers (join keys) within a semantic model are identified by their name.
Names must be unique within a specific model but can be reused across
different models.
Identifiers are foundational elements that establish relationships and ensure seamless data analysis. By understanding identifiers and their applications, businesses can derive richer insights and make more informed data-driven decisions.