vamen opened a new issue, #4794:
URL: https://github.com/apache/iceberg/issues/4794

   This current registerTable function is  not working for converting hadoop 
catalog based tables to glue based tables. because tables written using hadoop 
catalog writes metadata.json file in the form v<V+1>.metadata.json
   
   And tables written using glue and hive catalog have format 
<V+1>-.metadata.json
   
   Hence when we call registerTable with HadoopCatalog based table 
[parseVersion 
](https://github.com/apache/iceberg/blob/387e414689c59d5a3849adec35823d7aecb209d7/core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java#L334)
 function would fail while parsing.
   
   after renaming the latest metadata.json file I was able to register and 
query the data.
   
   we can handle this in registerTable function as follows.
   
   1.) We shall call parseVersion() in registerTable. If parsing gets failed in 
[BaseMetastoreTableOperations](https://iceberg.apache.org/javadoc/0.13.1/index.html?org/apache/iceberg/BaseMetastoreTableOperations.html)
 then the file can be in File-System-Tables spec and we can reparse the file 
using File-System-Tables spec.
   
   2.) We can then rename the metadata file in required spec and use the 
renamed file path as metadataFileLocation.
   
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to