Customizing default attributes and transformations
It is possible to customize default attributes and their transformations according to your requirements and practices. For example, you can configure ADE to create attribute stg_create_time by default when creating a staging table. This attribute has a default transformation assigned to it, which sets current timestamp function to the attribute.
When creating a new entity with configured default attributes, they will appear in the new entity automatically. However, changes will not be propagated to old entities automatically.
See also:
Customizing default attributes
Staging
Staging tables in this example have metadata attributes stg_source_system, stg_create_time, stg_source_system, stg_source_entity and stg_file_name. It is a good practice to define the needed metadata attributes in staging tables so that they can be easily mapped to further data warehouse zones in loads.
Attribute | Default |
---|---|
stg_batch_id | x |
stg_create_time | x |
stg_source_system | x |
stg_source_entity | x |
stg_file_name | x |
attribute 1..n |
Configure your metadata attributes and other defaults with CONFIG_ENTITY_DEFAULTS. Here is an example configuration for the above metadata attributes:
Data Vault
Data Vault entities in the examples have been configured to include dv_source_system and dv_source_entity metadata attributes. Additionally, the Data Vault entities have been enriched with dv_package_version and dv_load_name default attributes to collect more metadata which can be useful e.g. for auditing and troubleshooting purposes.
Example for Hub table
In this example, Hub tables are created with the following default attributes. For Hub tables, there are default transformation types assigned.
Attribute | Default transformation type | Default |
---|---|---|
dv_id | DV_HASH | x |
dv_load_time | CURRENT_TS | x |
dv_run_id | RUN_ID | x |
dv_source_system | x | |
dv_source_entity | x | |
dv_package_version | PACKAGE_VERSION | x |
dv_load_name | LOAD_NAME | x |
business_key | DV_BUSINESS_KEY | x |
Configure your metadata attributes and other defaults with CONFIG_ENTITY_DEFAULTS. Default transformation types are references to values defined in CONFIG_TRANSFORMATION_FORMULAS package. More of that in section Customizing default transformations.
Example about configuring metadata attributes for hub table:
Example for Link table
In this example, Link tables are created with the following default attributes.
Attribute | Default |
---|---|
dv_id | x |
dv_load_time | x |
dv_run_id | x |
dv_source_system | x |
dv_source_entity | x |
dv_package_version | x |
dv_load_name | x |
dv_id_hub_1 | |
dv_id_hub_2 |
Persistent staging
Configuring new entity types and custom attributes for persistent stage is described in persistent staging section.
Dimensional
Entities in dimensional model can have default attributes and transformation types depending on the use case.
Attribute | Default |
---|---|
id | x |
load_time | x |
source_system | x |
attribute 1..n |
Customizing default transformations
Default transformation types for attributes can be configured in CONFIG_LOAD_TRANSFORMATIONS.
Example for configuring transformation types PACKAGE_VERSION and LOAD_NAME, which were used in Hub examples:
Tutorials
See the below videos for quick tutorials on how to create an entity type, a transformation type, and an entity type with transformation types and load steps.
https://youtu.be/dLFEaSaags0https://youtu.be/P9x3ynT5jMkhttps://youtu.be/hh9-jzCpkxc