In almost every case, the “table should be resolved” error from
FlinkCatalog.createTable() means that the table identifier you are passing
is either invalid, incomplete, or the catalog can’t figure out where the
table is supposed to live. Most commonly, it’s because:
The database (namespace) is empty or invalid, e.g., an empty
catalogNamespace.
The table name is empty or null, e.g., a missing catalogTable.
A required configuration (e.g., warehouse) or property is not present,
causing Iceberg to fail resolving the path.



I'd add a log every time you do dotenv.get (for both catalog namespace and
 catalog table) and make sure those configs are coming properly and not
null/empty.


Att,
Pedro Mázala
+31 (06) 3819 3814
Be awesome


On Wed, 29 Jan 2025 at 17:11, Kamesh Sampath <kamesh.samp...@hotmail.com>
wrote:

> I am on Apache Flink 1.20, trying to use pure Java SQL API to create a
> catalog and table in it. When I tried to do so I am getting the following
> error:
>
> ```
> 21:31:41,939 ERROR dev.kameshs.demos.flink.iceberg
>      [] - Error running job
> java.lang.IllegalArgumentException: table should be resolved
> at
> org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkArgument(Preconditions.java:143)
> ~[iceberg-flink-runtime-1.20-1.7.1.jar:?]
> at
> org.apache.iceberg.flink.FlinkCatalog.createTable(FlinkCatalog.java:394)
> ~[iceberg-flink-runtime-1.20-1.7.1.jar:?]
> at
> dev.kameshs.demos.flink.iceberg.VehicleTelemetryProcessor.lambda$main$0(VehicleTelemetryProcessor.java:167)
> ~[main/:?]
> at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
> at
> dev.kameshs.demos.flink.iceberg.VehicleTelemetryProcessor.main(VehicleTelemetryProcessor.java:106)
> [main/:?]
> ```
>
> The sample code is
> https://gist.github.com/kameshsampath/0c4ad07b236bd38e999316598141b93e#file-vehicletelemetryprocessor-java-L167
>
> Any clue/pointers to move forward.
>
> Thank you.
>

Reply via email to