Skip to content

Do not enforce connector table property in CREATE TABLE #1924

@ferenc-csaky

Description

@ferenc-csaky

There can be situations, when a CREATE TABLE statement might not contain a connector property. This is the case for example when you precreate an Iceberg catalog, and create table afterwards, so some props are inherited from the catalog itself.

Faulty scenario

CREATE CATALOG glue WITH (
    'type' = 'iceberg',
    'catalog-impl' = 'org.apache.iceberg.aws.glue.GlueCatalog',
    'io-impl' = 'org.apache.iceberg.aws.s3.S3FileIO'
    'warehouse' = 's3://...',
);

USE CATALOG glue;
USE my_glue_database;

CREATE TABLE my_table (
    str_col STRING,
    int_col INT
) WITH (
    'format-version' = '2'
);

Failure

Initializing build environment ...
Processing dependencies ...
Compiling SQRL script ...
java.util.NoSuchElementException: No value present
	at java.base/java.util.Optional.get(Optional.java:143)
	at com.datasqrl.planner.tables.FlinkConnectorConfig.getTableType(FlinkConnectorConfig.java:66)
	at com.datasqrl.planner.Sqrl2FlinkSQLTranslator.addTable(Sqrl2FlinkSQLTranslator.java:926)
	at com.datasqrl.planner.Sqrl2FlinkSQLTranslator.createTable(Sqrl2FlinkSQLTranslator.java:731)
	at com.datasqrl.planner.SqlScriptPlanner.planStatement(SqlScriptPlanner.java:308)
	at com.datasqrl.planner.SqlScriptPlanner.planMain(SqlScriptPlanner.java:225)
	at com.datasqrl.compile.CompilationProcess.executeCompilation(CompilationProcess.java:67)
	at com.datasqrl.cli.AbstractCompileCmd.compile(AbstractCompileCmd.java:94)
	at com.datasqrl.cli.AbstractCompileCmd.runInternal(AbstractCompileCmd.java:122)
	at com.datasqrl.cli.BaseCmd.run(BaseCmd.java:44)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2423)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2425)
	at picocli.CommandLine.execute(CommandLine.java:2174)
	at com.datasqrl.cli.DatasqrlCli.main(DatasqrlCli.java:69)
[FATAL] No value present

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions