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] Include property labels alongside property internal values #116

Closed
2 of 4 tasks
codingcyclist opened this issue Aug 31, 2023 · 10 comments
Closed
2 of 4 tasks
Assignees
Labels
priority:p3 Affects many users; can wait status:in_progress Currently being worked on type:enhancement New functionality or enhancement update_type:models Primary focus requires model updates

Comments

@codingcyclist
Copy link

Is there an existing feature request for this?

  • I have searched the existing issues

Describe the Feature

Any property in HubSpot has an internal value and a label. Especially for properties provided by HubSpot (e.g. Persona), the label is much easier to interpret than the internal value (see screenshot). Hence, In many cases, it's not the internal value but the property label that you'd want to surface in your reports and dashboards.

image

As the current dbt-hubspot plugin is not passing through the property labels from the property_option table, I'd suggest adding a use_property_label option to the pass-through column configuration, e.g.:

hubspot__contact_pass_through_columns:
    - name: property_hs_persona
      alias: persona
      use_property_label: true

Describe alternatives you've considered

The only alternative that seems reasonable is to build custom dbt models that join the property labels from the property_option table and the hubspot_{contacts,companies,deals} tables together, based on property_option.value

Are you interested in contributing this feature?

  • Yes.
  • Yes, but I will need assistance and will schedule time during your office hours for guidance.
  • No.

Anything else?

No response

@codingcyclist codingcyclist changed the title [Feature] Include property labels alongside property values [Feature] Include property labels alongside property internal values Aug 31, 2023
@fivetran-jamie
Copy link
Collaborator

hi there @codingcyclist thanks for taking the time to open this feature request! I agree that this seems very valuable to incorporate into the package.

I'd like to confirm that I'm understanding correctly:

So in your example, you are currently passing through property_hs_persona as persona, but the values are coming through as persona_1, persona_2, etc . However, it would be much more useful to have the package map these onto their longform labels of Reviewer, Economic buyer, etc

Are there cases where you would want to have both the internal value and the label in your end models?

@codingcyclist
Copy link
Author

Hi @fivetran-jamie thanks a lot for your kind and timely response, I really appreciate that!

Your understanding is exactly right: We're passing through property_hs_persona as persona, but instead of the values coming through as persona_1, persona_2, we'd like them to come through as Reviewer, Economic buyer etc.

I can totally see cases where one would want to have both the internal value and the label in the end model. For instance, when the end model is not only used for reports but also for reverse ETL. In that case, one would like to show the labels in the reports and use the internal value of the property for the reverse ETL use case.

Do you think it's feasible to surface both the label and the internal value in the end model, maybe with a suffix?

@fivetran-jamie
Copy link
Collaborator

Yes I think that's feasible! I was thinking we'd add a suffix to the label version of each field (and not to the internal value version), so as to not to potentially break people's current transformations

In your case, would you want both the label and internal value automatically for all property_* passthrough fields, or would you want to pick and choose which fields you bring the labels in for?

@codingcyclist
Copy link
Author

Amazing! We'd definitely prefer to be able to configure it per passthrough field whether we bring in the labels or not. However, if that makes the required code changes a lot more complex, it would also suffice to just always get both the internal values and labels. Do you already have a sense of how long it would take to implement the required changes?

@fivetran-jamie
Copy link
Collaborator

Cool! I will plan to include this in our next sprint (starting in two weeks), so i would say you could expect this in 4-6 weeks.

However, I do see you are interested in opening a PR! If you are still interested, we would happily welcome your PR and our team will prioritize its review once it comes through. Let me know if you are still interested or if you have any questions around opening a PR.

@codingcyclist
Copy link
Author

Hi @fivetran-jamie - that's fantastic 🙌 . With my limited context on the package's internal workings, I think my turnaround on this issue would be a lot longer than 4-6 weeks. Hence, I'm very glad the team can pick this up as part of the next sprint, Thanks a lot!

@fivetran-jamie fivetran-jamie added priority:p3 Affects many users; can wait type:enhancement New functionality or enhancement status:scoping Currently being scoped labels Sep 13, 2023
@fivetran-catfritz
Copy link
Contributor

@codingcyclist To update you, I have picked up this task and aim to have something for you to try in the next week!

@fivetran-catfritz fivetran-catfritz self-assigned this Nov 10, 2023
@fivetran-catfritz fivetran-catfritz added status:in_progress Currently being worked on update_type:models Primary focus requires model updates and removed status:scoping Currently being scoped labels Nov 10, 2023
@codingcyclist
Copy link
Author

Wonderful @fivetran-catfritz
I really appreciate it and look forward to trying it out

@fivetran-catfritz
Copy link
Contributor

fivetran-catfritz commented Nov 11, 2023

Hi @codingcyclist. I have a test branch you can try out! You can install it by using the below snippet in your packages.yml in place of your normal hubspot lines.

- git: https://github.com/fivetran/dbt_hubspot.git
  revision: release/v0.15.0
  warn-unpinned: false

You would enable the columns by setting them in your vars exactly the way you imagined it in your proposal. You will also need sales enabled.

vars:
  hubspot_sales_enabled: true
  hubspot__contact_pass_through_columns:
    - name: property_hs_persona
      alias: persona
      use_property_label: true

should work perfectly. Alternatively, if you want to pass through several columns and don't want to have to flag use_property_label each time, you can also set hubspot__enable_all_property_labels: true. like the following

vars:
  hubspot_sales_enabled: true
  hubspot__enable_all_property_labels: true
  hubspot__contact_pass_through_columns:
    - name: property_hs_persona
      alias: persona
    - name: property_hs_#2
    - name: property_hs_#3

I'd love to know your feedback if you are able to try it out!

@fivetran-catfritz
Copy link
Contributor

This update has been released in the latest version, so closing this issue out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p3 Affects many users; can wait status:in_progress Currently being worked on type:enhancement New functionality or enhancement update_type:models Primary focus requires model updates
Projects
None yet
Development

No branches or pull requests

3 participants