While similar circular references are a separate issue

Synthetic Keys

  • When two tables are loaded and share 2+ similar fields, that will create a synthetic key. This acts as a lookup table between the two
    • This is a sign to change the model of your data.
  • Think of a $Syn table a link table as it linked to other model tables with the keys
  • There will be an error when loading data, telling you of synthetic keys
  • You can change the Data Model Viewer to look at a Source Table View, which allows you to not look at synthetic keys for a moment, possibly allowing a different understanding of the connections of your tables

Why do Synthetic Keys Form?

Synthetic Keys can form for three reasons:

  1. When we process models to include IntervalMatch()
    • e.g. Slowly Changing Dimensions
  2. A flaws design when creating the associative model
  3. Script Errors

Fixing Synthetic Keys

  • Check that only 2 fields are used as a key to logically link tables
  • Look for redundant or common fields and remove or rename them
  • If a field being tied by a Synthetic Key represents the same pieces of data in the two tables, then this is likely redundant, and the Synthetic Key can be resolved through removal of one of those fields
  • Aliasing one of the tied together fields will separate the connection between the two fields. Use this approach if you need both fields for in your data, if they represent different underlying ideas but happen to share the same name
  • If you need to join a table on multiple fiends, this can be resolved through a Compound Key, combining those multiple fields into a single point of reference
    • & can be used to Concatenate strings together

Another way to fix a synthetic key is to CONCATENATE two tables together. This works in the case where:

  • A synthetic key has formed but for business reasons it is desirable to not comment either of these out
    • An example would be two tables that have ProductKey and DateKey, and the client wishes to filter both datasets by either product or date
  • Concatenate works as a solution here because the data returned in an associative model will be exactly the same. It doesn’t matter if there are many columns with Null values here
  • This can be thought of as adding to the Fact Table