You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/10/18 12:05:11 UTC

[GitHub] [iceberg] fengguangyuan commented on issue #3299: Table Ingestion with iceberg java not working

fengguangyuan commented on issue #3299:
URL: https://github.com/apache/iceberg/issues/3299#issuecomment-945696196


   From the test files `TestRewriteFiles.java` and `TestCreateActions.java`, you could figure out the following sample code:
   ```java
   TestTables.TestTable table = TestTables.create(tableDir, "test", schema, spec, formatVersion);
   // or you do not need create a new HiveCatalog, instead using the internal
   // TableCatalog catalog = (TableCatalog) spark.sessionState().catalogManager().catalog("spark_catalog");
   // SparkTable table =  catalog.loadTable("SUBSCRIBER");
   table.newRewrite()
               .rewriteFiles(ImmutableSet.of(FILE_A), ImmutableSet.of(),
                   ImmutableSet.of(), ImmutableSet.of(FILE_A_DELETES))
               .apply()
   ```
   I think you lose the `apply()` action here.
   Or you may code simply:
   ```java
         spark.read().parquet("/path.parquet").writeTo("SUBSCRIBER");
   ```


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