-
Notifications
You must be signed in to change notification settings - Fork 2
wip: data federation #2
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
base: main
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,7 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move that to gen
| @@ -0,0 +1,98 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move that to gen
index.cds
Outdated
| using from './srv/workarounds'; | ||
|
|
||
| // simulate cds export | ||
| annotate sap.capire.flights.data with @cds.external; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2b replaced by cds export
srv/data-products.cds
Outdated
| key date, // preserve the flight date as a key | ||
| *, // include all other fields from my.Flights | ||
| } excluding { flight }; | ||
| } excluding { flight, date, free_seats }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Why excluding
date? → it's akeybtw → does that work at all? - Why excluding
free_seats?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this as the compiler was giving the following message. It was mostly added as a reminder.
Info[wildcard-excluding-one…]: This select item replaces “date” from table alias “Flights”. Add “date” to ‘excluding’ to silence this message
|
srv/data-products.cds:9:9-13, at entity:“sap.capire.flights.data.Flights”/query:1
|
9 | key date, // preserve the flight date as a key
| ^^^^
Info[wildcard-excluding-one…]: This select item replaces “free_seats” from table alias “Flights”. Add “free_seats” to ‘excluding’ to silence this message
|
srv/workarounds.cds:5:37-47, at entity:“sap.capire.flights.data.Flights”/query:1
|
5 | maximum_seats - occupied_seats as free_seats : Integer,
| ^^^^^^^^^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks for the background @BobdenOs
@stewsk : I'd recommend removing these info messages or just don't display info-level messages by default (as we do in cds compile). Reason (as frequently reiterated): such messages cause wrong reactions (see here, q.e.d.) or leads to broken window effects → devs not paying attention to compiler messages anymore at all (as in Nexus).
No description provided.