class ColumnsSimplifier extends AnyRef
Column simplifier helper class. Abstracts some column operations for a dataframe. Applied automatically to a dataframe when using the DataframeExtensions implicit class.
Its purpose is to provide a helper to increase performance when performing multiple withColumn operations. This because Snowpark performs these operations immediately when executing, contrary to Spark that performs the operations when a .show(), .collect() or other functions are called.
What this class do is collect a series of withColumn operations that should be applied to a DataFrame, and groups them to execute them in bulk when the .endCols function is called.
- Alphabetic
- By Inheritance
- ColumnsSimplifier
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ColumnsSimplifier(df: DataFrame)
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cacheAsParquet(str: String, str1: String): Nothing
Dummy function.
Dummy function. No current functionality has been implemented.
- returns
Nothing
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
drop(colNames: String*): ColumnsSimplifier
Adds columns to drop.
Adds columns to drop.
- colNames
Columns to drop.
- returns
The current ColumnsSimplifier instance.
-
def
endCols: DataFrame
Applies the expected operations to the DataFrame.
Applies the expected operations to the DataFrame.
- returns
DataFrame with the column operations applied.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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( ... )
-
def
withColumn(colName: String, colValue: Column): ColumnsSimplifier
Adds a column to be added into the DataFrame.
Adds a column to be added into the DataFrame.
- colName
Name of the new column.
- colValue
Column object for the new column.
- returns
The current ColumnsSimplifier instance.
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