Skip to content

col

function col(name): Column;

Defined in: column.ts:383

Reference a column by name.

The name is left unresolved client-side and bound against the DataFrame schema on the server at analysis time. If the column does not exist, the server raises AnalysisException when the plan is executed.

ParameterTypeDescription
namestringColumn name; may be a simple identifier or a dotted path (for example "address.city") to reference a nested struct field.

Column

import { col, lit } from "@spark-connect-js/core";
df.filter(col("country").eq(lit("NL")));