fivetran / dbt_pendo_source

Fivetran staging data transformations for Pendo built using dbt.
https://fivetran.github.io/dbt_pendo_source/
Apache License 2.0
3 stars 5 forks source link

[Feature] Add picklist_poll_response to increase poll response coverage #24

Open bthomson22 opened 1 year ago

bthomson22 commented 1 year ago

Is there an existing feature request for this?

Describe the Feature

Currently, there is the below in the poll_response field for the poll_event source, noting that there is no way of obtaining the picklist response value:

https://github.com/fivetran/dbt_pendo_source/blob/3c7eccd2756d7fd313fa38e84b4e3cd519f6734b/models/src_pendo.yml#L546-L549

There is now a new table available from Pendo called picklist_poll_response which contains a response_id. This can be joined with poll_event via poll_response to provide the picklist value. And while this table isn't used very much downstream, it would be great to at least have all responses covered in the staging model.

Screenshot 2023-08-04 at 2 24 35 PM

Describe alternatives you've considered

No response

Are you interested in contributing this feature?

Anything else?

Here is an example query that's worked for us:

with

poll_events as (

    select * from raw.fivetran_pendo.poll_event

),

picklist_responses as (

    select * from raw.fivetran_pendo.picklist_poll_response

),

joined as (

    select
        poll_events.*,
        picklist_responses.response_text as picklist_response_text

    from poll_events
    inner join picklist_responses
        on poll_events.poll_response = picklist_responses.response_id

)

select
    poll_id,
    poll_response,
    picklist_response_text

from joined;
elanfivetran commented 1 year ago

Hey @bthomson22, thank you for staying engaged with the Pendo connector updates and that's great to hear you are finding value out of our package!

The addition of the picklist_poll_response table definitely provides a lot of value to our Pendo data as it allows customers to actually view the response in our polls so it makes a ton of sense that you would want that included in our models. As you have called out, because the poll responses are not used downstream it makes sense to only include it in the staging models for now.

Please feel free to open a PR with these changes and we will review it.