Skip to content

Commit

Permalink
[HUDI-8629] Update Spark DML docs on schema evolution (#12635)
Browse files Browse the repository at this point in the history
  • Loading branch information
yihua authored Jan 15, 2025
1 parent d1f93ba commit d344710
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
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

0 comments on commit d344710

Please sign in to comment.