Skip to content
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

slot_derivations at top-level of TransformationSpecification has no effect in SchemaMapper #47

Open
pkalita-lbl opened this issue Dec 19, 2024 · 0 comments

Comments

@pkalita-lbl
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant