feat: add realtime-box with Lookup Catalog sync workflows#440
Open
toru-takahashi wants to merge 1 commit into
Open
feat: add realtime-box with Lookup Catalog sync workflows#440toru-takahashi wants to merge 1 commit into
toru-takahashi wants to merge 1 commit into
Conversation
Adds realtime-box/lookup-catalog-sync with two variants:
manual/
lookup_catalog_sync.dig — iterates configured tables with explicit
column definitions
queries/ — SQL for digest init, extract, count, update
table-discovery/
lookup_catalog_sync.dig — auto-discovers tables via information_schema
sync_table.dig — reusable single-table sync called per table
scripts/generate_sql.py — type-aware JSON payload SQL generator
(supports array<varchar/bigint/double>,
float artifact fix, NULL element handling)
queries/discover_tables.sql — excludes _wf_* internal tables
Both variants implement hash-based change detection (only changed rows
are uploaded on each run) and use the _wf_ prefix for internal tables.
Co-Authored-By: Treasure Work <291137728+treasure-work@users.noreply.github.com>
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/Two variants for syncing
cdp_lookup_catalogtables to RT 2.0 internal storage:manual/— for environments with fewer than 5 tables or where explicit column control is neededlookup_catalog_sync.dig— iterates over a configured table listqueries/— SQL for digest initialization, change extraction, count check, and digest updatetable-discovery/— for environments with many tables or frequently changing schemas (requires additional feature flag, contact Treasure AI Support)lookup_catalog_sync.dig— auto-discovers tables viainformation_schemasync_table.dig— reusable single-table sync logicscripts/generate_sql.py— type-aware JSON payload SQL generator supportingarray<varchar>,array<bigint>,array<double>, scalar float artifact fix, and NULL element preservationqueries/discover_tables.sql— excludes_wf_*internal tablesBoth variants use hash-based change detection so only changed rows are uploaded on each run, and use a consistent
_wf_prefix for all internal/temporary tables.Test plan
manual/workflow against a testcdp_lookup_catalogtable and verify records appear in RT 2.0table-discovery/workflow and verify automatic table detection worksGenerated with Treasure Work