← left_join operator page · join/left_join/bare/no_common_identifier
pandas ✅ · DuckDB ✅
a left join of two operands with no identifier in common: DS_1 has Id_1 and DS_2 has Id_2.
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).
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.
DS_r := left_join(DS_1, DS_2);
| Id_1 | Me_1 |
|---|---|
| 1 | 10 |
| 2 | 20 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_2 | Me_2 |
|---|---|
| A | 1 |
| B | 2 |
{
"datasets": [
{
"name": "DS_2",
"DataStructure": [
{"name": "Id_2", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Me_2", "type": "Number", "role": "Measure", "nullable": true}
]
}
]
}
{"code": "1-1-13-11"}