Skip to main content
Oussama ALLALI
Seasoned ⭐️⭐️
Seasoned ⭐️⭐️
April 22, 2025

How does the mapping functionality perform joins under hood ?

  • April 22, 2025
  • 13 replies
  • 209 views

Hello Team,

I have a modeling question.

We want to add some well information to all object types in our knowledge graph. At the same time, we don't want to create a link from the objects to the well.

So, to avoid data duplication and updating these pieces of information, I thought about using the mapping functionality.

For example, I have a casing object with two attributes: name and diameter. And I added a name_well attribute using the mapping functionality, which, as I understand, under the hood, performs a join.

type Well {
name: String
}

type Casing {
name: String
name_well: String @mapping(container: "Well", property: "name")
diameter: Float32
}

Well transformation:


select
wh.IDWELL as externalId,
wh.WELLNAME as name
from
well-data as wh

Casing transformation

select
cas.IDCASING AS externalId,
cas.NAME AS name,
cas.DIAMETER as diameter,
wh.WELLNAME as name_well
from
casing-data as cas
join well-data as wh on cas.IDWELL == cas.IDWELL

What I don’t understand is how exactly this join is performed under the hood.

    13 replies

    Oussama ALLALI
    Seasoned ⭐️⭐️
    Seasoned ⭐️⭐️
    April 24, 2025

    @erlend.vollset this UI 

     

    Oussama ALLALI
    Seasoned ⭐️⭐️
    Seasoned ⭐️⭐️
    April 24, 2025

    @erlend.vollset  so in CDF, is the mapping functionality only meant to create a view from attributes within the same container or from containers that belong to the same node ?  

    Can it not be used to encapsulate a join between adjacent nodes (i.e., across containers connected by an implicit or logical relationship)?

    Senior Software Engineer
    April 24, 2025

    @erlend.vollset  so in CDF, is the mapping functionality only meant to create a view from attributes within the same container or from containers that belong to the same node ?  

    Containers populated on the same node.


    Can it not be used to encapsulate a join between adjacent nodes (i.e., across containers connected by an implicit or logical relationship)?

    No, this is not what views do.