Customizing Generated LookML Files
Model level customizations
For models, insert the meta key and overriding value in the models section of the YML file.
The tags key, under config is used to add instructions for skipping the sync of a model.
for example:
getdelphi.io/skip_lookml_sync
Add under models: config: tags
add this to the list of tags to skip syncing the model
Sync model
["getdelphi.io/skip_lookml_sync"]
getdelphi.io/lookml_filename
Add under models: meta Full path of the resulting view file Note: This will override lookml_directory, lookml_filename_prefix, and lookml_filename_suffix
./<model name>.view.lkml (The filepath needs to include the suffix for the file format)
getdelphi.io/lookml_filename: "new_view_filename.view.lkml"
getdelphi.io/lookml_directory or euno.ai/lookml_directory
No sub-directory by default
euno.ai/lookml_directory: "new_subdirectory"
getdelphi.io/lookml_filename_prefix or euno.ai/lookml_filename_prefix
Add under models: meta Adds a prefix to the view's file name (e.g. prefix_model-name.view.lkml) Note: This can be used in tandem with euno.ai/lookml_filename_suffix and euno.ai/lookml_directory, but not euno.ai/lookml_filename, which will override this value.
No filename prefix by default
euno.ai/lookml_filename_prefix: "filename_prefix_"
getdelphi.io/lookml_filename_suffix or euno.ai/lookml_filename_suffix
Add under models: meta Adds a suffix to the view's file name (e.g. model-name_suffix.view.lkml) Note: This can be used in tandem with euno.ai/lookml_filename_prefix and euno.ai/lookml_directory, but not euno.ai/lookml_filename, which will override this value.
No filename suffix by default
euno.ai/lookml_filename_suffix: "_filename_suffix"
getdelphi.io/lookml_sql_table_schema
Add under models: meta Overrides only the schema part of sql_table_name property keeps the table name specified in the manifest file
schema and table names specified in the manifest file
getdelphi.io/lookml_sql_table_schema: "other_schema"
getdelphi.io/lookml_sql_table_name
schema and table names specified in the manifest file
getdelphi.io/lookml_sql_table_name: "other_schema.other_table"
euno.ai/lookml_view_name or getdelphi.io/lookml_view_name
Add under models: meta Name of the view
Model name
euno.ai/lookml_view_name: "new_view_name"
euno.ai/lookml_view_name_prefix
Add under models: meta Adds a prefix to the default view name (e.g. prefix_model-name) Note: This can be used in tandem with euno.ai/lookml_view_name_suffix, but not euno.ai/lookml_view_name, which will override this value.
No view name prefix by default
euno.ai/lookml_view_name_prefix: "view_name_prefix_"
euno.ai/lookml_view_name_suffix
Add under models: meta Adds a suffix to the default view name (e.g. model-name_suffix) Note: This can be used in tandem with euno.ai/lookml_view_name_prefix, but not euno.ai/lookml_view_name, which will override this value.
No view name suffix by default
euno.ai/lookml_view_name_suffix: "view_name_suffix_"
getdelphi.io/lookml_sync_timeframes or euno.ai/lookml_sync_timeframes
Add under models: meta Only relevant for time dimensions. Overrides ALL the default timeframes within the view for a timestamp or date column. This is a comma separated list of time grains. Note: If this key is used at both the model and column level, the more specific option, the column, will override.
raw, time, hour_of_day, date, day_of_week, week, month, quarter, year
getdelphi.io/lookml_sync_convert_tz or euno.ai/lookml_sync_convert_tz
The default is set to yes.
euno.ai/lookml_sync_convert_tz: "no"
dbt column / dbt metric level customizations
By default, Euno will generate a single dimension clause for each column and a single measure for each dbt metric (MetricFlow).
Please note that only simple metrics and ratios are currently supported for dbt Metrics. In addition, we do not support metrics across multiple dbt models.
For columns, insert the meta key and overriding value underneath the column in the columns section in the dbt models definition in the YML file.
For metrics, insert the config key and overriding value in the semantic models metrics section of the YML file.
The tags key is used to add instructions for skipping the sync of a column/metric.
examples:
Add sync customization to a dbt column definition:
Add sync customization to a metric:
getdelphi.io/skip_lookml_sync
Add under columns: tags / metrics: tags
Add this to the list of tags to skip this column/metric
The column/metric is included in the sync
tags: ["getdelphi.io/skip_lookml_sync"]
getdelphi.io/lookml_label
Add under columns: meta / metrics: config
No label
getdelphi.io/lookml_label: "some_lookml_label"
getdelphi.io/lookml_view_label
No label
getdelphi.io/lookml_view_label: "some_lookml_view_name"
getdelphi.io/lookml_group_label
Add under columns: meta / metrics: config
No group label
getdelphi.io/lookml_group_label: "some_lookml_group_label"
getdelphi.io/lookml_hidden
Add under columns: meta / metrics: config
Not hidden
getdelphi.io/lookml_hidden: "yes"
getdelphi.io/lookml_value_format
Add under columns: meta / metrics: config
No value format
getdelphi.io/lookml_value_format: "$#.00;($#.00)"
getdelphi.io/lookml_value_format_name
Add under columns: meta / metrics: config
No value format name
getdelphi.io/lookml_value_format_name: "usd"
getdelphi.io/lookml_extra
Add under columns: meta / metrics: config
No extra parameters
getdelphi.io/lookml_extra: "can_filter: yes"
getdelphi.io/lookml_tags
No override
getdelphi.io/lookml_tags: ["tag1", "tag2"]
getdelphi.io/lookml_sync_sql
Add under columns: meta / metrics: config Overrides the sql used for this LookML dimension, or measure LookML reference
For dimension - ${TABLE}.<column name> For measure:
Simple - "expr" attribute of underlying measure in dbt
Ratio - ${measure}/${measure}
getdelphi.io/lookml_sync_sql: "${TABLE}.total/100"
getdelphi.io/lookml_sync_dimension_name
Relevant for columns only
Add under columns: meta
Overrides the name of the LookML dimension
Column name used by default
getdelphi.io/lookml_sync_dimension_name: "new_dimension_name"
getdelphi.io/lookml_sync_measure_name
Relevant for metrics only
Add under metrics: config
Overrides the name of the LookML measure
Metric named used by default
getdelphi.io/lookml_sync_dimension_name: "new_measure_name"
getdelphi.io/lookml_primary_key
Relevant for columns only
Add under columns: meta
No override of primary key parameter
getdelphi.io/lookml_primary_key: "yes"
getdelphi.io/lookml_sync_timeframes or euno.ai/lookml_sync_timeframes
Relevant for columns only
Add under columns: meta
dimension_group of type time with raw, time, hour_of_day, date, day_of_week, week, month, quarter, year
getdelphi.io/lookml_sync_timeframes: ["raw", "time", "hour_of_day", "date", "week"]
getdelphi.io/lookml_sync_convert_tz or euno.ai/lookml_sync_convert_tz
Relevant for columns only
Add under columns: meta
The default is set to yes.
getdelphi.io/lookml_sync_convert_tz: "no"
getdelphi.io/lookml_filters
Relevant for metrics only
No filters
getdelphi.io/lookml_filters: [dimension_name: "filter expression", dimension_name: "filter expression"]
euno.ai/analytical_semantic_role
Relevant for columns only
Add under columns: meta Adding this key with the value "measure" overrides the sync's default semantic role and syncs a column to a LookML measure.
Unless stated otherwise, the LookML measure type will default to sum. Adding the following key: euno.ai/default_aggregation_override with the desired aggregation as value (e.g., "sum", "average", "count_distinct", etc.) will override the aggregation type.
By default, a dbt column syncs to a LookML dimension
euno.ai/analytical_semantic_role: "measure" euno.ai/default_aggregation_override: "average"
Customizing Generated LookML by Overriding Built-in Macros[
Euno will process any file in the dbt’s repository, under the directory .delphi/lookml_sync/macros/
as a Jinja2 template, and override any build-in macros found in those files.
Note: The macro overrides are taken from the head of a branch, while the sync is triggered by a dbt build. This means that if a macro is changed or removed, and a build or revision occurs in between these changes, the macro override changes might not take effect until the next build or revision occurs.
Last updated