view: dt_vendor_icon {
  sql_table_name: INTELLIGENCE.DBT_PROD.DT_VENDOR_ICON ;;
  # Or, you could make this view a derived table, like this:
#   derived_table: {
#     sql:
# SELECT
#     vendor_id,
#     'https://images.theorchard.com/vendor/vendor_icon/' || path || filename AS img_path
# FROM orchard_app_reporting_v2.art_relations_prod_art_relations.vendor_icon vi
# INNER JOIN orchard_app_reporting_v2.art_relations_prod_art_relations.image_assets ia ON vi.image_asset_id=ia.id
#       ;;
#   }

dimension: vendor_id {
  type: number
  sql: ${TABLE}.vendor_id ;;
  hidden: yes
  primary_key: yes
}

dimension: vendor_icon {
  type: string
  sql: ${TABLE}.img_path ;;
  label: "Label Icon"
  html: <img src="{{ value }}" width="100" height="100"/>;;
}

}
