stream2000 commented on issue #10375:
URL: https://github.com/apache/hudi/issues/10375#issuecomment-1864177722
You can try the following spark SQL:
```sql
call hive_sync(table => 'a', metastore_uri => 'uri');
```
All the params are as follows:
```scala
private val PARAMETERS = Array[ProcedureParameter](
ProcedureParameter.required(0, "table", DataTypes.StringType),
ProcedureParameter.optional(1, "metastore_uri", DataTypes.StringType,
""),
ProcedureParameter.optional(2, "username", DataTypes.StringType, ""),
ProcedureParameter.optional(3, "password", DataTypes.StringType, ""),
ProcedureParameter.optional(4, "use_jdbc", DataTypes.StringType, ""),
ProcedureParameter.optional(5, "mode", DataTypes.StringType, ""),
ProcedureParameter.optional(6, "partition_fields", DataTypes.StringType,
""),
ProcedureParameter.optional(7, "partition_extractor_class",
DataTypes.StringType, ""),
ProcedureParameter.optional(8, "strategy", DataTypes.StringType, ""),
ProcedureParameter.optional(9, "sync_incremental", DataTypes.StringType,
"")
)
```
Keep in mind that this procedure requires you already have a table. If you
need to create a table by spark, try to use `HiveSyncTool` directly. You can
see the code in `HiveSyncProcedure` which illustrate how to construct a
`HiveSyncTool`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]