Skip to main content Skip to complementary content

Migrating mappings

Migrating mappings allows you to:

  • Export mapping metadata and mappings from a Compose project to CSV files. Mapping metadata will be exported to mappingsMetadata.csv while mappings will be exported to mappings.csv. The former shows the table mappings while the latter show the column mappings.
  • Import new mappings that do not exist in the current Compose project.

  • Reuse the same mappings across several projects or Compose installations.

Mappings export guidelines

When exporting mappings and mapping metadata from Compose, it is important to note the following:

  • The export of mappings is allowed for users with the Viewer security role.
  • The order of writing the mapping metadata is according to metadata name alphabetically (e.g. Map_Orders appears after Map_Customers).
  • The order of writing a mapping is according to target columns (same as Model ordinal).
  • Source columns which are not mapped to anything will not appear in the exported file.
  • All target columns will appear in the mappings even if they were not mapped.

Mappings import guidelines

When importing mappings and metadata to the Model, it is important to note the following:

  • If required, you can import one CSV file at a time: mappingsMetadata.csv or mappings.csv.
  • Column order has no meaning; only column names (case insensitive).
  • When importing metadata, Compose validates that the targets exist in the Model. Source columns are not validated on import.
  • If the source schema, table, view or query don't exist, they will be validated after the import.
  • Importing mappings will fail in the following scenarios:
    • If the target entity doesn't exist in the Model.
    • If the compose database object doesn't exist.
    • If the mapping attribute doesn't exist in the Model.

Valid CSV file formats

The CSV files must be in a valid format. For more detailed information, see the notes in Valid CSV file formats.

Mapping metadata CSV file format

CSV metadata mapping rules
Column Name Required If column is missing If value is missing Comments

Name

Yes

Reject

Reject

Case insensitive

Landing Zone Database

Yes

Reject

Reject

The Compose "source database" name (excluding the word "landing")

Schema

No

If there is no Schema column, either the default schema will be used or none (as some databases do not have separate schemas)

If no schema is specified, either the default schema will be used or none (as some databases do not have separate schemas)

-

Source Type

No

Table Reject

Table/View/Query

Source Object

Yes

Reject Reject

If Source Type is Table or View, the Source Object is its name.

If Source Type is Query, the rules and limitations described in Valid CSV file formats will be applied.

Target Entity

Yes

Reject Reject -

Filter

No

No filter

No filter

  • Filter Params

    No

    Same name for attribute-parameter, like expression below

    Same name for attribute-parameter, like expression below

    Example of Semicolon parameters mappings:

    x1:unit >price;x2:quantity

    Mapping Name

    Yes

    Reject

    Reject

    Case insensitive

    Target Column

    Yes

    Reject

    No mapping if there is also no expression or lookup.

    Case insensitive

    Mapping Type

    No

    Field mapping

    Allow the field to be empty if there is no field mapping, no expression, and no lookup.

    Field Mapping /Expression/Lookup

    Field Mapping

    No

    Reject

    No mapping to this attribute.

    The name of the source field, or empty if this field is not mapped.

    Expression

    No

    No expression

    No expression in this attribute.

    Example of an expression value:

    ${x1}*${x2}

    Expression Params

    No

    All attribute-parameter mapping is trivial (same name)

    No expression in that attribute

    Example of Semicolon parameters mappings:

    x1:unit >price;x2:quantity

    Lookup Landing Database

    No

    No lookups

    No expression in that attribute

    Lookup Landing Database name

    Example:

    Northwind on MySQL

    Lookup Table

    No

    No lookups

    No expression in that attribute

    Lookup table or view name in schema table format.

    Example:

    Schema1.Orders

    Lookup Type

    No

    No lookups

    No expression in that attribute

    Table or View

    Lookup Condition Value

    No

    No lookups

    No expression in that attribute

    -

    Lookup Condition Params

    No

    No lookups

    No expression in that attribute

    Include Lookup/Landing.

    Example:

    x:$Lookup$.a;y:$Landing$.CustomerID

    Lookup Result Value

    No

    No lookups

    No expression in that attribute

    -

    Lookup Result Params

    No

    No lookups

    No expression in that attribute

    Same format as the lookup condition parameters.

    Did this page help you?

    If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!