posthog
posthog copied to clipboard
feat(data-warehouse): integrate direct query tables with BI scene HogQL
Summary
- Add
--pg:source_uuiddirective parsing to identify external Postgres sources - Register direct query tables in HogQL database for query resolution
- Create
PostgresTableinstances with proper field type mappings from schema metadata - Execute queries against external Postgres via psycopg2
- Frontend passes source UUID with
--pgdirective for direct query tables
Test plan
- [ ] Create a direct query Postgres data source
- [ ] Verify tables appear in BI scene list
- [ ] Click a table and verify query executes against external Postgres
- [ ] Verify field types are correctly mapped
đ¤ Generated with Claude Code
Size Change: 0 B
Total Size: 3.66 MB
âšī¸ View Unchanged
| Filename | Size |
|---|---|
frontend/dist/toolbar.js |
3.66 MB |
đ Migration Risk Analysis
We've analyzed your migrations for potential risks.
Summary: 1 Safe | 0 Needs Review | 0 Blocked
â Safe
Brief or no lock, backwards compatible
data_warehouse.0012_add_is_direct_query
ââ #1 â
AddField
Adding NOT NULL field with constant default (safe in PG11+)
model: externaldatasource, field: is_direct_query
Last updated: 2025-12-10 14:40 UTC (2e5956b)
âī¸ Skipped snapshot commit because branch advanced to `` while workflow was testing 2e5956b.
The new commit will trigger its own snapshot update workflow.
If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:
- Merge master into your branch, or
- Push an empty commit:
git commit --allow-empty -m 'trigger CI' && git push