TOSIT-IO / tdp-collection-prerequisites

Ansible collection with TDP prerequisites
Apache License 2.0
3 stars 10 forks source link

Hive (metastore) uses ```public``` Postgres schema to store SQL tables #28

Closed kpgtek closed 1 year ago

kpgtek commented 2 years ago

According to the script SQL hive-schema-3.1.0.postgres.sql used by hive to initiate schema in Postgres database, it seems that hive forces to use the public schema to create SQL tables, this is hard coded in the script, line 12:

SET search_path = public, pg_catalog;

Thus in postgresql role, there will not need to create a SQL schema in hive database.

kpgtek commented 2 years ago

Note: use public schema for an application is not best practice in PostgreSQL (Database Schema Recommendations).

rpignolet commented 1 year ago

As discuss today, disable schema generation for Hive to avoid modify Hive code.