DSharp.fi
  • Home
  • Solutions
    • DSharp PathFinder
    • DSharp Studio
    • DSharp Studio Modeler
    • Pricing and Licenses
  • Services
    • Professional services
    • DSharp Training Program and Certifications
    • Developer Support
  • Customers
    • Our Customers
    • Customer Success Stories
      • Pirte’s Data Platform Modernization Boosts Data-Driven Healthcare
      • A City Expanded Its Data Warehouse with Library Data
      • Varha – a wellbeing services county – built a data-driven management system
      • From Double Checks to Smooth Automation – DSharp Studio Simplified Early Childhood Education Data Management
      • Productivity Leap improved Metsähallitus’ data management with DSharp Studio
  • Partners
    • Our Partners
    • Partner Stories
    • Become a Partner
  • Resources
  • Articles
    • Data warehousing
      • Data Warehouse concepts and data models
      • DSharp Studio Release: Extended Data Catalog and New Find Command
    • Reporting automation
      • Automate data pipelines
      • Making Data Management Easier with Automation
      • Metsähallitus enhanced its data management with DSharp’s data platform tool
    • Data modeling and mapping
      • Data Warehouse concepts and data models
      • Data vs Business Driven Modeling
  • About
    • About us
    • Contact us
    • Recruiting
  • Book a Demo
  • Start a Trial
  • Menu Menu
  • Features
    • DSharp Studio Features
    • DSharp Studio Modeler Features
    • Command Reference
    • Release Notes
    • Installation Guide
  • Modeling
    • Design Considerations
      • Data vs Business Driven Modeling
      • The Business Key
    • Basics
      • Model Types
      • Archetypes
      • Datatypes
    • Raw Model
      • Source Mappings
      • Metadata
    • Business Model
      • Metadata
  • Course Material
    • DSharp Studio Professional Course
    • DSharp Studio Expert Course
  • Legacy
    • DSharp Engine Features
      • Mapping Source Data in DSharp Engine
    • DSharp Engine Command Reference
    • DSharp Engine Installation Guide
    • 3rd Party Modeling Tools
      • Visual Paradigm
        • Modeling With Visual Paradigm
        • Configuring Data Vault 2.0 And Servers
        • Implementing Mappings
        • Setting Up
          • Import Stereotypes
          • Configure UI
      • Ellie
        • Modeling With Ellie
        • Ellie Metadata
    • Course Material
      • Intro Course
      • Advanced Course
  • Community
  • FAQ

Tutorial 09 – Derived Classes

What We Learn

We study examples of how to create mappings between classes, derived as well as standard.

Modeling

The model file for tutorial 9 contains derived classes with example mappings. All derived classes can also be found in a Class Diagram called Derived classes. You can use this diagram to deploy all derived classes in one go.

See here for more information about the syntax.

Hint: double-click on a class-to-class mapping or open a derived class in a Data Flow diagram.

Some cases:

  • Automatic mapping of similar properties (attributes and association ends)
    • Most Code/Name/Parent organization units: No explicit property assignments needed
  • Calculating values for attributes (class Just to show some cases)
    • Constants
    • Direct references to the source class’ properties
    • Direct references to a column in the source
    • Calculations using constants as well as property references
    • Subquery as value
    • Using parameters @SourceHash, @Source
  • Creating a new class containing a subset of another class
    • Person -> Child
  • Replacing a class with another
    • Employee -> Employee
  • Building a custom class
    • Project membership -> Project member
  • Denormalizing different structures
    • Fixed level organization unit  -> Fixed level to flat
    • Fixed level organization unit  -> Fixed level to flat 2
    • Recursive organization unit -> Recursive to reverse ragged
    • Recursive organization unit -> Recursive to same flat as source
    • Recursive organization unit -> Recursive to full flat
  • Mapping between raw model classes
    • Organization unit -> Recursive organization unit
  • Merging several classes to one
    • Fixed level organization unit -> Merged organization unit
    • Fixed level organization level 1 -> Merged organization unit
    • Fixed level organization level 2 -> Merged organization unit
    • Fixed level organization level 3 -> Merged organization unit

You will also note that all classes that are part of a class-to-class mapping have automatically been materialized for the benefit of the derived classes.

Run, Deploy And Inspect

Study the generated SQL by opening the SQL View and clicking on the classes to view the SQL code of the class view.

Deploy the derived classes and query the class views. Note the behaviour of the deployment package generator when deploying dependent classes. Choose to include all source classes that the derived classes depend on, as these will now be automatically materialized. After installation, run materialization commands for these tables. If you don’t, the newly installed derived class views will be empty.

