fivetran / dbt_shopify

Fivetran's Shopify dbt package
https://fivetran.github.io/dbt_shopify/
Apache License 2.0
55 stars 41 forks source link

Add refund amounts to this package #2

Closed kristin-bagnall closed 3 years ago

kristin-bagnall commented 3 years ago

Add logic to account for both:

Complications:

bthomson22 commented 3 years ago

It looks like the TRANSACTIONS table includes information related to refunds.

For order refund amounts, we should be able to join orders with transactions based on order_id, and then can include refund amount by filtering by kind = refund and grabbing the amount.

For order line refund amounts, this table has a refund_id that we can use to join with the transactions table to get the amount as well.

For both instances, will need to account for status = success and kind = refund to parse relevant information.

I'd be happy to start a PR for this - but fair warning this would be my first ever :)

kristin-bagnall commented 3 years ago

This has been added and deployed with version 0.3.0 :)