Skip to content
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

Some Update Considerations... #20

Closed
justin-meisner opened this issue Feb 7, 2025 · 2 comments
Closed

Some Update Considerations... #20

justin-meisner opened this issue Feb 7, 2025 · 2 comments

Comments

@justin-meisner
Copy link

justin-meisner commented Feb 7, 2025

Notes picked up from debugging with Kam on the CardZone.Dimensions merge query.

The merge query generated by the manifold generate produces an equality check on target.{vector} = source.dimensions, where the Dimensions table structures the vectors under a dimensions label. The equality check should be target.dimensions.{vector} = source.dimensions.{vector}

Does the dimensions.json generator support REPEATED fields, something like Cards.pageIds is a REPEATED field, can we specify that in the yaml file for table json generation?

@justin-meisner
Copy link
Author

Successful merge query format

MERGE CardZone.Dimensions AS TARGET
USING (
SELECT
  id,
  STRUCT(
    (SELECT AS STRUCT Cards.* EXCEPT (settings)) AS card
  ) AS dimensions
FROM Gradius.Cards

) AS source
ON source.id = target.id
WHEN MATCHED THEN UPDATE SET target.dimensions.card = source.dimensions.card
WHEN NOT MATCHED THEN INSERT ROW;

@claytongentry
Copy link
Member

All notes addressed in
#21
#22
and
#23

We'll need to configure dimensions merges at the workspace level for now (as implemented in #23). The vector-level approach will break down for intersections. Still, should be good for now! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants