kevinjqliu commented on issue #515:
URL: https://github.com/apache/iceberg-python/issues/515#issuecomment-2028855896

   The `load_table` operation is doing a couple of different things. 
   Let's verify each step. 
   
   Getting the "glue table" object, using the `_get_glue_table` function
   ```
   catalog = pyiceberg.catalog.load_catalog(
       catalog_name, **{"type": "glue", "profile_name": profile_name}
   )
   
   identifier_tuple = catalog.identifier_to_tuple_without_catalog(identifier)
   database_name, table_name = 
catalog.identifier_to_database_and_table(identifier_tuple, NoSuchTableError)
   glue_table = catalog._get_glue_table(database_name=database_name, 
table_name=table_name)
   print(glue_table)
   ```
   
   Look at glue table metadata location
   ```
   properties = glue_table["Parameters"]
   METADATA_LOCATION = "metadata_location"
   metadata_location = properties[METADATA_LOCATION]
   print(metadata_location)
   ```
   
   Load the metadata file, check the io implementation
   ```
   io = load_file_io(properties=catalog.properties, location=metadata_location)
   print(io)
   file = io.new_input(metadata_location)
   print(file)
   metadata = FromInputFile.table_metadata(file)
   print(metadata)
   ```
   


-- 
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: issues-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to