Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scroll ignore
scroll-viewporttrue
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-htmltrue
scroll-epubtrue

Open in new tab

About Collectors

Collectors are extractors that are developed and managed by you (A customer of K).

...

Postgres Access

Log into Redshift as a Superuser. Superuser access is required to complete the following steps.

Create a Redshift user. This user MUST be either (one or the other below, we generally recommend 2.)

...

Be a Superuser. Refer to https://docs.aws.amazon.com/redshift/latest/dg/r_superusers.html to view all required data.

Code Block
ALTER USER <kada user> CREATEUSER; -- GRANTS SUPERUSER

Be a Database user with:

Unrestricted SYSLOG ACCESS refer to https://docs.aws.amazon.com/redshift/latest/dg/c_visibility-of-data.html. This will allow full access to the STL tables for the user.

Code Block
languagesql
ALTER USER <kada user> SYSLOG ACCESS UNRESTRICTED; -- GRANTS READ ACCESS

Select Access to existing and future tables in all Schemas for each Database you want K to ingest.

List all existing Schema in the Database by running

Code Block
languagesql
SELECT DISTINCT schema_name FROM svv_all_tables; -- LIST ALL SCHEMAS

For each schema above do the following to allow the user select access to all tables inside the Schema and any new tables created in the schema thereafter.

You also must do this for ANY new schemas created in the Database to ensure K has view of it.

Code Block
languagesql
GRANT USAGE ON SCHEMA <schema name> TO <kada user>;
GRANT SELECT ON ALL TABLES IN SCHEMA <schema name> TO <kada user>;
ALTER DEFAULT PRIVILEGES IN SCHEMA <schema name> GRANT SELECT ON TABLES TO <kada user>;

PG Catalog

The PG tables are granted per database but generally all users should have access to them on DB creation. In the event the user doesn’t have access, explicit grants will need to be done per new DB in Postgres.

Code Block
languagesql
GRANT USAGE ON SCHEMA pg_catalog TO <kada user>;
GRANT SELECT ON ALL TABLES IN SCHEMA pg_catalog TO <kada user>;

The user used for the extraction must also be able to connect to the the databases needed for extraction.

PG Tables

These tables are per database in Postgres

  • pg_class

  • pg_user

  • pg_group

  • pg_namespace

  • pg_proc

  • pg_database

System Tables

These tables can be accessed in any database and reads from the leader node in Postgres

  • svv_all_columns

  • svv_all_tables

  • svv_tables

  • svv_external_tables

  • svv_external_schemas

  • stl_query

  • stl_querytext

  • stl_ddltext

  • stl_utilitytext

  • stl_query_metrics

  • stl_sessions

  • stl_connection_log

Databases

...

dev (The extractor uses the dev database as a test access point)

...

The user used for the extractor will need access to a number of pg_catalog tables outlined below

PG Catalog

Generally all users should have access to the pg_catalog tables on DB creation. In the event the user doesn’t have access, explicit grants will need to be done per new DB in Postgres.

Code Block
languagesql
GRANT USAGE ON SCHEMA pg_catalog TO <kada user>;
GRANT SELECT ON ALL TABLES IN SCHEMA pg_catalog TO <kada user>;

The user used for the extraction must also be able to connect to the the databases needed for extraction.

PG Tables

These tables are per database in Postgres

  • pg_class

  • pg_namespace

  • pg_proc

  • pg_database

  • pg_language

  • pg_type

  • pg_collation

  • pg_depend

  • pg_sequence

Databases

  • All other databases that you want onboarded

Info

Note that visibility of entries in these tables will depend on if the user has SELECT access to the table, so make sure SELECT is granted to the <kada user> for all tables within the database. You may need to re-apply this grant if schemas are dropped, you may also wish to apply a default grant on the schema so future tables can be visible.

  1. Code Block
    languagesql
    GRANT SELECT ON ALL TABLES IN SCHEMA <schema> TO <kada user>user;
  2. Code Block
    languagesql
    ALTER DEFAULT PRIVILEGES IN SCHEMA <schema> public GRANT SELECT ON TABLES TO <kada user>;

...

Step 1: Create the Source in K

...