在 prestosql/presto 容器中创建 catalog/schema/table

Creating catalog/schema/table in prestosql/presto container

我想使用 prestosql/presto 容器进行自动化测试。为此,我想获得以编程方式创建 catalog/schema/table 的能力。不幸的是,我没有通过 docker 环境变量找到该选项。如果我尝试通过 jdbc 连接器进行操作,我会收到以下错误:"This connector does not support creating tables"

如何使用 prestosql/presto 容器创建模式或表?

如果您在 Java 中编写测试(如 JDBC 标签所建议),您可以使用 testcontainers library. It comes with Presto module.

  • 在后台使用 prestosql/presto 容器
  • 预装了 Presto memory connector,因此您可以在那里创建架构和表格