[Dachs-support] Per product facility
Markus Demleitner
msdemlei at ari.uni-heidelberg.de
Thu May 20 12:10:57 CEST 2021
Hi Yannick,
On Wed, May 19, 2021 at 08:38:44PM +0200, Yannick Roehlly wrote:
> Well, I managed to do it by putting a CASE SQL expression mapping the facility
> name to the value of the ssa_instrument in the facilityName property of the
> //obscore#publishSSAPMIXC mixin. ;-)
That's one way to do it...
For context: The problem is that SSA as such doesn't have facility
metadata.
The way I had planned this to be done is to have a facility column in
the sourcetable of the //ssap#view mixin, have that column's name in
the copiedcolumn attribute of the SSAP view table, and then use that
column in publishSSAPMIXC's facility_name attribute.
This pattern will of course work for anything else that varies
per-dataset and exists in obscore but not in SSAP (for instance,
dataproduct_subtype, if one ever needed it), even when things get too
complicated for a CASE in a VIEW.
But I don't see major drawbacks to going through CASE where that's
straightforward, either in later understandability or in performance.
-- Markus
More information about the Dachs-support
mailing list