Search code examples
prestopresto-jdbctrino

Creating catalog/schema/table in prestosql/presto container


I would like to use prestosql/presto container for automated tests. For this purpose I want to receive the ability to programmatically to create catalog/schema/table. Unfortunately, I didn't find the option via docker environment variables. If I trying to do it via jdbc connector, I receive following error:"This connector does not support creating tables"

How can I create schemas or tables using prestosql/presto container?


Solution

  • If you are writing tests in Java (as suggested by JDBC tag), you can use testcontainers library. It comes with Presto module.

    • uses prestosql/presto container under the hood
    • comes with Presto memory connector pre-installed, so you can create schemas & tables there