Postgres: to setup FiveTran user
create user fivetranuser WITH LOGIN NOCREATEDB NOCREATEROLE INHERIT NOREPLICATION CONNECTION LIMIT -1 PASSWORD 'z9jDDZpQpLbkMX_7h';
grant fivetranuser to pgcfadmin;
grant connect on database cftest to fivetranuser;
grant usage on schema ordadmin to fivetranuser;
grant select on ordadmin.ORDER_HEADER to fivetranuser;
alter user fivetranuser with replication;
CREATE PUBLICATION fivetran_customfit_pub FOR TABLE ordadmin.ORDER_HEADER, tablename2, tablename3;
SELECT pg_create_logical_replication_slot('fivetran_customfit_slot', 'pgoutput');
Verify that the Fivetran user can read the replication slot by running the following command
SELECT count(*) FROM pg_logical_slot_peek_binary_changes('fivetran_customfit_slot', null, null, 'proto_version', '1', 'publication_names', 'fivetran_customfit_pub');
Additional documentation:
ALTER PUBLICATION fivetran_leads_pub ADD TABLE 1ds.landing_table;
ALTER PUBLICATION fivetran_leads_pub ADD TABLE 1ds.brands;
SELECT pg_drop_replication_slot('fivetran_leads_slot');
SELECT pg_create_logical_replication_slot('fivetran_leads_slot', 'pgoutput')
https://fivetran.com/docs/connectors/databases/postgresql/gcs-setup-guide
Then log in as fivetranuser and run the following:
SELECT count(*) FROM pg_logical_slot_peek_binary_changes('fivetran_customfit_slot', null, null, 'proto_version', '1', 'publication_names', 'fivetran_customfit_pub');
cftest_fivetranuser
pg-cusfit-cftest.gcp.tmw.com
O:\Users\GM15\keys\pg-cusfit-cftest_client-cert.pem
Comments
Post a Comment