vamsikarnika commented on code in PR #639:
URL: https://github.com/apache/incubator-xtable/pull/639#discussion_r1942750445


##########
xtable-utilities/src/main/java/org/apache/xtable/utilities/RunCatalogSync.java:
##########
@@ -316,6 +330,8 @@ public static class SourceTableIdentifier {
        * not strictly registered in a catalog, as long as the format and 
location are known
        */
       StorageIdentifier storageIdentifier;
+      /** Specifies properties of source table. */
+      Map<String, String> tableProperties;

Review Comment:
   When catalog sync happens from ICEBERG -> HUDI and HUDI -> HMS/Glue. 
   After table format sycn is complete, we convert target HUDI table to source 
table and sync the state to catalogs. To read Hudi source table we need 
partition spec of hudi table from the config yamls. 
   
   When storageIdentifier is specified in sourceTableIdentifier, it contains 
partitionSpec field to capture the hudi partition spec. But incase of source 
catalog is used to create the source table, we need to specify the hudi 
partition  spec in the properties.
   
   
   ```
   datasets:
     - sourceCatalogTableIdentifier:
         tableIdentifier:
           hierarchicalId: "target_iceberg_hms_db_1.target_iceberg_hms_tb_1"
         storageIdentifier:
           tableBasePath: <basepath>
           tableDataPath: <datapath>
           tableName: trips_table
           partitionSpec: id:VALUE
           tableFormat: "ICEBERG"
   ``` 
   
   ```
   datasets:
     - sourceCatalogTableIdentifier:
         tableIdentifier:
           hierarchicalId: "target_glue_delta_db_1.target_delta_tb_1"
         tableProperties:
           "xtable.hudi.source.partition_field_spec_config": "id:VALUE"
   ``` 



-- 
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...@xtable.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to