vinothchandar commented on issue #3337: URL: https://github.com/apache/hudi/issues/3337#issuecomment-885979308
Have you tried ``` --partition-value-extractor org.apache.hudi.hive.MultiPartKeysValueExtractor --partitioned-by year, month ``` if you look at this code below, it extracts the partition values from the folder path and adds year month as the partition columns? ``` private String getPartitionClause(String partition) { List<String> partitionValues = partitionValueExtractor.extractPartitionValuesInPath(partition); ValidationUtils.checkArgument(syncConfig.partitionFields.size() == partitionValues.size(), "Partition key parts " + syncConfig.partitionFields + " does not match with partition values " + partitionValues + ". Check partition strategy. "); List<String> partBuilder = new ArrayList<>(); for (int i = 0; i < syncConfig.partitionFields.size(); i++) { String partitionValue = partitionValues.get(i); // decode the partition before sync to hive to prevent multiple escapes of HIVE if (syncConfig.decodePartition) { // This is a decode operator for encode in KeyGenUtils#getRecordPartitionPath partitionValue = PartitionPathEncodeUtils.unescapePathName(partitionValue); } partBuilder.add("`" + syncConfig.partitionFields.get(i) + "`='" + partitionValue + "'"); } return String.join(",", partBuilder); } ``` -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org