projectnessie / iceberg-catalog-migrator

CLI tool to bulk migrate the tables from one catalog another without a data copy
Apache License 2.0
56 stars 13 forks source link

Can't migrate tables with / #208

Open tamarinkeisari opened 1 week ago

tamarinkeisari commented 1 week ago

Hi, I'm trying to migrate from rest to nessie-rest and it shows me an error each time I'm trying to migrate tables with / For example staff./1cn/cnn In the error log file the error is: NoSuchKeyException: The specified key does not exist. (Service: s3, Status: 404)

Can someone please help me? Is there a way to migrate those tables? because when I have tried to copy the table to nessie using trino craete or replace method the table did go through.

Thank you so much!

tamarinkeisari commented 3 days ago

Here is the full stack trace:

ERROR o.p.t.c.m.api.CatalogMigrator - Unable to register the table example.ta/ble java.lang.IllegalArgumentException: The specified key does not exist. (Service: S3, Status Code: 404, Request ID: bc250b69:190ba701d1f:f2643:6f1b) (due to: software.amazon.awssdk.services.s3.model.NoSuchKeyException: The specified key does not exist. (Service:S3, Status Code: 404, Request ID: bc250b69:190ba701d1f:f2643:6f1b)) at org.apache.iceberg.rest.ErrorHandlers$DefaultErrorHandler.accept(ErrorHandlers.java:206) at org.apache.iceberg.rest.ErrorHandlers$TableErrorHandler.accept(ErrorHandlers.java:118) at org.apache.iceberg.rest.ErrorHandlers$TableErrorHandler.accept(ErrorHandlers.java:102) at org.apache.iceberg.rest.HTTPClient.throwFailure(HTTPClient.java:201) at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:313) at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:252) at org.apache.iceberg.rest.HTTPClient.post(HTTPClient.java:358) at org.apache.iceberg.rest.RESTClient.post(HTTPClient.java:112) at org.apache.iceberg.rest.RESTSessionCatalog.registerTable(RESTSessionCatalog.java:454) at org.apache.iceberg.catalog.BaseSessionCatalog$AsCatalog.registerTable(BaseSesionCatalog.java:89) at org.apache.iceberg.rest.RESTCatalog.registerTable(RESTCatalog.java:218) at org.projectnessie.tools.catalog.migration.api.CatalogMigrater.registerTableToTargetCatalog(CatalogMigrator.java:213) at org.projectnessie.tools.catalog.migration.api.CatalogMigrater.registerTable(CatalogMigrator.java:147) at org.projectnessie.tools.catalog.migration.cli.BaseRegisterCommand.call(BaseRegisterCommand.java:159) at org.projectnessie.tools.catalog.migration.cli.BaseRegisterCommand.call(BaseRegisterCommand.java:38) at picocli.CommandLine.executeUserObject(CommandLine.java:2045) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465) at picocli.CommandLine$RunLast.handle(CommandLine.java:2457) at picocli.CommandLine$RunLast.handle(CommandLine.java:2419) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277) at picocli.CommandLine.execute(CommandLine.java:2174) at org.projectnessie.tools.catalog.migration.cli.CatalogMigrationCLI.main(CatalogMigrationCLI.java:48)