object BuiltinOverrides
Object that contains override for Snowflake built-in functions that do not have the same behavior as Spark.
- Alphabetic
- By Inheritance
- BuiltinOverrides
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
acos(columnName: String): Column
Wrapper for Snowflake built-in acos function.
Wrapper for Snowflake built-in acos function. Inverse cosine of e in radians.
- columnName
Column name.
- returns
Column object.
-
def
acos(e: Column): Column
Wrapper for Snowflake built-in acos function.
Wrapper for Snowflake built-in acos function. Inverse cosine of e in radians.
- e
Column.
- returns
Column object.
-
def
approx_count_distinct(columnName: String): Column
Wrapper for Snowflake built-in approx_count_distinct function.
Wrapper for Snowflake built-in approx_count_distinct function. Returns the approximate number of distinct items in a group.
- columnName
Column name to get the count.
- returns
Column object.
-
def
approx_count_distinct(c: Column): Column
Wrapper for Snowflake built-in approx_count_distinct function.
Wrapper for Snowflake built-in approx_count_distinct function. Returns the approximate number of distinct items in a group.
- c
Column to get the count.
- returns
Column object.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
atan2(yValue: Double, xName: String): Column
Wrapper for Snowflake built-in atan2 function.
Wrapper for Snowflake built-in atan2 function. Returns the theta component of the point (r, theta) in polar coordinates that corresponds to the point.
- yValue
coordinate on y-axis.
- xName
coordinate on x-axis
- returns
Column object.
-
def
atan2(yValue: Double, x: Column): Column
Wrapper for Snowflake built-in atan2 function.
Wrapper for Snowflake built-in atan2 function. Returns the theta component of the point (r, theta) in polar coordinates that corresponds to the point.
- yValue
coordinate on y-axis.
- x
coordinate on x-axis
- returns
Column object.
-
def
atan2(yName: String, xValue: Double): Column
Wrapper for Snowflake built-in atan2 function.
Wrapper for Snowflake built-in atan2 function. Returns the theta component of the point (r, theta) in polar coordinates that corresponds to the point.
- yName
coordinate on y-axis.
- xValue
coordinate on x-axis
- returns
Column object.
-
def
atan2(y: Column, xValue: Double): Column
Wrapper for Snowflake built-in atan2 function.
Wrapper for Snowflake built-in atan2 function. Returns the theta component of the point (r, theta) in polar coordinates that corresponds to the point.
- y
coordinate on y-axis.
- xValue
coordinate on x-axis
- returns
Column object.
-
def
atan2(yName: String, xName: String): Column
Wrapper for Snowflake built-in atan2 function.
Wrapper for Snowflake built-in atan2 function. Returns the theta component of the point (r, theta) in polar coordinates that corresponds to the point.
- yName
coordinate on y-axis.
- xName
coordinate on x-axis
- returns
Column object.
-
def
atan2(y: Column, xName: String): Column
Wrapper for Snowflake built-in atan2 function.
Wrapper for Snowflake built-in atan2 function. Returns the theta component of the point (r, theta) in polar coordinates that corresponds to the point.
- y
coordinate on y-axis.
- xName
coordinate on x-axis
- returns
Column object.
-
def
atan2(yName: String, x: Column): Column
Wrapper for Snowflake built-in atan2 function.
Wrapper for Snowflake built-in atan2 function. Returns the theta component of the point (r, theta) in polar coordinates that corresponds to the point.
- yName
coordinate on y-axis.
- x
coordinate on x-axis
- returns
Column object.
-
def
atan2(y: Column, x: Column): Column
Wrapper for Snowflake built-in atan2 function.
Wrapper for Snowflake built-in atan2 function. Returns the theta component of the point (r, theta) in polar coordinates that corresponds to the point.
- y
coordinate on y-axis.
- x
coordinate on x-axis
- returns
Column object.
-
def
avg(s: String): Column
Wrapper for Snowflake built-in avg function.
Wrapper for Snowflake built-in avg function. Returns the average of the values in a group.
- s
Column name to get the average.
- returns
Column object.
-
def
avg(c: Column): Column
Wrapper for Snowflake built-in avg function.
Wrapper for Snowflake built-in avg function. Returns the average of the values in a group.
- c
Column to get the average.
- returns
Column object.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
concat(cols: Column*): Column
Concatenates columns from the parameters.
Concatenates columns from the parameters.
- cols
sequence of column objects to concatenate.
- returns
new column with concatenated values.
-
def
concat_ws(separator: Column, cols: Column*): Column
Concatenates columns from the parameters using the specified character as a separator.
Concatenates columns from the parameters using the specified character as a separator.
- separator
column with which the column's values will be separated.
- cols
sequence of column objects to concatenate.
- returns
new column with concatenated values separated by the specified separator.
-
def
concat_ws(separator: String, cols: Column*): Column
Concatenates columns from the parameters using the specified character as a separator.
Concatenates columns from the parameters using the specified character as a separator.
- separator
value with which the column's values will be separated.
- cols
sequence of column objects to concatenate.
- returns
new column with concatenated values separated by the specified separator.
-
def
degrees(columnName: String): Column
Wrapper for Snowflake built-in degrees function.
Wrapper for Snowflake built-in degrees function. Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
- columnName
Column name for convert to degrees.
- returns
Column object.
-
def
degrees(c: Column): Column
Wrapper for Snowflake built-in degrees function.
Wrapper for Snowflake built-in degrees function. Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
- c
Column for convert to degrees.
- returns
Column object.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lag(c: Column, offset: Int, defaultValue: Any): Column
Wrapper for Snowflake built-in lag function.
Wrapper for Snowflake built-in lag function. Returns the value that is offset rows before the current row.
- c
Column to calculate offset.
- offset
Column offset.
- defaultValue
If there is less than offset rows before the current row.
- returns
Column object.
-
def
lag(columnName: String, offset: Int, defaultValue: Any): Column
Wrapper for Snowflake built-in lag function.
Wrapper for Snowflake built-in lag function. Returns the value that is offset rows before the current row.
- columnName
Column name.
- offset
Column offset.
- defaultValue
If there is less than offset rows before the current row.
- returns
Column object.
-
def
lag(columnName: String, offset: Int): Column
Wrapper for Snowflake built-in lag function.
Wrapper for Snowflake built-in lag function. Returns the value that is offset rows before the current row.
- columnName
Column name.
- offset
Column offset.
- returns
Column object.
-
def
lag(c: Column, offset: Int): Column
Wrapper for Snowflake built-in lag function.
Wrapper for Snowflake built-in lag function. Returns the value that is offset rows before the current row.
- c
Column to calculate offset.
- offset
Column offset.
- returns
Column object.
-
def
lead(c: Column, offset: Int, defaultValue: Any): Column
Wrapper for Snowflake built-in lead function.
Wrapper for Snowflake built-in lead function. Returns the value that is offset rows after the current row.
- c
Column to calculate offset.
- offset
Column offset.
- defaultValue
If there is less than offset rows after the current row.
- returns
Column object.
-
def
lead(columnName: String, offset: Int, defaultValue: Any): Column
Wrapper for Snowflake built-in lead function.
Wrapper for Snowflake built-in lead function. Returns the value that is offset rows after the current row.
- columnName
Column name.
- offset
Column offset.
- defaultValue
If there is less than offset rows after the current row.
- returns
Column object.
-
def
lead(c: Column, offset: Int): Column
Wrapper for Snowflake built-in lead function.
Wrapper for Snowflake built-in lead function. Returns the value that is offset rows after the current row.
- c
Column to calculate the offset.
- offset
Column offset.
- returns
Column object.
-
def
lead(columnName: String, offset: Int): Column
Wrapper for Snowflake built-in lead function.
Wrapper for Snowflake built-in lead function. Returns the value that is offset rows after the current row.
- columnName
Column name.
- offset
Column offset.
- returns
Column object.
-
def
ltrim(column: Column): Column
This is an overload of the trim method that uses the empty space as a replacement for the white spaces at the left string of characters.
This is an overload of the trim method that uses the empty space as a replacement for the white spaces at the left string of characters.
- column
Column for trimming the spaces from left.
- returns
Column object.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
next_day(date: Column, dayOfWeek: String): Column
This is an overload of the next_day method.
This is an overload of the next_day method. Returns the first date which is later than the value of the date column that is on the specified day of the week.
- date
Column date to find the day.
- dayOfWeek
String day of the week you do want to find.
- returns
Column object.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
ntile(n: Int): Column
Wrapper for Snowflake built-in ntile function.
Wrapper for Snowflake built-in ntile function. Returns the ntile group id (from 1 to n inclusive) in an ordered window partition.
- n
ntile group.
- returns
Column object.
-
def
radians(columnName: String): Column
Wrapper for Snowflake built-in radians function.
Wrapper for Snowflake built-in radians function. Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
- columnName
Column name for convert to radians.
- returns
Column object.
-
def
radians(c: Column): Column
Wrapper for Snowflake built-in radians function.
Wrapper for Snowflake built-in radians function. Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
- c
Column for convert to radians.
- returns
Column object.
-
def
regexp_split(column: Column, pattern: String, limit: Int = -1)(implicit session: Session): Column
This is a method split that split a column with a regular expresion patter or common string.
This is a method split that split a column with a regular expresion patter or common string.
- column
Column for spliting.
- pattern
String pattern for splitting..
- returns
Column object.
-
def
repeat(column: Column, n: Int): Column
This is an overload of the repeat method that repeats a string of characters n times and returns it as a new column.
This is an overload of the repeat method that repeats a string of characters n times and returns it as a new column.
- column
Column for repeat.
- n
Int times for repeat.{
- returns
Column object.
-
def
round(column: Column, scale: Int): Column
This is an overload of the round method that rounds a value to a number with scala times of decimals .
This is an overload of the round method that rounds a value to a number with scala times of decimals .
- column
Column for round the value.
- scale
Int scale decimal places.
- returns
Column object.
-
def
rtrim(column: Column): Column
This is an overload of the trim method that uses the empty space as a replacement for the white spaces at the right string of characters.
This is an overload of the trim method that uses the empty space as a replacement for the white spaces at the right string of characters.
- column
Column for trimming the spaces from right.
- returns
Column object.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
translate(column: Column, matchingString: String, replaceString: String): Column
This is an overload of the translate method.
This is an overload of the translate method. Translate any string of characters with a string of characters sources
- column
Column for translate.
- matchingString
String for mach.
- replaceString
String for replacing.
- returns
Column object.
-
def
trim(column: Column): Column
This is an overload of the trim method that uses the empty space as a replacement for the white spaces at the beginning and end of the string of characters..
This is an overload of the trim method that uses the empty space as a replacement for the white spaces at the beginning and end of the string of characters..
- column
Column for trimming the spaces.
- returns
Column object.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
Snowpark by itself is a powerful library, but still some utility functions can always help.
snowpark-extensions
Snowpark by itself is a powerful library, but still some utility functions can always help.
The source code for this library is available here
Installation
With Maven you can add something like this to your POM:
or with sbt use
Usage
just import it at the top of your file and it will automatically extend your snowpark package.
For example:
Extensions
See Session Extensions
See Session Builder Extensions
See DataFrame Extensions
See Column Extensions
See Function Extensions