Packages

c

com.snowflake.snowpark

DataFrameWriter

class DataFrameWriter extends AnyRef

Provides methods for writing data from a DataFrame to supported output destinations.

To use this object:

  1. Access an instance of a DataFrameWriter by calling the DataFrame.write method.
  2. Specify the save mode to use (overwrite or append) by caliing the mode method. This method returns a DataFrameWriter that is configured to save data using the specified mode. The default SaveMode is SaveMode.Append.
  3. Call a saveAs* method to save the data to the specified destination.

For example:

df.write.mode("overwrite").saveAsTable("T")
Since

0.1.0

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

Instance Constructors

  1. new DataFrameWriter(dataFrame: DataFrame)

    dataFrame

    Input DataFrame

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def mode(saveMode: SaveMode): DataFrameWriter

    Returns a new DataFrameWriter with the specified save mode configuration.

    Returns a new DataFrameWriter with the specified save mode configuration.

    saveMode

    One of the following save modes: SaveMode.Append, SaveMode.Overwrite, SaveMode.ErrorIfExists, SaveMode.Ignore

    Since

    0.1.0

  13. def mode(saveMode: String): DataFrameWriter

    Returns a new DataFrameWriter with the specified save mode configuration.

    Returns a new DataFrameWriter with the specified save mode configuration.

    saveMode

    One of the following strings: "APPEND", "OVERWRITE", "ERRORIFEXISTS", or "IGNORE"

    Since

    0.1.0

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def saveAsTable(multipartIdentifier: List[String]): Unit

    Writes the data to the specified table in a Snowflake database.

    Writes the data to the specified table in a Snowflake database.

    For example:

      val list = new java.util.ArrayList[String](3)
      list.add(db)
      list.add(sc)
      list.add(tableName)
    df.write.saveAsTable(list)
    multipartIdentifier

    A list of strings that specify the database name, schema name, and table name.

    Since

    0.5.0

  18. def saveAsTable(multipartIdentifier: Seq[String]): Unit

    Writes the data to the specified table in a Snowflake database.

    Writes the data to the specified table in a Snowflake database.

    For example:

    df.write.saveAsTable(Seq("db_name", "schema_name", "table_name"))
    multipartIdentifier

    A sequence of strings that specify the database name, schema name, and table name (e.g. Seq("database_name", "schema_name", "table_name")).

    Since

    0.5.0

  19. def saveAsTable(tableName: String): Unit

    Writes the data to the specified table in a Snowflake database.

    Writes the data to the specified table in a Snowflake database. tableName can be a fully-qualified object identifier.

    For example:

    df.write.saveAsTable("db1.public_schema.table1")
    tableName

    Name of the table where the data should be saved.

    Since

    0.1.0

  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped