Poznámka
Na prístup k tejto stránke sa vyžaduje oprávnenie. Môžete sa skúsiť prihlásiť alebo zmeniť adresáre.
Na prístup k tejto stránke sa vyžaduje oprávnenie. Môžete skúsiť zmeniť adresáre.
Create a write configuration builder for v2 sources.
Syntax
writeTo(table: str)
Parameters
| Parameter | Type | Description |
|---|---|---|
table |
str | Target table name to write to. |
Returns
DataFrameWriterV2: DataFrameWriterV2 to use further to specify how to save the data.
Notes
This builder is used to configure and execute write operations. For example, to append or create or replace existing tables.
Examples
df = spark.createDataFrame(
[(14, "Tom"), (23, "Alice"), (16, "Bob")], ["age", "name"])
df.writeTo("catalog.db.table").append()
df.writeTo(
"catalog.db.table"
).partitionedBy("col").createOrReplace()