logo
Spark Docs
logo
Spark Docs
DocumentationCore ConceptsData Types

Data Types

Learn how to declare, use, and manage data types in the Spark programming language.

Supported Data Types

You do not need to explicitly specify data types. The type of a variable is automatically determined based on the value assigned to it.

  • Numbers: Used to represent both integers and decimal values.
  • Strings: Used for textual data enclosed in double quotes.
  • Booleans: Represents logical values such as true and false.
  • Arrays: Ordered collections of values that can store multiple items.
  • Objects: Key-value structures used to group related data.

Since Spark is built on top of JavaScript, these data types closely map to their JavaScript equivalents while maintaining a simpler and more readable syntax.