Add default models for Shopify extractor

  • Add table definitions and designs for base transformed tables: model-shopify!1 (merged)
  • Replicate Shopify's Sales report:
    • Orders: The number of orders that were placed on a given date.
    • Gross sales: Equates to product price x quantity (before taxes, shipping, discounts, and returns) for a collection of sales. Canceled, pending, and unpaid orders are included. Test and deleted orders are not included.
    • Discounts: Equates to line item discount + order level discount share for a collection of sales.
    • Returns: The value of goods returned by a customer.
    • Net sales: Equates to gross sales - discounts - returns.
    • Shipping: Equates to shipping charges - shipping discounts - refunded shipping amounts.
    • Tax: The total amount of taxes based on the orders.
    • Total sales: Equates to gross sales - discounts - returns + taxes + shipping charges.

Potential issues:

  • When grouping by day/month/year, and there were no orders at all on a given date, no row is returned instead of a row with all 0s, so the date doesn't show up in the graph at all. We may need to pre-aggregate? #1785 (comment 298754435): dbt-tap-shopify#1 (closed)
  • Grouping per date shows different results than on Shopify, possibly because of timezones (wontfix)
  • #1838 (closed)
  • Sales model doesn't have a primary key; may cause problems with HDA?
  • No taxes in test shop
Edited by Douwe Maan