Packages

  • package root

    Snowpark by itself is a powerful library, but still some utility functions can always help.

    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:

    <dependency>
        <groupId>net.mobilize.snowpark-extensions</groupId>
        <artifactId>snowparkextensions</artifactId>
        <version>0.0.9</version>
    </dependency>
    

    or with sbt use

    libraryDependencies += "net.mobilize.snowpark-extensions" % "snowparkextensions" % "0.0.16"
    

    Usage

    just import it at the top of your file and it will automatically extend your snowpark package.

    For example:

    
    
    
    import com.snowflake.snowpark_extensions.Extensions._
    import com.snowflake.snowpark.Session
    
    val new_session = Session.builder.from_snowsql().appName("app1").create()
    

    Extensions

    See Session Extensions
    See Session Builder Extensions
    See DataFrame Extensions
    See Column Extensions
    See Function Extensions

    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package snowflake
    Definition Classes
    com
  • package snowpark_extensions
    Definition Classes
    snowflake
  • package implicits
    Definition Classes
    snowpark_extensions
  • object ColumnExtensions

    Column Extensions object containing implicit functions to the Snowpark Column object.

    Column Extensions object containing implicit functions to the Snowpark Column object.

    Definition Classes
    implicits
  • ExtendedColumn

class ExtendedColumn extends AnyRef

Column extension class.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExtendedColumn
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ExtendedColumn(c: Column)

    c

    Column to extend functionality.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  11. 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.

  12. 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.

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. 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.

  15. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. 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.

  18. 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.

  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. 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.

  22. 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.

  23. 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.

  24. 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.

  25. 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.

  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. 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.

  28. 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.

  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. 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.

  32. 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.

  33. 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.

  34. 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.

  35. 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.

  36. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. 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.

Inherited from AnyRef

Inherited from Any

Ungrouped