Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HUDI-8629] Update Spark DML docs on schema evolution #12635

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions website/docs/sql_dml.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ INSERT INTO <table>
SELECT <columns> FROM <source>;
```

:::info
`INSERT INTO` statement does not support evolving table schema. Please use DDL (e.g., `ALTER TABLE`) or Datasource write (`df.write.format("hudi")....save(basePath)`) to evolve table schema.
:::

:::note Deprecations
From 0.14.0, `hoodie.sql.bulk.insert.enable` and `hoodie.sql.insert.mode` are deprecated. Users are expected to use `hoodie.spark.sql.insert.into.operation` instead.
To manage duplicates with `INSERT INTO`, please check out [insert dup policy config](configurations#hoodiedatasourceinsertduppolicy).
Expand Down Expand Up @@ -123,6 +127,8 @@ ON <merge_condition>
```

:::info
`MERGE INTO` statement does not support evolving table schema. Please use DDL (e.g., `ALTER TABLE`) or Datasource write (`df.write.format("hudi")....save(basePath)`) to evolve table schema.

`WHEN NOT MATCHED` clauses specify the action to perform if the values do not match.
There are two kinds of `INSERT` clauses:
1. `INSERT *` clauses require that the source table has the same columns as those in the target table.
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-1.0.0/sql_dml.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ INSERT INTO <table>
SELECT <columns> FROM <source>;
```

:::info
`INSERT INTO` statement does not support evolving table schema. Please use DDL (e.g., `ALTER TABLE`) or Datasource write (`df.write.format("hudi")....save(basePath)`) to evolve table schema.
:::

:::note Deprecations
From 0.14.0, `hoodie.sql.bulk.insert.enable` and `hoodie.sql.insert.mode` are deprecated. Users are expected to use `hoodie.spark.sql.insert.into.operation` instead.
To manage duplicates with `INSERT INTO`, please check out [insert dup policy config](configurations#hoodiedatasourceinsertduppolicy).
Expand Down Expand Up @@ -123,6 +127,8 @@ ON <merge_condition>
```

:::info
`MERGE INTO` statement does not support evolving table schema. Please use DDL (e.g., `ALTER TABLE`) or Datasource write (`df.write.format("hudi")....save(basePath)`) to evolve table schema.

`WHEN NOT MATCHED` clauses specify the action to perform if the values do not match.
There are two kinds of `INSERT` clauses:
1. `INSERT *` clauses require that the source table has the same columns as those in the target table.
Expand Down
Loading