zhangjun0x01 opened a new issue, #1786:
URL: https://github.com/apache/incubator-paimon/issues/1786

   ### Search before asking
   
   - [X] I searched in the 
[issues](https://github.com/apache/incubator-paimon/issues) and found nothing 
similar.
   
   
   ### Paimon version
   
   master 
   
   ### Compute Engine
   
   java api
   
   ### Minimal reproduce step
   
   use java api to write to paimon table (s3 file system), like this
   
   ```
   
   @Test
       public void testBatchWriteByJavaApi() throws Exception {
   
           Options options = new Options();
           options.set("warehouse", "s3://xxxxxx");
           options.set("s3.endpoint", "xxxx");
           options.set("s3.access-key", "xxxx");
           options.set("s3.secret-key", "xxxxxxxx");
           CatalogContext context = CatalogContext.create(options);
           Catalog catalog = CatalogFactory.createCatalog(context);
   
           Table table = catalog.getTable(Identifier.create("paimon_db", "t1"));
   
           // 1. Create a WriteBuilder (Serializable)
           BatchWriteBuilder writeBuilder = table.newBatchWriteBuilder();
   
           // 2. Write records in distributed tasks
           BatchTableWrite write = writeBuilder.newWrite();
   
           GenericRow record1 = GenericRow.of(BinaryString.fromString("Alice"), 
12);
          GenericRow record2 = GenericRow.of(BinaryString.fromString("Bob"), 5);
          GenericRow record3 = GenericRow.of(BinaryString.fromString("Emily"), 
18);
   
           write.write(record1);
          write.write(record2);
          write.write(record3);
   
           List<CommitMessage> messages = write.prepareCommit();
   
           // 3. Collect all CommitMessages to a global node and commit
           BatchTableCommit commit = writeBuilder.newCommit();
           commit.commit(messages);
       }
   
   ```
   
   ### What doesn't meet your expectations?
   
   can not write data to paimon
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


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

Reply via email to