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

No common identifier 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

a left join of two operands with no identifier in common: DS_1 has Id_1 and DS_2 has Id_2.

Manual:

Left Join: left_join requires that the other operands "have exactly the same identifiers and the left-most operand contains them all" (the using clause is then optional), or that they "share at least one identifier with the left-most operand" (it is then mandatory).

Expected:

the error 1-1-13-11, "Invalid subcase A, {dataset_reference} should be a superset but {component} not found", for "if the determined keys do not satisfy the constraints of left_join, an error is raised": with no using clause, DS_1 must contain the identifiers of DS_2, and it does not have Id_2.

script.vtl ⇩

DS_r := left_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-11"}