- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2025 02:17 PM - edited 05-26-2025 02:21 PM
Is it just me or Genie´s generated SQL code failes to use composite keys -of the underlying related tables- as its default behavoir, regardless of the model having relationships declared explicitly.
Sometimes I have fixed this scenario by using an instruction -plain text-, sometimes by forcing the sql as an instruction but every time I have a new set of tables related by means of a composite key, Genie just won't use them as its default behavior. Then I have to juggle.
¿Are you experiencing this same behavior?
¿How are you tackling it?
- Labels:
-
Genie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 07:44 AM
Genie struggles with composite keys by design. A few things that might help:
- Clearly define your primary and foreign key relationships in Unity Catalog.
- Add example SQL queries that include composite joins to give Genie better context.
- Include explicit join instructions in your Genie space when needed.
- For more complex joins, you could try using materialized views, predefined joins, or even things like surrogate keys or hashed keys
- For complex joins, you could try using materialized views or predefined joins.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2025 07:24 AM
What has been useful the most is adding sql instructions using composite keys.