Migrate from Omni

What to export from Omni, how Omni views, topics, relationships and access filters map to Malloy, and how to rebuild them with the modeling agent, for Omni modelers and analytics engineers

An Omni model moves into Credible through the modeling agent. The agent reads the exported model files as reference material and drafts the Malloy model from them, checking its proposals against your data. Expect to review the translations more closely than for Looker or Power BI, which have dedicated skills.

Comparing the two products first? See Credible vs. Omni. The Omni Migration Guide discusses the approach in more depth.

What to Export

  • The shared model: the .view files, .topic files and the relationships file, all YAML. Export them from Omni's model IDE, or from the Git repository if the model is connected to one.
  • Workbook and branch models: fields defined in a workbook or on an unmerged branch rather than in the shared model. Logic often lives there.
  • Usage: the dashboards and topics people use most, to set the scope.

How Omni Concepts Map to Malloy

OmniMalloyNotes
View (.view)source: over one table
schema and table_nameconnection.table('schema.table')
Topic (.topic)source: with joinsOne source per analytical domain
relationships entryjoin_one: or join_many: with an on condition
relationship_type: many_to_one / one_to_manyjoin_one: / join_many:
relationship_type: assumed_many_to_oneFlag itAn inferred join; confirm the cardinality
reversible: trueTwo named joins, one per direction
join_from_view_as aliasA separately named join
join_type (always_left, inner, full_outer)Review by handChanges which rows survive, and so the totals
primary_key: trueprimary_key: on the source
Dimension with sql:dimension:${TABLE}.column becomes a plain column reference
Measure with aggregate_typemeasure: with sum(), count(), avg() and so oncount_distinct becomes count(field)
Measure filters:measure { where: condition }Filtered aggregate
sum_distinct_on and relatedUsually a plain aggregate with a primary key setMalloy's aggregates account for join fan-out when primary keys are declared
description, ai_context#(doc) tags
default_filters on a topicA filter in a named viewUsers can remove it in Omni, so it is not a source filter
always_where_sql, always_where_filtersReview by handSee below
access_filters#(access_filter) on the same column
required_access_grants#(authorize) on the source
hidden: trueClassify by reason

Steps

  1. Set up a local modeling directory with cred init (Cred CLI). Put the exported YAML in a subfolder such as omni/ and add it to .credignore.
  2. Ask the agent to build the model, naming the folder and the domain: "Build a model of our orders domain using the Omni model in omni/ as prior art."
  3. Review the proposed sources, joins and fields. Confirm every assumed relationship and the join type of each join.
  4. Compare the key numbers against Omni with the same filters, as described in Prove Parity.
  5. Publish, then rebuild the dashboards people use as reports or data apps.

What Needs Manual Review

  • Fields defined in more than one layer. A field can differ between the shared model, a branch, a workbook and a topic's view overrides. Decide which definition is correct.
  • Filters users cannot remove. always_where_sql, always_where_filters, always_having_sql and always_having_filters can be a data-quality rule, a business convention or an access restriction. A restriction becomes an #(access_filter) or #(authorize) rule, a convention becomes part of a named view, and a data-quality rule usually belongs upstream.
  • Assumed joins. Omni infers some relationships. Confirm each one before keeping it.
  • Field-level access. hidden_unless_access_grants hides a field per user, which is a different control from filtering rows. Decide how to handle it with access rules.
  • Workbooks and dashboards. Not converted.

Next Steps

On this page