text: 
    create or replace  view DATAVAULTDEMO_DB.SS_STG.v_stg_shippers  as (
      
  
  
  
  
  
  
  
      -- Generated by dbtvault.
  
  
  
  WITH source_data AS (
  
      SELECT
  
      SHIPPERID,
      COMPANYNAME,
      PHONE,
      CREATE_TS,
      UPDATE_TS
  
      FROM DATAVAULTDEMO_DB.SS_RAW.raw_shippers
  ),
  
  derived_columns AS (
  
      SELECT
  
      SHIPPERID,
      COMPANYNAME,
      PHONE,
      CREATE_TS,
      UPDATE_TS,
      'TPCH-SHIPPERS' AS RECORD_SOURCE,
      CURRENT_TIMESTAMP() AS LOAD_DATE
  
      FROM source_data
  ),
  
  hashed_columns AS (
  
      SELECT
  
      SHIPPERID,
      COMPANYNAME,
      PHONE,
      CREATE_TS,
      UPDATE_TS,
      RECORD_SOURCE,
      LOAD_DATE,
  
      CAST((MD5_BINARY(NULLIF(UPPER(TRIM(CAST(SHIPPERID AS VARCHAR))), ''))) AS BINARY(16)) AS SHIPPER_PK,
      CAST(MD5_BINARY(CONCAT_WS('||',
          IFNULL(NULLIF(UPPER(TRIM(CAST(COMPANYNAME AS VARCHAR))), ''), '^^'),
          IFNULL(NULLIF(UPPER(TRIM(CAST(PHONE AS VARCHAR))), ''), '^^'),
          IFNULL(NULLIF(UPPER(TRIM(CAST(SHIPPERID AS VARCHAR))), ''), '^^')
      )) AS BINARY(16)) AS SHIPPER_HASHDIFF
  
      FROM derived_columns
  ),
  
  columns_to_select AS (
  
      SELECT
  
      SHIPPERID,
      COMPANYNAME,
      PHONE,
      CREATE_TS,
      UPDATE_TS,
      RECORD_SOURCE,
      LOAD_DATE,
      SHIPPER_PK,
      SHIPPER_HASHDIFF
  
      FROM hashed_columns
  )
  
  SELECT * FROM columns_to_select
    );
  