Best Practices
Configuration recommendations for attributes, including data type selection, transformation expressions, and performance optimization.
Attribute Configuration
After scanning:
Review discovered attributes and verify inferred
DATA_PLATFORM_DATA_TYPECheck for unexpected polymorphic version activations
Review
HAS_EMBEDDED_CONTENT = TRUEattributes (stringified JSON)
Data type configuration:
Adjust
DATA_PLATFORM_DATA_TYPE_PRECISIONandDATA_PLATFORM_DATA_TYPE_SCALEfor numeric typesSet
DATA_PLATFORM_DATA_TYPE_DATETIMEFORMATwhenUSE_DATETIME_FORMAT = TRUEfor accurate parsingUse
ALIAS_NAMEfor readable column names (overridesPOLYMORPHIC_ATTRIBUTE_NAME)
Null handling:
Set
NULL_VALUE_EXPRESSION(only applies whenTRANSFORMATION_TYPE = 'No Transformation')Use
{attribute_name}placeholder in expressions
Transformations:
Use
TRANSFORMATION_EXPRESSIONwhenTRANSFORMATION_TYPE = 'SQL Expression'Document in
TRANSFORMATION_EXPRESSION_COMMENT
Virtual Attributes
Naming: No spaces allowed in attribute names. Names appear in generated SQL as CODE_GENERATED_COLUMN_NAME.
Transformation expressions:
Required field; must be valid SQL
Can reference other attributes using
{attribute_name}placeholderAutomatically set to
INCLUDE_IN_CODE_GEN = TRUE
Semantic model integration:
Set
W_QUESTION_CATEGORYfor Cortex Analyst (values:'dimensions','facts','filters','metrics','time_dimensions')Link to parent arrays when creating array-level virtual attributes
Polymorphic Versions
Review versions:
Check all 7 versions for each attribute
Monitor
VERSION_STATUS_DATEto track schema evolutionSet
INCLUDE_IN_CODE_GEN = FALSEfor versions you don't need
Handling polymorphism:
Use transformation expressions to handle type variations
Consider data quality implications when multiple versions are active
Monitor newly activated versions after scans
Version management:
Inactive versions are ready for activation (don't delete)
Only
activeversions withINCLUDE_IN_CODE_GEN = TRUEgenerate columns
Performance
Code generation:
Set
INCLUDE_IN_CODE_GEN = FALSEfor unused attributesReduces Dynamic Table size and refresh time
Child attributes only generated if
PARENT_INCLUDE_IN_CODE_GEN = TRUE
Clustering:
Set
ADD_TO_CLUSTER_BY = TRUEfor frequently queried attributesImproves query performance on large Dynamic Tables
Balance with refresh performance impact
Data type sizing:
Set appropriate
DATA_PLATFORM_DATA_TYPE_PRECISIONandDATA_PLATFORM_DATA_TYPE_SCALEAvoid over-sizing numeric types (wastes storage)
Last updated
Was this helpful?