← membership operator page · general/membership/attribute/dataset_without_identifiers
pandas ✅ · DuckDB ✅
The scalar rule for an attribute, the case that Manual example 8 meant: on a dataset with no identifiers, DS_1#At_1 gives the value of At_1.
Membership: "If ds has no Identifier Components (for example is a result of an aggregate invocation), comp must be a Data Set Component of the Data Set ds (a Measure or an Attribute). In this case the operator returns a scalar value equal to the value of comp in ds".
SC_r = "P", a String. DS_1 is given as it is, without identifiers, because an aggregation would drop the non-viral At_1.
SC_r := DS_1#At_1;
| Me_1 | At_1 |
|---|---|
| 5 | P |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Me_1", "type": "Integer", "role": "Measure", "nullable": true},
{"name": "At_1", "type": "String", "role": "Attribute", "nullable": true}
]
}
]
}
{
"scalars": [
{"name": "SC_r", "type": "String", "value": "P"}
]
}