[HUDI-3589] flink sync hive metadata supports table properties and serde properties (#4995)
This commit is contained in:
@@ -675,6 +675,18 @@ public class FlinkOptions extends HoodieConfig {
|
||||
.withDescription("INT64 with original type TIMESTAMP_MICROS is converted to hive timestamp type.\n"
|
||||
+ "Disabled by default for backward compatibility.");
|
||||
|
||||
public static final ConfigOption<String> HIVE_SYNC_TABLE_PROPERTIES = ConfigOptions
|
||||
.key("hive_sync.table_properties")
|
||||
.stringType()
|
||||
.noDefaultValue()
|
||||
.withDescription("Additional properties to store with table, the data format is k1=v1\nk2=v2");
|
||||
|
||||
public static final ConfigOption<String> HIVE_SYNC_TABLE_SERDE_PROPERTIES = ConfigOptions
|
||||
.key("hive_sync.serde_properties")
|
||||
.stringType()
|
||||
.noDefaultValue()
|
||||
.withDescription("Serde properties to hive table, the data format is k1=v1\nk2=v2");
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Utilities
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@@ -74,6 +74,8 @@ public class HiveSyncContext {
|
||||
hiveSyncConfig.syncMode = conf.getString(FlinkOptions.HIVE_SYNC_MODE);
|
||||
hiveSyncConfig.hiveUser = conf.getString(FlinkOptions.HIVE_SYNC_USERNAME);
|
||||
hiveSyncConfig.hivePass = conf.getString(FlinkOptions.HIVE_SYNC_PASSWORD);
|
||||
hiveSyncConfig.tableProperties = conf.getString(FlinkOptions.HIVE_SYNC_TABLE_PROPERTIES);
|
||||
hiveSyncConfig.serdeProperties = conf.getString(FlinkOptions.HIVE_SYNC_TABLE_SERDE_PROPERTIES);
|
||||
hiveSyncConfig.jdbcUrl = conf.getString(FlinkOptions.HIVE_SYNC_JDBC_URL);
|
||||
hiveSyncConfig.partitionFields = Arrays.asList(FilePathUtils.extractPartitionKeys(conf));
|
||||
hiveSyncConfig.partitionValueExtractorClass = conf.getString(FlinkOptions.HIVE_SYNC_PARTITION_EXTRACTOR_CLASS_NAME);
|
||||
|
||||
Reference in New Issue
Block a user