TGViewer
Data Engineers Data Engineers @sql_engineer ยท 11.2K subscribers
Post #953 3.6K
Pyspark Functions.pdf4.1 MB
M๐—ผ๐˜€๐˜ ๐—ฒ๐—ป๐—ด๐—ถ๐—ป๐—ฒ๐—ฒ๐—ฟ๐˜€ ๐˜‚๐˜€๐—ฒ #๐—ฃ๐˜†๐—ฆ๐—ฝ๐—ฎ๐—ฟ๐—ธ ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐˜† ๐—ฑ๐—ฎ๐˜†โ€ฆ ๐—ฏ๐˜‚๐˜ ๐—ณ๐—ฒ๐˜„ ๐—ธ๐—ป๐—ผ๐˜„ ๐˜„๐—ต๐—ถ๐—ฐ๐—ต ๐—ณ๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐—ฎ๐—ฐ๐˜๐˜‚๐—ฎ๐—น๐—น๐˜† ๐—บ๐—ฎ๐˜…๐—ถ๐—บ๐—ถ๐˜‡๐—ฒ ๐—ฝ๐—ฒ๐—ฟ๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐—ป๐—ฐ๐—ฒ.

Ever written long UDFs, confusing joins, or bulky transformations?
Most of that effort is unnecessary โ€” #Spark already gives you built-ins for almost everything.

๐Š๐ž๐ฒ ๐ˆ๐ง๐ฌ๐ข๐ ๐ก๐ญ๐ฌ (๐Ÿ๐ซ๐จ๐ฆ ๐ญ๐ก๐ž ๐๐ƒ๐…)
โ€ข Core Ops: select(), withColumn(), filter(), dropDuplicates()
โ€ข Aggregations: groupBy(), countDistinct(), collect_list()
โ€ข Strings: concat(), split(), regexp_extract(), trim()
โ€ข Window: row_number(), rank(), lead(), lag()
โ€ข Date/Time: current_date(), date_add(), last_day(), months_between()
โ€ข Arrays/Maps: array(), array_union(), MapType

Just mastering these ~20 functions can simplify 70% of your transformations.
  • โค 12
More from @sql_engineer
  1. Aug 29, 2026Example: Source Database โ†’ CDC โ†’ Only Changed Records โ†’ Data Platform CDC is especially usโ€ฆ
  2. Aug 29, 2026๐Ÿš€ Data Engineering Fundamentals โ€“ Part 7 ๐Ÿ“ฅ Data Ingestion: How Data Enters a Data Platfoโ€ฆ
  3. Aug 18, 2026๐Ÿš€ Data Engineering Fundamentals โ€“ Part 6 ๐Ÿ“Œ ETL vs ELT: How Data Moves from Source to Desโ€ฆ
  4. Aug 11, 2026๐Ÿ“Š The 90-Minutes Business Analytics Masterclass Learn how to transform raw data into poweโ€ฆ
  5. Aug 8, 2026Data Warehouse Stores: Cleaned sales data Customer KPIs Revenue reports Historical businesโ€ฆ
  6. Aug 8, 2026๐Ÿš€ Data Engineering Fundamentals โ€“ Part 4 ๐Ÿ“Œ Databases vs Data Warehouses vs Data Lakes vsโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’