Allow Snowplow Compatible Funnel SQL
requested to merge 399234-update-product_analytics-funnels-api-to-return-snowplow-compatible-sql into master
What does this MR do and why?
Updates funnel queries in product analytics when using the product_analytics_snowplow_support
feature flag
How to set up and validate locally
- Setup the product analytics devkit
- Define funnels using example file from the documentation in your project at
.gitlab/product_analytics/funnels
in the repo - Enable the
product_analytics_snowplow_support
feature flag - GET the API at
http://gdk.test:3000/api/v4/projects/(project id)/product_analytics/funnels
- The response should be similar to
[
{
"name": "completed_purchase",
"sql": " SELECT\n (SELECT max(derived_tstamp) FROM snowplow_events) as x,\n windowFunnel(3600)(toDateTime(derived_tstamp), page_urlpath = '/page1.html', page_urlpath = '/page2.html', page_urlpath = '/page3.html') as step\n FROM gitlab_project_2.snowplow_events\n",
"steps": [
"page_urlpath = '/page1.html'",
"page_urlpath = '/page2.html'",
"page_urlpath = '/page3.html'"
]
}
]
- Specifically, make sure the
sql
is selecting fromsnowplow_events
instead ofjitsu
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #399234 (closed)
Edited by Allen Cook