Use this connector to have Foundational scan and determine lineage and downstream impact for Hive.
This setup should take 5 minutes.
Permissions: You'll need to be a Hive admin for this setup
β
βFoundational will only access metadata and does not query data
In order to provide Foundational access to Hive, please follow these steps below and provide access to the underlying Postgres SQL database of Hive:
1. Create User and Grant Permissions to Metastore Database
You can access the PostgreSQL database through your preferred PostgreSQL client. The command line presented here are using psql
Connect to your PostgreSQL database, using the following command:
psql -h <host> -p 5432 -U <admin-user>
By default Postgres will be in port 5432 under your Hive host.
βSwitch to the Hive Metastore database:
(metastore
is the default name for Hive Metastore. If you use a different name in your Hive deployment, please use your metastore name):\connect metastore
Use the script below to create a user named
foundational
and grant necessary permissions to a role namedFoundational-role
. Just change<password>
to your password and run this script:CREATE USER foundational WITH PASSWORD '<password>';
CREATE ROLE "Foundational-role";
GRANT "Foundational-role" TO foundational;
GRANT CONNECT ON DATABASE metastore TO "Foundational-role";
GRANT USAGE ON SCHEMA public TO "Foundational-role";
GRANT SELECT ON "COLUMNS_V2", "SDS", "TBLS", "DBS" TO "Foundational-role";
GRANT SELECT ("COLUMN_NAME", "TYPE_NAME", "INTEGER_IDX", "CD_ID") ON "COLUMNS_V2" TO "Foundational-role";
GRANT SELECT ("INPUT_FORMAT", "LOCATION", "SD_ID") ON "SDS" TO "Foundational-role";
GRANT SELECT ("TBL_NAME", "TBL_TYPE", "SD_ID", "DB_ID") ON "TBLS" TO "Foundational-role";
GRANT SELECT ("NAME", "DESC", "CTLG_NAME", "DB_ID") ON "DBS" TO "Foundational-role";Verify roles and users were created properly, by runnuing the following queries, and verifying they return the role name and user name
SELECT rolname FROM pg_roles WHERE rolname = 'Foundational-role'; SELECT usename FROM pg_user WHERE usename = 'foundational';
2. Setup in Foundational
Open the Connectors page in Foundational and select the Hive connector
Fill in the following information:
Hive Metastore DB Host: host address of the Hive Metastore Database.
Hive Metastore DB port: port number for the Hive Metastore Database
Hive Metastore DB name: If you have a custom name for the Hive Metastore Database, provide it here. The default name is
metastore
.User Name: username for foundational to connect to your PostgreSQL behind Metastore. If you used the script n this guide, the name is
foundational
Password: password for the
foundational
username (which you picked above when running the script).
β