version: 2

models:
  - name: dim_product_variants
    description: >
      The dim_product_variants table is a dimensional table containing product variant information derived from e-commerce transactions.
    columns:
      - name: smcid
        description: >
          The SourceMedium ID of a store, which is derived from the store's myshopify.com domain.
        tests:
          - not_null

      - name: sm_product_variant_key
        description: >
          The unique product variant key created by SourceMedium that can be used to join product variant dimensions to related tables.
        tests:
          - not_null
          - unique

      - name: sm_product_key
        description: >
          The unique product key created by SourceMedium that can be used to join product dimensions to related tables.
        tests:
          - not_null

      - name: source_system
        description: >
          The e-commerce source system used to facilitate a customer's order.

      - name: product_variant_id
        description: >
          A unique identifier for the product variant generated by the source_system.

      - name: product_id
        description: >
          A unique identifier for the product generated by the source_system.

      - name: sku
        description: >
          The stock keeping unit (SKU) of the product variant.

      - name: inventory_item_id
        description: >
          The unique identifier for the inventory item.

      - name: product_variant_created_at
        description: >
          The date and time when the product variant was created.

      - name: product_variant_updated_at
        description: >
          The date and time when the product variant was last modified.

      - name: product_created_at
        description: >
          The date and time when the product was created.

      - name: product_updated_at
        description: >
          The date and time when the product was last modified.

      - name: product_variant_title
        description: >
          The title of the product variant.

      - name: product_title
        description: >
          The title of the product.

      - name: product_type
        description: >
          A categorization for the product used for filtering and searching for products.

      - name: primary_product_image
        description: >
          A URL used for the primary product image display on the shop.

      - name: product_collection_titles_csv
        description: >
          The titles of collections the product belongs to. Collections are groupings of products that merchants can create to make their stores easier to browse.

      - name: product_collection_handles_csv
        description: >
          Unique, human-readable strings for the collections a product belongs to automatically generated from their titles.

      - name: product_tags_csv
        description: >
          Tags that the shop owner has attached to the product.

      - name: product_tags_array
        description: >
          Tags that the shop owner has attached to the product in an array format.

      - name: product_vendor
        description: >
          The name of the vendor of the product.

      - name: is_product_gift_card
        description: >
          Whether the product is a gift card.