spark.read
with format (e.g., CSV, JSON, Parquet).*.json
).FROM
Keyword (Data Type Identification)FROM
indicates the file type:
count_if
and count
count_if(condition)
: Counts rows matching condition.
count(*)
vs. count(column)
:
count(*)
→ All rows (including NULLs).count(column)
→ Skips NULLs.explode()
: Converts array elements into rows.
flatten()
: Merges arrays (vs. explode
which splits).default
schema by default).GRANT SELECT ON FUNCTION get_discount TO user;
CASE/WHEN
for Control Flow