Solved

Prepend Event Category to Data Warehouse Sync

  • 13 February 2023
  • 2 replies
  • 54 views

Userlevel 2
Badge

Hello fellow Heapsters,

Hopefully your morning cup of espresso was zesty yet smooth.

I am looking into events and event categories in an attempt to organize our data in Snowflake. I was pleasantly surprised to see that event categories are prepended to events when synced. However, this does not happen for all events. 

Is there a reason why some events in my warehouse have the category prepended and some do not? Ideally 100% would have the category prepended.

Thanks in advance,

Chase

 

icon

Best answer by jonathan 15 February 2023, 01:41

View original

2 replies

Badge +1

Hi Chase!

Happy to help! Happy Tuesday :)

Would you check to make sure the events without the category prepended are assigned a category within Heap? Its entirely possible they were not assigned a category when created.

Also, if further debugging is required, would you mind sharing a redacted screenshot sample of what you mean? Also, would you share a redacted screenshot of the same defined events in Heap?

This will help provide context. 

Thanks!

-Frank Martens

Solutions Consultant

Userlevel 5
Badge +3

Hey @Chase Sommer Loves Heap omg — Naming in the Heap app and naming in Heap Connect are not strictly coupled (although they were until quite recently!). What you might be seeing is a result of some before/after behavior. Previous behavior was that the two names were inextricably coupled, so that if you changed something in the app (modify the name of the event, or (re)categorize the event), it would force a change downstream.

This was generally undesirable as it could break pipelines.

One caveat here: Heap did not and does not prepend “custom_events_” before events that are stored in the default Custom Events category. This category is “special” in that it is created to store materialized track events (i.e. non-autocaptured events). There’s a chance that this is what you’re seeing.

 

In general, the current expected behavior is:

  • When you turn on an event to sync for the first time, you’ll trigger a modal, with a suggested name, which will be the concatenation of the category and event name. You can call it whatever you like, but let’s assume you keep it as is. 
  • If you change the event as per above, renaming it or recategorizing it, the event name will not change. In both the Connect section of the event definition view, or in the Connect console under Integrations, you’ll see the UI name and the Heap Connect name. This mapping is also exposed downstream in the `_event_metadata` table
  • This means you can now organize things in the app for app users, and set your downstream schema for your downstream users, completely independently. This is a Good Thing for your data engineers, but may take a minute to get used to. 

The good news of course is that if you want to have your custom events prepended with “custom_events_” you can go into the app and make it so!

 

Initial naming

 

Changing the app name, preserving the connect name
Renaming Connect name (after clicking pencil icon)

 

 

Hope this helps!

Reply