-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-3198] Improve Spark SQL create table from existing hudi table #4584
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
Conversation
d5c2d93 to
712fb15
Compare
|
@hudi-bot run azure |
712fb15 to
44395d6
Compare
xushiyan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…pache#4584) To modify SQL statement for creating hudi table based on an existing hudi path. From: ```sql create table hudi_tbl using hudi tblproperties (primaryKey='id', preCombineField='ts', type='cow') partitioned by (pt) location '/path/to/hudi' ``` To: ```sql create table hudi_tbl using hudi location '/path/to/hudi' ```
…pache#4584) To modify SQL statement for creating hudi table based on an existing hudi path. From: ```sql create table hudi_tbl using hudi tblproperties (primaryKey='id', preCombineField='ts', type='cow') partitioned by (pt) location '/path/to/hudi' ``` To: ```sql create table hudi_tbl using hudi location '/path/to/hudi' ```
…pache#4584) To modify SQL statement for creating hudi table based on an existing hudi path. From: ```sql create table hudi_tbl using hudi tblproperties (primaryKey='id', preCombineField='ts', type='cow') partitioned by (pt) location '/path/to/hudi' ``` To: ```sql create table hudi_tbl using hudi location '/path/to/hudi' ```
| // just persist hoodie.table.create.schema | ||
| HoodieTableMetaClient.withPropertyBuilder() | ||
| .fromProperties(properties) | ||
| .setTableCreateSchema(SchemaConverters.toAvroType(finalSchema).toString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @YannByron
Recently, we found an Avro schema issue which is caused by the wrong record name (detail here: #7284).
May I ask if this line could cause the same problem? If so, we can discuss how to fix it in PR: #7297
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tried, it will rewrite the record name in hoodie.table.create.schema as topLevelRecord in hoodie.properties.
To modify SQL statement for creating hudi table based on an existing hudi path.
From:
To: