Skip to content

trino-iceberg-minio: unable to USE catalog #12

Closed
@GiorgioBaldelli

Description

@GiorgioBaldelli

Hi Brian @bitsondatadev, thanks for sharing the trino-iceberg-minio example in the community call and in this repo. Really appreciate your work!

I haven't found a solution for this issue yet:

  1. When attempting to run USE hive; or USE iceberg; to specify the catalog to use when executing a given SQL statement, this error follows:
io.trino.spi.TrinoException: line 1:1: Catalog must be specified when session catalog is not set
        at io.trino.sql.analyzer.SemanticExceptions.semanticException(SemanticExceptions.java:48)
        at io.trino.sql.analyzer.SemanticExceptions.semanticException(SemanticExceptions.java:43)
        at io.trino.execution.UseTask.lambda$execute$1(UseTask.java:65)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at io.trino.execution.UseTask.lambda$execute$2(UseTask.java:64)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        at io.trino.execution.UseTask.execute(UseTask.java:64)
        at io.trino.execution.UseTask.execute(UseTask.java:36)
        at io.trino.execution.DataDefinitionExecution.start(DataDefinitionExecution.java:145)
        at io.trino.execution.SqlQueryManager.createQuery(SqlQueryManager.java:249)
        at io.trino.dispatcher.LocalDispatchQuery.lambda$startExecution$7(LocalDispatchQuery.java:143)
        at io.trino.$gen.Trino_403____20221123_100619_2.run(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)

I've attempted to solve this by using the --catalog flag when initializing the connection:

./trino-cli-388-executable.jar --server http://localhost:8080 --catalog hive

Unfortunately, this is not helpful. When I attempt to create a dummy_table table in hive.iris the table gets also created in iceberg.iris. The result: hive.iris.dummy_table & iceberg.iris.dummy_table.

Have you bumped into a similar issue before and know a workaround perhaps?

Thanks in advance,
Giorgio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions