Attribute Metadata Bulk Updates (Security) - Execute
Select and export the attribute metadata to a .csv file, edit in a spreadsheet like Google Sheets or Excel, then perform a bulk update for core and security attribute metadata in DataPancake.
Ensure you have completed Attribute Metadata Bulk Updates (Security) - Setup
1. Open a new Snowflake worksheet

2. Run a select statement for DATAPANCAKE.CORE.VW_DATASOURCE_ATTRIBUTE_SECURITY
The minimum field requirements to select are attribute_id, polymorphic_version_id
- for example:
select ATTRIBUTE_ID, POLYMORPHIC_VERSION_ID
from datapancake.core.vw_datasource_attribute_security
where version_status = 'active';
This SQL statement includes key view-only fields along with all editable fields:
select
-- VIEW ONLY COLUMNS
DATASOURCE_ID,
DATASOURCE_NAME,
DATASOURCE_TAG,
DATASOURCE_VERSION_ID,
VERSION_NUMBER,
ATTRIBUTE_ID,
ATTRIBUTE_PATH,
ATTRIBUTE_NAME,
PARENT_OBJECT,
PARENT_ARRAY,
ATTRIBUTE_LEVEL,
ATTRIBUTE_ORDER,
ATTRIBUTE_LAST_UPDATED_DATETIME,
ATTRIBUTE_LAST_UPDATED_BY,
POLYMORPHIC_VERSION_ID,
SOURCE_DATA_TYPE,
POLYMORPHIC_ATTRIBUTE_NAME,
IS_ARRAY,
ARRAY_TYPE,
ARRAY_PRIMITIVE_TYPE,
VERSION_STATUS_DATE,
SAMPLE_VALUE,
HAS_EMBEDDED_CONTENT,
VERSION_STATUS,
DATA_PLATFORM_DATA_TYPE,
-- EDITABLE COLUMNS
NUMERIC_PRECISION,
NUMERIC_SCALE,
USE_DATETIME_FORMAT,
DATETIME_FORMAT,
ATTRIBUTE_RECORD_STATUS,
IS_UNIQUE,
IS_PRIMARY_KEY,
CONTAINS_ENUM_VALUES,
INCLUDE_COLUMN_IN_SECURE_VIEW,
INCLUDE_ARRAY_IN_CODE_GEN,
ARRAY_RELATIONSHIP_NAME,
ARRAY_RELATIONSHIP_DESCRIPTION,
ARRAY_RELATIONSHIP_TYPE,
ARRAY_RELATIONSHIP_JOIN_TYPE,
RAW_TRANSFORMATION_TYPE,
RAW_TRANSFORMATION_EXPRESSION,
RAW_TRANSFORMATION_EXPRESSION_COMMENT,
RAW_NULL_VALUE_EXPRESSION,
SEMANTIC_LAYER_TRANSFORMATION_EXPRESSION,
SEMANTIC_LAYER_TRANSFORMATION_EXPRESSION_COMMENT,
RAW_ALIAS_NAME,
SEMANTIC_LAYER_ALIAS_NAME,
CONSOLIDATION_REGEX_SEARCH,
CONSOLIDATION_SQL_EXPRESSION,
ARRAY_ROW_ACCESS_POLICY_NAME,
INCLUDE_COLUMN_IN_ROW_ACCESS_POLICY,
ROW_ACCESS_POLICY_COLUMN_ORDER,
COLUMN_MASKING_POLICY_NAME,
COLUMN_MASKING_POLICY_PARAMETERS
from datapancake.core.vw_datasource_attribute_security
where version_status = 'active'
order by attribute_path;

3. Verify the query successfully returns a list of attribute metadata
4. Download the results as a .csv file

5. Open the .csv file in either Excel or Google Sheets

6. Edit any editable columns as needed

7. Save (Excel) or download (Google Sheets) the file

8. Load the .csv into your stage




9. Run the bulk update stored procedure
When the stored procedure completes, the attribute metadata file will be moved to the archive folder.
call <database>.<schema>.sp_update_datapancake_attribute_metadata_security(
'@<stage_name>/<staged_attribute_metadata_filename>.csv',
'@<stage_name>/<archive_folder>/',
'<snowflake_username>'
);

10. Verify the integration completed successfully by running the following query
select * from datapancake.core.vw_integration_process
where user_name = 'BWOLFF'
order by integration_process_date desc;

Last updated