Magdalena Kobusch
11/12/2024, 1:07 PMCannot initialize Catalog implementation org.apache.iceberg.aws.glue.GlueCatalog: Cannot find constructor for interface org.apache.iceberg.catalog.Catalog
I'm using the org.apache.iceberg:iceberg-flink-runtime-1.18:1.5.0 jar.rmoff
11/12/2024, 2:29 PMrmoff
11/12/2024, 2:31 PMiceberg-aws-bundle JAR too?Magdalena Kobusch
11/12/2024, 4:16 PMtableEnv.executeSql(
"CREATE CATALOG pulse WITH (" +
"'type'='iceberg'," +
"'warehouse'='s3://bucket/'," +
"'catalog-impl'='org.apache.iceberg.aws.glue.GlueCatalog'," +
"'io-impl'='org.apache.iceberg.aws.s3.S3FileIO'," +
"'property-version'='1'," +
"'catalog-id'='aws-account-id'" +
")"
);Magdalena Kobusch
11/12/2024, 4:16 PMSQL validation failed. From line 1, column 15 to line 1, column 38: Object 'pulse' not foundMagdalena Kobusch
11/12/2024, 4:17 PMrmoff
11/12/2024, 4:31 PMCREATE CATALOG?Magdalena Kobusch
11/12/2024, 4:36 PMtEnv.sqlQuery("select * from pulse.sa.search_extended where ts = '20240101' and vertical = 'H' limit 10")
.execute().print();Magdalena Kobusch
11/12/2024, 4:37 PMtEnv.executeSql("CREATE TABLE sa.test_flink (ts STRING) WITH (" +
"\t 'connector' = 'iceberg',\n" +
"\t 'catalog-type' = 'glue',\n" +
"\t 'catalog-name' = 'pulse',\n" +
"\t 'warehouse' = 's3://bucket/',\n" +
"\t 'io-impl' = 'org.apache.iceberg.aws.s3.S3FileIO',\n" +
"\t 'catalog-id' = 'aws-account-id')" );
but that seems to try to create a table in default_catalog, not pulse as indicated...
Exception in thread "main" org.apache.flink.table.api.ValidationException: Could not execute CreateTable in path `default_catalog`.`sa`.`test_flink`rmoff
11/12/2024, 4:49 PMCREATE TABLE test_flink ?rmoff
11/12/2024, 4:50 PMrmoff
11/12/2024, 4:51 PMrmoff
11/12/2024, 4:52 PMtable_env.execute_sql("USE CATALOG pulse")rmoff
11/12/2024, 5:04 PMsa database anywhere?rmoff
11/12/2024, 5:04 PMrmoff
11/12/2024, 5:04 PMtable_env.execute_sql("USE CATALOG pulse")
table_env.execute_sql("USE DATABASE sa")rmoff
11/12/2024, 5:05 PMCREATE TABLE commandMagdalena Kobusch
11/12/2024, 8:42 PMMagdalena Kobusch
11/12/2024, 8:43 PMrmoff
11/12/2024, 9:40 PMMagdalena Kobusch
11/13/2024, 7:12 AMtableEnv.executeSql(
"CREATE CATALOG pulse WITH (" +
"'type'='iceberg'," +
"'warehouse'='s3://bucket/'," +
"'catalog-impl'='org.apache.iceberg.aws.glue.GlueCatalog'," +
"'io-impl'='org.apache.iceberg.aws.s3.S3FileIO'," +
"'property-version'='1'," +
"'catalog-id'='aws-account-id'" +
")"
);
tEnv.executeSql("USE CATALOG pulse");
tEnv.executeSql("USE DATABASE sa");
tEnv.sqlQuery("select * from search_extended where ts = '20240101' and vertical = 'H' limit 10")
.execute().print();
Fails with: A catalog with name [pulse] does not exist.rmoff
11/13/2024, 9:09 AMtableEnv and tEnv. Try
tableEnv.executeSql(
"CREATE CATALOG pulse WITH (" +
"'type'='iceberg'," +
"'warehouse'='s3://bucket/'," +
"'catalog-impl'='org.apache.iceberg.aws.glue.GlueCatalog'," +
"'io-impl'='org.apache.iceberg.aws.s3.S3FileIO'," +
"'property-version'='1'," +
"'catalog-id'='aws-account-id'" +
")"
);
tableEnv.executeSql("USE CATALOG pulse");
tableEnv.executeSql("USE DATABASE sa");
tableEnv.sqlQuery("select * from search_extended where ts = '20240101' and vertical = 'H' limit 10")
.execute().print();Magdalena Kobusch
11/13/2024, 1:26 PMMagdalena Kobusch
11/13/2024, 1:27 PM