Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add parent_account_id to netsuite2_transaction_details #141

Closed
2 of 4 tasks
kenzie-marsh opened this issue Oct 1, 2024 · 5 comments
Closed
2 of 4 tasks
Assignees
Labels
status:in_progress Currently being worked on type:enhancement New functionality or enhancement

Comments

@kenzie-marsh
Copy link

Is there an existing feature request for this?

  • I have searched the existing issues

Describe the Feature

Add parent account id to the select statement (along with the parent account name which is already present)

How would you implement this feature?

coalesce(parent_account.account_id, accounts.account_id) as parent_account_id, to line 152 on the netsuite2_transaction_details model, in keeping with the account name field

Describe alternatives you've considered

Currently we are having to join to the stg accounts table data downstream to bring in the id

Are you interested in contributing this feature?

  • Yes.
  • Yes, but I will need assistance.
  • No.

Anything else?

If this solution seems reasonable, I could implement it. thanks!

@kenzie-marsh kenzie-marsh added the type:enhancement New functionality or enhancement label Oct 1, 2024
@fivetran-jamie
Copy link
Contributor

Hey there @kenzie-marsh thanks for opening this, I think this makes a ton of sense to add!

If you're still down to implement, we'd want to include the following:

  • Add the coalesce(parent_account.account_id, accounts.account_id) as parent_account_id line to the model
  • Document the new parent_account_id field in netsuite2.yml
  • (If you have time) Uptick the package version to v0.15.0 (here, here, and the range here), as this is a new field on an incrementally materialized model and therefore requires a full refresh/is a breaking change.
  • (If you have time) Note the addition of the new field in a CHANGELOG.md entry for v0.15.0

And we'll prioritize reviewing, polishing, and merging in your PR 🎉

@kenzie-marsh
Copy link
Author

thanks @fivetran-jamie I just ran into a similar problem, where we also really need the location ID for the purpose of later joins, but the transaction details table only includes the following (line 192):

    locations.name as location_name,
    locations.city as location_city,
    locations.country as location_country,

I haven't actually made a change like this before that would require a version upgrade and whatnot. Plus, considering that I've found a few of these now, I think it would be helpful to get someone from Fivetran's eyes on this to make sure that other cases where IDs could be useful are also added in. Do you think that would be possible?

@fivetran-jamie
Copy link
Contributor

@kenzie-marsh We actually have an open ticket for adding in ID columns like location_id here #67

I've added all the ID fields we're still missing from netsuite2_transaction_details (based on which tables we're joining in) -- let me know if I've missed anything y'all are looking for from this comment

Also if you're still open to creating a PR, we'd be happy to apply all the version-upgrading stuff and polishes from our end!

@kenzie-marsh
Copy link
Author

That ticket looks perfect!! Would be so so helpful.

Are y'all planning on working on that, can I upvote it or anything like that? I don't think I'd be able to create that PR unfortunately

@fivetran-avinash
Copy link
Contributor

HI @kenzie-marsh , parent_account_id should now be live in netsuite2_transaction_details in the latest release of dbt_netsuite. Reach out if you have any questions or comments! I will go ahead and close this issue, thanks for reporting it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:in_progress Currently being worked on type:enhancement New functionality or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants