-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(schema-compiler): add meta property for cube definition #7327
feat(schema-compiler): add meta property for cube definition #7327
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 8 Ignored Deployments
|
I allowed for arbitrary values in I really didn't want to treat |
@mharrisb1 Overall, it looks good to me! Could you please elaborate on null use case for meta? |
@paveltiunov truthfully I don't have any in mind (at least not for my team), but I'm sure other teams might have a need. Maybe something like: cubes:
- name: orders
sql: `select * from public.orders`
meta:
icon_png: null
- name: accounts
sql: `select * from public.accounts`
meta:
icon_png: gs://path/to/some/blob.png A user can just use an empty string instead of null but they'd have to run into the unexpected input error first before they would know to try that, and that just feels like throwing darts at the wall and seeing what sticks. Maybe for now, instead of me anticipating an imaginary use case, we remove support for null values in meta and let someone post an issue if they have a concrete use case. |
@paveltiunov I went ahead and removed support for nulls |
I think there's also a use case when |
@paveltiunov @mharrisb1 Do we need more tests here, e.g., for |
Good call. Developer flexibility is probably the way to go. @paveltiunov I haven't dug in too deep on the compiler code for this PR, but what would happen if For example, if we had this YAML config: cubes:
- name: orders
sql: `select * from public.orders`
title: null Would an error be thrown for cube(`orders`, {
sql: `select * from public.orders`,
title: null,
}); If so, then could we just transpile the YAML code as is and let the error come from JS? |
@igorlukanin another good call. I was manually testing this by building the dev Docker image and running locally but actual tests would be better. Can you point me to the integration tests where this would be added? I'm still trying to get familiarized with the codebase |
i think that |
@mharrisb1 Ah. Gotcha. I thought there was |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7327 +/- ##
=======================================
Coverage 48.02% 48.03%
=======================================
Files 154 154
Lines 20893 20897 +4
Branches 5378 5380 +2
=======================================
+ Hits 10033 10037 +4
Misses 10120 10120
Partials 740 740
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…hub.com:mharrisb1/cube into mharrisb1/feat/meta-property-on-cube-definition
I reverted the removal of null support in meta 👍 |
this would be super useful for my team! |
@paveltiunov Do you have any timeline on when this could be integrated into the main branch? |
@mharrisb1 Sorry for delay. Could you please rebase one more time? |
…meta-property-on-cube-definition
…meta-property-on-cube-definition
Saw that the commit for docs was deleted in previous large merge. Added back now. |
Issue Reference this PR resolves
#1539 and #6792
Description of Changes Made
Adds support for
meta
property at the cube and view level.Examples (added to reference docs):