feat: add realtime-box with Lookup Catalog sync workflow#442
Merged
Conversation
Adds realtime-box/ for Treasure AI RT 2.0 workflow templates. ### realtime-box/lookup-catalog-sync/ Syncs tables from `cdp_lookup_catalog` to RT 2.0 internal storage using hash-based change detection — only changed rows are uploaded on each run. - `lookup_catalog_sync.dig` — auto-discovers tables via information_schema, inits digest tables with dynamic key column, syncs all or a single table - `scripts.py` — type-aware JSON payload SQL generator supporting array<varchar>, array<bigint>, array<double>, scalar float artifact fix, and NULL element preservation - `queries/discover_tables.sql` — discovers eligible tables, excludes _wf_* internal and legacy digest/updated tables Key behaviours: - Digest table key column derived dynamically from each table's first column - p_table_name can be set to sync a single table (useful for testing) - All internal/temporary tables use a consistent _wf_ prefix Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 tasks
…ference Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parulsaran
reviewed
Jun 29, 2026
parulsaran
reviewed
Jun 29, 2026
parulsaran
approved these changes
Jun 29, 2026
parulsaran
left a comment
There was a problem hiding this comment.
Left few comments, please take a look.
LGTM, Thanks!
- discover_tables.sql: skip tables with only a time column by requiring at least one non-time column via a subquery on information_schema.columns - README: clarify that the first (key) column must be String type - README: add Error Handling section documenting Invalid JSON Payload errors from the bulk-load API, common causes, and error response format Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Thank you!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
realtime-box/directory for Treasure AI RT 2.0 workflow templates, starting with the Lookup Catalog sync workflow.realtime-box/lookup-catalog-sync/Syncs tables from
cdp_lookup_catalogto RT 2.0 internal storage using hash-based change detection — only changed rows are uploaded on each run.lookup_catalog_sync.diginformation_schema, inits digest tables, syncs all or a single tablescripts.pyarray<varchar>,array<bigint>,array<double>, scalar float artifact fix, and NULL element preservationqueries/discover_tables.sql_wf_*internal and legacy digest/updated tablesKey behaviours:
_key)p_table_namecan be set to sync a single table (useful for testing)_wf_prefixTest plan
cdp_lookup_catalogtable and verify records appear in RT 2.0p_table_nameand verify single-table sync works🤖 Generated with Claude Code