Skip to content

col

function col(name): Column;

Defined in: column.ts:403

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.

Parameter Type Description
name string Column 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")));