You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "questsul (via GitHub)" <gi...@apache.org> on 2024/08/27 09:55:55 UTC

Re: [I] TypeError when `operation` field is missing in `summary`. [iceberg-python]

questsul commented on issue #1106:
URL: https://github.com/apache/iceberg-python/issues/1106#issuecomment-2312078437

   How to reproduce:
   For pyicberg I was using metadata file stored in Azure blob storage
   ```
       static_table = StaticTable.from_metadata(
           "abfs://path/metadata/example.metadata.json",
           properties={
               "adlfs.connection-string": "ADD THIS",
           },
       )
    ```
    
    Here is java snippet I used for verification:
    
    ```
    package com.example;
   
   import org.apache.iceberg.StaticTableOperations;
   import org.apache.iceberg.TableMetadata;
   import org.apache.iceberg.inmemory.InMemoryFileIO;
   import org.apache.iceberg.io.FileIO;
   import java.io.IOException;
   import java.nio.file.Files;
   import java.nio.file.Path;
   
   import java.nio.file.Paths;
   
   public class StaticTableExample {
       public static void main(String[] args) throws IOException {
   
       StaticTableExample ex = new StaticTableExample();
   
       ex.start();
       }
   
       public void start() throws IOException {
           InMemoryFileIO fileIO = new InMemoryFileIO();
   
           String metadataFilePath = "example.metadata.json";
   
           fileIO.addFile(metadataFilePath, readFileAsBytesNIO(metadataFilePath));
   
           StaticTableOperations ops = new StaticTableOperations(
                   metadataFilePath,
                   fileIO
           );
   
           TableMetadata meta = ops.current();
   
           System.out.println("Table location: " + meta.location());
       }
   
       public byte[] readFileAsBytesNIO(String filePath) throws IOException {
           Path path = Path.of(filePath);
           return Files.readAllBytes(path);
       }
   }
   ```


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

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


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