-
Notifications
You must be signed in to change notification settings - Fork 3
Global variables
Datavault4Coalesce by Scalefree is highly customizable by using many global variables. Since they are applied on multiple levels, a high rate of standardization across your data vault 2.0 solution is guaranteed.
The default values of those variables are set inside the macros section. You get there by opening your Coalesce environment, then clicking on the settings symbol in the lower left of your screen named "Build Settings" and in the tab that opens up you find the macros section. It's best practice to configure your variables by setting a namespace. The variables are set in a json-type format, so there is always a key and the referring value. The key is the name of the variable.
Here's some example code, on how to set the namespace and how to set variables:
{%- set datavault4coalesce = namespace(
config = {
"ldts_alias": "LDTS",
"rsrc_alias": "RSRC",
"ledts_alias": "LEDTS",
"snapshot_trigger_column": "IS_ACTIVE",
"sdts_alias": "SDTS",
"is_current_col_alias": "IS_CURRENT",
"hashkey_input_case_sensitive": "FALSE",
"hashdiff_input_case_sensitive": "TRUE",
"copy_rsrc_ldts_input_columns": "false",
"beginning_of_all_times": "0001-01-01T00:00:01",
"end_of_all_times": "8888-12-31T23:59:59",
"timestamp_format": "YYYY-MM-DDTHH24:MI:SS",
"default_unknown_rsrc": "SYSTEM",
"default_error_rsrc": "ERROR",
"error_value__STRING": "'(error)'",
"error_value_alt__STRING": "'e'",
"unknown_value__STRING": "'(unknown)'",
"unknown_value_alt__STRING": "'u'"
}
) -%}
All the following variables are prefixed with the name of the namespace, in this example datavault4coalesce.
To use the variables, you call the namespace (datavault4coalesce) seperated by a dot, then the dictionary of the variables (config) and then the variable you want to call.
So if you wan to call the variable ldts_alias you would use datavault4coalesce.config.ldts_alias
Name | Usage | Explanation |
---|---|---|
ldts_alias | Stage, DV entities | The name of the load-date column in all DV entities. Is generated in the staging area. |
rsrc_alias | Stage, DV entities | The name of the record-source column in all DV entities. Is generated in the staging area. |
ledts_alias | Version 1 Satellites | The name of the load-end date column in version 1 Satellites and MA-Satellites. |
sdts_alias | Snapshot Table, PITs | The name of the snapshot-date column in the snapshot table (+view) and all PITs. |
snapshot_trigger_ column | Snapshot Table, PITs, Post-Hook | The name of the column that shows the activation state of single snapshots. |
is_current_col_alias | Version 1 Satellites | The name of the column that indicates the current row per hashkey. |
Name | Usage | Explanation |
---|---|---|
hash_input_ case_sensititve | Stage | Whether the input for hashkey calculation should be case sensitive or not. |
hash_passthrough_ input_transformations | Stage | Whether the transformations of hash input columns should be applied in hash calculation or not. |
For each datatype there is a default unknown and error value defined. Additionally, an alternative, usually much shorter value is defined. See the applied default values in the table below.
Name | Usage | Explanation |
---|---|---|
beginning_of_ all_times | Stage, Satellites, PIT | The timestamp that represents your earliest technical timestamp. |
end_of_all_times | Stage, Version 1 Satellites, PIT | The timestamp that represents your latest technical timestamp. We recommend to not use the maximum possible timestamp of your database. |
timestamp_format | Stage, Version 1 Satellites, PIT | The timestamp format of the two previous variables. |
default_unknown_rsrc | Stage | The default unknown value for the record source column you want to use. |
default_error_rsrc | Stage | The default error value for the record source column you want to use. |
Datatype | Error Value | Error Value alt. | Unknown Value | Unknown Value alt. |
---|---|---|---|---|
STRING | (error) | e | (unknown) | u |
Table of Content
- Staging
- DV-Entities
- Hubs
- Links
- Satellites
- Standard Satellite
- Multi-Active Satellite
- Non-Historized Satellite
- Record-Tracking Satellite
- Business Vault
- PIT
- Snapshot Control
- Global Variables