Add PostgreSQL as a decube connection and help your team discover, document and monitor their data assets to drive data-driven insights and decisions.
Connecting to decube is as easy as providing us with credentials to your PostgreSQL database. At a minimum, we require:
Connect to PostgreSQL
source namewill be for you to differentiate and recognize particular sources within the decube application.
We highly recommend that you create a Read-Only user for decube. We have prepared a script that you may run on your PostgreSQL database to create this user.
- 1.Create a New User for decube
CREATE ROLE decube WITH LOGIN ENCRYPTED PASSWORD 'a_new_password';
2. Allow connection to the database
GRANT CONNECT ON DATABASE "your_db_name" TO decube;
3. We need access to information_schema
GRANT USAGE ON SCHEMA information_schema TO decube;
GRANT SELECT ON ALL TABLES IN SCHEMA information_schema TO decube;
4. You may need to run this per schema that you have based on the default behavior of the schema.
GRANT USAGE ON SCHEMA <schema_name> TO decube;
GRANT SELECT ON ALL TABLES IN SCHEMA TO decube;
If you want all of the tables in all your schemas to be included in decube, run the following SQL script:
FOR sch IN SELECT nspname FROM pg_namespace where nspname !~* 'pg|information_schema'
EXECUTE format($$ GRANT USAGE ON SCHEMA %I TO decube $$, sch);
EXECUTE format($$ GRANT SELECT ON ALL TABLES IN SCHEMA %I TO decube $$, sch);