← full_join operator page · join/full_join/using/all_common_identifiers
pandas ✅ · DuckDB ✅
using Id_1, Id_2 on operands with the same identifiers.
Full Join: "The using clause is optional only if I_i = I_j ... otherwise it is mandatory, and it must specify a subset of the identifiers common to every join operand. For every other identifier not included in the using clause, a nvl() expression must be specified."
both identifiers are named, so no nvl() is needed and the keys are those without using: the result of Keys of both kept.
DS_r := full_join(DS_1, DS_2 using Id_1, Id_2);
| Id_1 | Id_2 | Me_1 |
|---|---|---|
| 1 | A | 10 |
| 1 | B | 20 |
| 2 | A | 30 |
| 2 | B | 40 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Id_2", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Me_2 |
|---|---|---|
| 1 | A | 1 |
| 1 | C | 2 |
| 2 | A | 3 |
| 2 | B | 4 |
{
"datasets": [
{
"name": "DS_2",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Id_2", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Me_2", "type": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 1 | A | 10 | 1 |
| 1 | B | 20 | |
| 1 | C | 2 | |
| 2 | A | 30 | 3 |
| 2 | B | 40 | 4 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Id_2", "type": "String", "role": "Identifier"},
{"name": "Me_1", "type": "Number", "role": "Measure"},
{"name": "Me_2", "type": "Number", "role": "Measure"}
]
}
]
}