Description
Problem Statement
Currently, we allow users to test their destination configuration only when they are setting up the destination. However, replication configuration can cause destinations to fail as well. The specific problem that we have observed so far is that Snowflake destination is configured with some default schema and we check for access to that schema as well as for ability to create new schemas during connector setup. If the user then sets up replication and selects the "Mirror source structure" or "Namespace custom format" in "Destination Namespace" options, Snowflake destination can end up trying to write to a schema that it does not have access to. This was observed in several customer accounts when syncing data from Postgres source where tables are in schema "public". The problem is reported as
Schema 'PUBLIC' already exists, but current role has no privileges on it. If this is unexpected and you cannot resolve this problem, contact your system administrator. ACCOUNTADMIN role may be required to manage the privileges on the object.
Furthermore, this problem cannot currently be caught in CHECK
method, because CHECK
does not have access to source schema or replication configuration. We already do CHECK for ability to create new schema, so the problem happens only when the target schema already exists and we don’t have permissions to write to it and we don’t know the name of the target schema until the sync starts
Desired solution
For better UX, I suggest that we add a "check" button to Replication page and add a new call to the protocol, which will allow the connectors (or at least the destination connector) to check if the replication configuration is correct, not just if the connector configuration is correct.
Doing so will also require having a new type of check method (checkReplication
?) that takes replication options and source schema as arguments in addition to destination configuration.
Current workaround
Currently, the problem is only detected after the failure of the first sync, which has a negative affect on first experience and activation.