← inner_join operator page · join/inner_join/bare/no_common_identifier

No common identifier 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

the natural inner join of two operands with no identifier in common: DS_1 has Id_1 and DS_2 has Id_2.

Manual:

Inner Join: inner_join requires "that there exists a permutation of the join operands such that each operand has at least one identifier in common with any of the operands preceding it".

Expected:

the error 1-1-13-26, "The operands cannot be ordered so that each one has an identifier in common with one before it, as {dataset} has none in common with the others", for "if using is not specified, inner_join performs a natural join ...; if the required condition does not hold, an error is raised": the message states that condition, which fails as DS_1 and DS_2 share no identifier.

script.vtl ⇩

DS_r := inner_join(DS_1, DS_2);

input/DS_1.csv ⇩

Id_1Me_1
110
220

input/DS_1.json ⇩

{
  "datasets": [
    {
      "name": "DS_1",
      "DataStructure": [
        {"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
        {"name": "Me_1", "type": "Number", "role": "Measure", "nullable": true}
      ]
    }
  ]
}

input/DS_2.csv ⇩

Id_2Me_2
A1
B2

input/DS_2.json ⇩

{
  "datasets": [
    {
      "name": "DS_2",
      "DataStructure": [
        {"name": "Id_2", "type": "String", "role": "Identifier", "nullable": false},
        {"name": "Me_2", "type": "Number", "role": "Measure", "nullable": true}
      ]
    }
  ]
}

expected/error.json ⇩

{"code": "1-1-13-26"}