According to the TransformationSpecification model, a slot_derivations list is allowed at the top level. The model says that it specifies "instructions on how to derive a set of top level slots in the target schema".
Based on that, I would expect that with this source schema:
# source schema
name: test_source
id: http://example.com/test_source
slots:
a_slot:
description: This is a top-level slot definition
range: string
classes:
AClass:
description: This is a top-level class definition
slots:
- a_slot
And this transformation spec:
# transformation spec
title: Transform test_source into test_target
source_schema: test_source
target_schema: test_target
slot_derivations:
a_slot:
derived_from: a_slot
overrides:
description: TOP-LEVEL DERIVED SLOT DEFINITION
class_derivations:
AClass:
populated_from: AClass
slot_derivations:
a_slot:
I think I would have expected that the top-level derivation of a_slot would have had an effect before the derivation of a_slot within the context of the AClass class derivation. In other words, I was expecting to get something like this as a result:
# expected target schema
name: test_source-derived
id: http://example.com/test_source-derived
default_prefix: http://example.com/test_source-derived/
classes:
AClass:
name: AClass
description: This is a top-level class definition
attributes:
a_slot:
name: a_slot
description: TOP-LEVEL DERIVED SLOT DEFINITION
alias: a_slot
domain_of:
- AClass
range: string
Instead I just get the a_slot description from the source top-level slot definition in the target schema:
# actual target schema
name: test_source-derived
id: http://example.com/test_source-derived
default_prefix: http://example.com/test_source-derived/
classes:
AClass:
name: AClass
description: This is a top-level class definition
attributes:
a_slot:
name: a_slot
description: This is a top-level slot definition
alias: a_slot
domain_of:
- AClass
range: string
According to the
TransformationSpecificationmodel, aslot_derivationslist is allowed at the top level. The model says that it specifies "instructions on how to derive a set of top level slots in the target schema".Based on that, I would expect that with this source schema:
And this transformation spec:
I think I would have expected that the top-level derivation of
a_slotwould have had an effect before the derivation ofa_slotwithin the context of theAClassclass derivation. In other words, I was expecting to get something like this as a result:Instead I just get the
a_slotdescription from the source top-level slot definition in the target schema: