Note
Kailangan ng pahintulot para ma-access ang page na ito. Maaari mong subukang mag-sign in o magpalit ng mga direktoryo.
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang baguhin ang mga direktoryo.
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()