-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: Add Revenue Analytics v0 #30895
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
Conversation
fc8a40c
to
bcbe43b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR kickstarts Revenue Analytics v0 by refactoring revenue configuration, navigation, and API mocks while removing deprecated data warehouse settings.
- Updated revenue URL in
/frontend/src/layout/panel-layout/ProjectTree/defaultTree.tsx
fromurls.revenue()
tourls.revenueSettings()
. - Removed
dataWarehouseTables
fromMOCK_DEFAULT_TEAM
in/frontend/src/lib/api.mock.ts
to consolidate revenue event settings. - Added a new navigation item with
IconPiggyBank
in/frontend/src/layout/navigation-3000/navigationLogic.tsx
, gated by the REVENUE_ANALYTICS feature flag. - Introduced a new workspace dependency for Revenue Analytics in
/frontend/package.json
and adjusted schema types in/frontend/src/queries/schema/schema-general.ts
. - Configured new scene mapping and URL changes in
/frontend/src/scenes/appScenes.ts
and/frontend/src/scenes/urls.ts
for integration of the Revenue Analytics feature.
55 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
...lytics/backend/hogql_queries/test/test_revenue_example_data_warehouse_tables_query_runner.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Looked at the hogql/data warehouse querying code. This looks better and easier to work into materializations now
} | ||
|
||
|
||
class RevenueAnalyticsRevenueView(SavedQuery): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet
...evenue_analytics/backend/hogql_queries/revenue_example_data_warehouse_tables_query_runner.py
Show resolved
Hide resolved
Testing queries against data warehouse tables is extremely hard right now. We're doing it in different ways in different places. Let's standardize it by providing a common interface we can use everywhere: CSV files + single function to handle creating tables, sources, credentials, etc. Extracted from #30895
96aa010
to
cdaeb57
Compare
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
Size Change: -7.69 kB (-0.06%) Total Size: 13.2 MB
|
a0088b2
to
7665286
Compare
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
This our first attempt at Revenue Analytics. This is just the initial setup, configuring all of the file structure and attempting at using a virtual `view` to display this inside PostHog. We arent adding any charts yet, this is coming soon. We'll probably need to create cross-table views (for invoices and charges) but that's coming in a future PR, this is only the first PR to get an idea from the Data Warehouse team whether this makes any sense or not
Most werent necessary anymore, we've simplified the workflow by a lot now
Update query snapshots Update query snapshots Update UI snapshots for `chromium` (5) Update UI snapshots for `chromium` (5) Update UI snapshots for `chromium` (5) Update UI snapshots for `chromium` (5) Update UI snapshots for `chromium` (5)
96a9406
to
2c3849f
Compare
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
90d7b54
to
aa15cd9
Compare
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
There's one extra query now to check for Stripe sources
59f6162
to
1c4e1c4
Compare
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
Turns out increasing the number of queries in the test file was wrong, let's remove all of the N+1 queries
ca5a1bc
to
6c2fb5d
Compare
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
"products.early_access_features", | ||
"products.editor", | ||
"products.revenue_analytics", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note to check if the style changes are due to a local or different formatter; nothing is required on this PR.
Nice! I trust your changes; I did some quick local explorations on the pats I am familiar with, but they are very shallow. |
c0cf4d5
to
6346d07
Compare
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This our first attempt at Revenue Analytics. This is just the initial setup, configuring all of the file structure and attempting at using a virtual
view
to display this inside PostHog. We arent adding any charts yet, this is coming soon.We'll probably need to create cross-table views (for invoices and charges), but that's coming in a future PR. This is only the first PR to get an idea from the Data Warehouse team whether this makes any sense or not
Supersedes #30704