Ishan
06/13/2023, 3:40 AMCREATE CATALOG myhive WITH (
'type' = 'hive',
'default-database' = 'mydatabase',
'hive-conf-dir' = '/opt/hive-conf'
);
-- set the HiveCatalog as the current catalog of the session
USE CATALOG myhive;
cc @Danny ChenMartijn Visser
06/13/2023, 6:33 AMI am not seeing that happen, is that expected?Yes, that is as expected. The Hive catalog is an external, persisted catalog. However, your connection to Hive itself is not persisted by Flink SQL. But you can fix that with an initialize file during your session, as outlined on https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/table/sqlclient/#initialize-session-using-sql-files
Ishan
06/13/2023, 6:41 AMMartijn Visser
06/13/2023, 6:42 AMMartijn Visser
06/13/2023, 6:42 AMCREATE CATALOG you're creating the connection to Hive, but that information isn't persisted in Flink SQLIshan
06/13/2023, 6:44 AMMartijn Visser
06/13/2023, 6:44 AMSHOW CATALOGS ?Ishan
06/13/2023, 6:45 AMIshan
06/13/2023, 6:45 AMMartijn Visser
06/13/2023, 6:46 AMIshan
06/13/2023, 6:47 AMMartijn Visser
06/13/2023, 6:48 AMMartijn Visser
06/13/2023, 6:48 AMMartijn Visser
06/13/2023, 6:48 AMMartijn Visser
06/13/2023, 6:49 AMIshan
06/13/2023, 6:50 AMIshan
06/13/2023, 6:50 AMMartijn Visser
06/13/2023, 6:51 AMlooks like catalog is just a connection string of sorts.Mostly yes. This is how it's explained in the docs
Catalog enables users to reference existing metadata in their data systems, and automatically maps them to Flink’s corresponding metadata.
Ishan
06/13/2023, 6:53 AMMartijn Visser
06/13/2023, 10:28 AMIshan
06/13/2023, 3:42 PM