Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
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()