Inspect the contents of the derived classes and their source classes by opening the Data Grid and clicking on the classes.

Try It Out

Go back to your personal project file and derive the Project member class from the Project membership class like this:

Define the property assignments to work like this:

  • Name is of format Last name + comma + First names
  • Project is the code + colon + name of the project associated with the source class
  • Project started and Project ended are the respective star and ends dates of the project
  •  Role is the role name of the associated role
  • Started in role and Quit in role are the start date and end date of the project membership, respectively
  • The reference to Person is maintained from the original source class
  • The original source class Project membership (the is the Business key in this case as well) is referenced directly, to provide a path to the original source structure.

Run the model, redeploy the new class and double-check that it works. If it doesn’t, check out its definition in the Tutorial 09 model. The installation will overwrite the one installed earlier in this tutorial.

Next tutorial (under construction)

  • Developer Content
    • No Access
    • Model Types
    • Archetypes
    • Datatypes
    • Source Mappings
    • Metadata
    • Metadata
    • Data vs Business Driven Modeling
    • The Business Key
    • DSharp Studio Professional Course
      • Tutorial 01: Person Tutorial
      • Tutorial 02: Add Attributes
      • Tutorial 03: Project Tutorial
      • Tutorial 04: Hash Error Handling
      • Tutorial 05: Simple Hierarchy
      • Tutorial 06: Transactions
      • Tutorial 07: Filtering Data
      • Tutorial 08: Loading Multiple Classes From One Source
      • Tutorial 09: Handling Legitimate Duplicates
      • Tutorial 10: Multiple Attribute Values
    • Intro Course
      • Intro Course – Before You Begin
      • Tutorial 01 – Visual Paradigm
      • Tutorial 01 – Ellie
      • Tutorial 01: Person Tutorial
      • Tutorial 02: Add Attributes
      • Tutorial 03: Project Tutorial
      • Tutorial 04: Hash Error Handling
      • Tutorial 05: Simple Hierarchy
      • Tutorial 06: Transactions
      • Tutorial 07: Changing Load Behaviour
      • Tutorial 08: Loading Multiple Classes From One Source
      • Tutorial 09: Handling Legitimate Duplicates
      • Tutorial 10: Multiple Attribute Values
    • Advanced BDP Developer Course
      • Tutorial 01: Key Groups
      • Tutorial 02: Implementing the Participation Design Pattern
      • Tutorial 03: Versioned Source Data
      • Tutorial 04: Advanced State Handling
      • Tutorial 05: Hierarchy Alternatives
      • Tutorial 06: Hierarchy Depth Changes
      • Tutorial 07: Partial Load Deletion Detection
      • Tutorial 08: Merge Hashes Non-Destructively
      • Tutorial 09: Implementing Business Objects
      • Tutorial 10: Custom Value Transformations
    • DSharp Studio Expert Course
      • Tutorial 01: Key Groups
      • Tutorial 02: Implementing the Participation Design Pattern
      • Tutorial 03: Versioned Source Data
      • Tutorial 04: Advanced State Handling
      • Tutorial 05: Hierarchy Alternatives
      • Tutorial 06: Hierarchy Depth Changes
      • Tutorial 07: Partial Load Deletion Detection
      • Tutorial 08: Merge Hashes Non-Destructively
      • Tutorial 09: Derived Classes
    • Mapping Source Data
    • Command Reference
    • Release Notes And Downloads
    • DSharp Studio Command Reference
    • DSharp Studio Command Reference
    • DSharp Studio Features
    • DSharp Studio Modeler Features
    • DSharp Studio Modeler Installation Guide
    • Installation Guide
    • Configuring Data Vault 2.0 And Servers
    • Modeling With Visual Paradigm
    • Implementing Mappings
    • Import Stereotypes
    • Configure Visual Paradigm UI
    • Modeling With Ellie
    • Ellie Metadata
  • Frequently Asked Questions

Finland
Yliopistonkatu 31, 20100, Turku
Bertel Jungin aukio 5, 02600 Espoo

Germany
Podbielskistrasse 333,
5th floor, 30659, Hannover

Solutions

  • DSharp Studio
  • DSharp Studio Modeler
  • Pricing and Licenses

FAQ

  • About us
  • Contact us
  • Recruiting

Legal

  • Privacy policy
  • DSharp Studio License Subscription Agreement

Contact us!

    © Copyright DSharp Oy
    • Link to LinkedIn
    • Link to Mail
    Scroll to top Scroll to top Scroll to top