Are you interested in Data Engineering Essentials course on Kontext? Learn more
access_time 2 years ago languageEnglish
Spark SQL - NTILE Window Function
visibility 1,077 comment 0
Spark NTILE function divides the rows in each window to 'n' buckets ranging from 1 to at most 'n' (n is the specified parameter). The following sample SQL uses NTILE function to divide records in each window to two buckets. SELECT TXN.*, NTILE(2) OVER (PARTITION BY ...
No comments yet.
Page index 2.16