Snowflake connector error

Which IIQ version are you inquiring about?

[8.3p3]

Hi I am getting following error in snowflake connector when there is a user with \ in the name.

It seems there is a user in snowflake use id contains \ , and although the statement has \ to escape the \ still i get the connector error.

"code" : "391917",
"message" : "Invalid parameter. Unrecognized character escape 's' (code 115)\n at [Source: (String)\"{\"statement\": \"SHOW GRANTS TO USER \\\"ad\\snowflakeAnalytics\\\"\" }\"; line: 1, column: 45] (through reference chain: com.snowflake.api.client.StatementRequest[\"statement\"])"
}
2025-02-13T20:43:36,633 TRACE QuartzScheduler_Worker-5 openconnector.connector.snowflake.SnowflakeService:108 - Exiting maskPasswordAttribute: Arguments => {

Hi @abhishek_chowdhury,

It looks like the issue is caused by how the backslash (\) is being handled in the query. Even though you are escaping it, Snowflake might still interpret it incorrectly.

A couple of things you can try:

1. Double escaping the backslash:

SHOW GRANTS TO USER \\\"ad\\\\snowflakeAnalytics\\\"

Some systems require \\ to be passed as \\\\ in JSON strings or API calls.

2. Using single quotes instead of double quotes:

SHOW GRANTS TO USER 'ad\\snowflakeAnalytics'

Snowflake sometimes handles escape sequences differently in single-quoted vs. double-quoted strings.

3. Verifying how the query is being constructed:
If this query is being built dynamically, ensure that the backslash isn’t being stripped or misinterpreted before being sent to Snowflake.

Could you test these and let me know if any of them work? :rocket:

Hi @abhishek_chowdhury,

Just checking in to see if my response helped you.

If this solution resolved your issue, could you mark it as the accepted answer in the forum? This would help others facing similar challenges and also allow me to continue progressing on my journey as a SailPoint Ambassador.

Let me know if you need further assistance!