class ExtendedColumn extends AnyRef
Column extension class.
- Alphabetic
- By Inheritance
- ExtendedColumn
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ExtendedColumn(c: Column)
- c
Column to extend functionality.
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
as(symbol: Symbol): Column
Function that gives the column an alias using a symbol.
Function that gives the column an alias using a symbol.
- symbol
Symbol name.
- returns
Column object.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
bitwiseAND(other: Any): Column
Function that computes bitwise AND of this expression with another expression.
Function that computes bitwise AND of this expression with another expression.
- other
Expression to match.
- returns
Column object.
-
def
bitwiseOR(other: Any): Column
Function that computes bitwise OR of this expression with another expression.
Function that computes bitwise OR of this expression with another expression.
- other
Expression to match.
- returns
Column object.
-
def
bitwiseXOR(other: Any): Column
Function that computes bitwise XOR of this expression with another expression.
Function that computes bitwise XOR of this expression with another expression.
- other
Expression to match.
- returns
Column object.
-
def
cast(to: String): Column
Function that casts the column to a different data type, using the canonical string representation of the type.
Function that casts the column to a different data type, using the canonical string representation of the type. The supported types are: string, boolean, byte, short, int, long, float, double, decimal, date, timestamp. Functional Difference with Spark: Spark returns null when casting is not possible. Snowflake throws an exception.
- to
String representation of the type.
- returns
Column object.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
contains(other: Any): Column
Function that returns a boolean column based on a pattern match.
Function that returns a boolean column based on a pattern match.
- other
Pattern to match.
- returns
Column object.
-
def
contains(expr: String): Column
Function that validates if the values of the column contain the value from the paratemer expression.
Function that validates if the values of the column contain the value from the paratemer expression.
- expr
Expression to validate with the column's values.
- returns
Column object.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
eqNullSafe(other: Any): Column
Function that performs quality test that is safe for null values.
Function that performs quality test that is safe for null values.
- other
Value to compare
- returns
Column object.
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getField(fieldName: String): Column
Function that gets a value by field name or key in a object.
Function that gets a value by field name or key in a object. Functional Difference with Spark: The function returns a Variant type. This function works for StructType in Spark. The equivalent in Snowpark is object.
- fieldName
Field name.
- returns
Column object.
-
def
getItem(key: Any): Column
Function that gets an item at position ordinal out of an array, or gets a value by key in a object.
Function that gets an item at position ordinal out of an array, or gets a value by key in a object. Functional Difference with Spark: The function returns a Variant type.
- key
Key element to get.
- returns
Column object.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isNaN(): Column
Function that returns True if the current expression is NaN.
Function that returns True if the current expression is NaN.
- returns
Column object.
-
def
isNotNull(): Column
Function that validates if the values of the column are not null.
Function that validates if the values of the column are not null.
- returns
Column object.
-
def
isNull(): Column
Function that validates if the values of the column are null.
Function that validates if the values of the column are null.
- returns
Column object.
-
def
isin(strings: String*): Column
Function that validates if the value of the column is within the list of strings from parameter.
Function that validates if the value of the column is within the list of strings from parameter.
- strings
List of strings to compare with the value.
- returns
Column object.
-
def
like(literal: String): Column
Function that returns a boolean column based on a match.
Function that returns a boolean column based on a match.
- literal
expresion to match.
- returns
Column object.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
notEqual(other: Any): Column
Function that returns the result of the comparison of two columns.
Function that returns the result of the comparison of two columns.
- other
Column to compare.
- returns
Column object.
-
def
not_isin(strings: String*): Column
Function that validates if the value of the column is not within the list of strings from parameter.
Function that validates if the value of the column is not within the list of strings from parameter.
- strings
List of strings to compare with the value.
- returns
Column object.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
regexp_replace(pattern: String, replacement: String): Column
Function that replaces column's values according to the regex pattern and replacement value parameters.
Function that replaces column's values according to the regex pattern and replacement value parameters.
- pattern
Regex pattern to replace.
- replacement
Value to replace matches with.
- returns
Column object.
-
def
rlike(literal: String): Column
Function that returns a boolean column based on a regex match.
Function that returns a boolean column based on a regex match.
- literal
Regex expresion to match.
- returns
Column object.
-
def
startsWith(expr: String): Column
Function that validates if the values of the column start with the parameter expression.
Function that validates if the values of the column start with the parameter expression.
- expr
Expression to validate with the column's values.
- returns
Column object.
-
def
substr(pos: Int, len: Int): Column
Function that returns the portion of the string or binary value str, starting from the character/byte specified by pos, with limited length.
Function that returns the portion of the string or binary value str, starting from the character/byte specified by pos, with limited length.
- pos
Start position.
- len
Length of the substring.
- returns
Column object.
-
def
substr(pos: Column, len: Column): Column
Function that returns the portion of the string or binary value str, starting from the character/byte specified by pos, with limited length.
Function that returns the portion of the string or binary value str, starting from the character/byte specified by pos, with limited length.
- pos
Start position.
- len
Length of the substring.
- returns
Column object.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.
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