Troubleshooting

This topic provides guidelines for troubleshooting issues with the Snowflake Native SDK for Connectors. If you want to discover the cause of a specific error, you need appropriate tools that make the troubleshooting process easier. For that reason the Snowflake Native SDK for Connectors provides a couple of procedures, views, and other methods to troubleshoot the connector effectively.

Procedure responses

Usually when something wrong happens with the connector, or even when the user cannot execute the particular procedure successfully because of the state of the Connector, the first source of the troubleshooting data should be the procedure response. In the Snowflake Native SDK for Connectors, the error response from the procedure is standardized. The response is returned as a VARIANT with two fields, that are always present:

  • response_code - the value of this field, in case of an error response, is an error code, e.g. INVALID_CONNECTOR_STATUS

  • message - the value of this field is a message that provides more information regarding the occurred error

Structure of an error response:

{
  "response_code": "<ERROR_CODE>",
  "message": "<error message>"
}
Copy

Database objects

The Snowflake Native SDK for Connectors provides a couple of views and procedures that help in checking the actual state of the Connector.

Views:

Procedures:

Event table

By default, procedures provided by the SDK that are implemented in Java use ConnectorErrorHelper to wrap thrown exceptions during the particular procedure execution. Apart from wrapping the thrown exception and mapping it to ConnectorResponse with an error code, the default implementation of ConnectorErrorHelper logs events basing on the thrown exceptions to the Event Table if it’s set up in the customer’s account. If you want to learn more about using Event Table, see the official Snowflake documentation.

There is a possibility to filter out logs generated by the Snowflake Native SDK for Connectors from the event table knowing only the application instance name. In addition, there is also a possibility to filter out logs of errors that occurred in the most common parts of the Connector.

Example query:

SELECT * FROM PLATFORM_CI_TOOLS.PUBLIC.EVENTS
    WHERE RESOURCE_ATTRIBUTES:"snow.database.name" LIKE '<INSTANCE_NAME>'
    [AND SCOPE:"name" LIKE '<ERROR_CODE>']
    [ORDER BY timestamp DESC];
Copy

Possible error codes:

  • CONFIGURE_CONNECTOR_FAILED - occurs when Configure Connector Wizard step failed

  • SET_CONNECTION_CONFIGURATION_FAILED - occurs when Set Connection Configuration Wizard step failed

  • FINALIZE_CONNECTOR_CONFIGURATION_FAILED - occurs when Finalize Connector Configuration Wizard step failed

  • PAUSE_CONNECTOR_FAILED - occurs when Pause Connector process failed

  • RESUME_CONNECTOR_FAILED - occurs when Resume Connector process failed