fivetran / dbt_quickbooks_source

Data models for QuickBooks built using dbt.
https://fivetran.github.io/dbt_quickbooks_source/
Apache License 2.0
5 stars 17 forks source link

[Feature] Add class table to staging tables #52

Open caseymkc opened 2 months ago

caseymkc commented 2 months ago

Is there an existing feature request for this?

Describe the Feature

I use this dbt package along with fivetran to create a P&L report of QuickBooks data. However, in my use case, I want to be able to reference the class name, which becomes a hassle if I have to go into each individual schema (I have 18 companies). Can you please add the class table as a staging table so I have access to the unionized data?

Describe alternatives you've considered

I am in the process of creating my own staging table with the unionized data but thought I would give it a shot to ask the experts.

Are you interested in contributing this feature?

Anything else?

No response

fivetran-reneeli commented 2 months ago

Hi @caseymkc, thanks for opening this! I'll circulate this with my team, but in the meantime I recommend forking the package and adding that staging model for class in your local repo for more immediate use. I also see you're willing to share that PR-- Let me know if you have questions about the process!

fivetran-reneeli commented 2 months ago

Also @caseymkc , I just wanted to clarify you want to be able to bring in the class field name specifically. Since class_id already exists in our end models, the class table would be brought in downstream via joining on class_id and source_relation (since you're using union schema feature to grab all 18 schemas) in order to retrieve the name.

image

caseymkc commented 2 months ago

@fivetran-reneeli I'm so sorry I meant the department table.. You're right class is already a staging table.

fivetran-reneeli commented 2 months ago

No worries! Though to be clear class isn't a table used in our package currently, neither is department. Here is a list of our staging models.

We can look to see if it's possible to add either table in, but it would help to get clarification on how class name or department name would get used in the end profit and loss model. Currently the grain is set at period and account. As class_id already exists in that P&L model, it would be straightforward to bring in class_name, but department I am less familiar with. image

I know you mentioned you're making your own staging table, so let us know if there's a PR you'd like us to take a look at, or if you want to discuss this live!

caseymkc commented 2 months ago

My apologies - I did mean class haha. We got out own staging class table working.