- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 09-27-2021 04:46 AM
1. MIDSERVER
2. SNOWFLAKE CREDENTIALS WITH BASIC AUTHENTICATION
Below are the steps to integrate with Snowflake.
Step1: Download the latest JAR file from maven repository with extension JAR and download the highlighted file.
Link:https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc/
Link to Download the file : https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc/3.13.6/
Step2: Attach the Downloaded files to ServiceNow below are the steps mentioned.
Navigate -> Mid server ->JAR Files
Attach the downloaded file and fill out the respective field values.
And then "Submit" the form. Incase you are getting the below error ignore it.
This file will be uploaded to MIDSERVER in the Agent -> lib -> extlib folder.
Note: When uploading the JAR file from ServiceNow Instance it will be uploaded to all the "Mid Server" running on the ServiceNow Instance and automatically all the midserver will be restarted once the JAR file is uploaded. Make sure to do this exercise in non business hours for production Instance.
Step3:
Configuring the DATA SOURCE
Navigate -> System Import sets -> Data Sources
Create a New Data Source
Select the Type as "JDBC" and create a new "Format" as "Snowflake" on the Data source form.
Label: Snowflake
Value : net.snowflake.client.jdbc.SnowflakeDriver
This can also be referenced in this website : https://docs.snowflake.com/en/user-guide/jdbc-configure.html#other-parameters
Sample Datasource Form:
MIDSERVER: Use any of your MID Server (Because the JAR will be Loaded onto all MIDSERVERS on your Instance)
DATABASENAME : SNOWFLAKE DATABASE NAME from which you're retrieving the data.
USERNAME: SNOWFLAKE USERNAME
PASSWORD: SNOWFLAKE PASSWORD
Step:4
Setting up Connection URL to communicate with SNOWFLAKE
Create a "Before Insert BR" on the Data source table to dynamically construct the Connection URL with conditions.
Script:
SAMPLE CONNECTION URL:
current.connection_url = "jdbc:snowflake://YOUR ACCOUNT NAME.YOUR REGION.snowflakecomputing.com/?user=" + current.jdbc_user_name + "&password=" + current.jdbc_password + "&warehouse=YOUR WAREHOUSE NAME &db=" + current.database_name + "&schema= YOUR SCHEMA NAME FROM SNOWFLAKE &role= YOUR SNOWFLAKE ROLE NAME";
YOUR ACCOUNT NAME : SNOWFLAKE ACCOUNT NAME
YOUR REGION : This differs based on the region (E.g for US starts with (us.east..) for EUROPE -> (eu.central )
USER: It will be retrieved from Datasource "Username" field.
PASSWORD: It will be retrieved from Datasource "Password" field.
WAREHOUSE : YOUR SNOWFLAKE WAREHOUSE NAME
DATABASE (db) : It will be retrieved from Datasource "Database" field.
SCHEMA : YOUR SCHEMA NAME FROM SNOWFLAKE
ROLE: YOUR SNOWFLAKE ROLE NAME
NOTE: Ask SNOWFLAKE team to create a local account with Basic Authentication method for the Servicenow user inorder to communicate with SNOWFLAKE.
After setting all this you should be able to Test load 20 records from SNOWFLAKE.
Referal Liks and Docs:
https://docs.snowflake.com/en/user-guide/jdbc-configure.html#other-parameters
https://docs.snowflake.com/en/user-guide/admin-account-identifier.html
https://docs.snowflake.com/en/user-guide/jdbc-configure.html#jdbc-driver-class
https://docs.snowflake.com/en/user-guide/jdbc-configure.html#jdbc-driver-connection-string
- 19,960 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi immanuel,
We have attached jar file, but in mid server we can see a folder name agent. but we can't see lib.
so if we can't able to see lib then it considered as file is not installed?
Any idea on that
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Raja,
There should be folder name extlib check in it.
Please go through the below link to troubleshoot for any errors occurred on your MID Server.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0535148
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I set this up but I am getting this error when trying to load 20 test records
MID Server reported error: java.sql.SQLException: com.snc.automation_common.integration.exceptions.InvalidConnectionParameterException: JDBC connection string not specified
any help would be great! Followed all the steps exactly here.
**EDIT**
I fixed that error by setting the connection string in the list view of the data sources table, now I'm getting this error
InvalidConnectionParameterException: Unable to load JDBC driver
**EDIT**
my Format field Snowflake had the wrong value need to have net.snowflake.client.jdbc.SnowflakeDriver
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I followed the steps to set up the snowflake integration. But I got below error while trying to test load 20 records.
MID Server reported error: SQLState: null
java.sql.SQLException: net.snowflake.client.jdbc.SnowflakeSQLException: Connection string is invalid. Unable to parse.
Has anybody encountered this error? I followed the steps exactly.
Thanks,
Renee
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I figured it out. It appears that there were spaces in the sample BR above, especially right before "&role". I removed the spaces and the error went away.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Has anyone used the Snowflake Connector? Snowflake Connector for ServiceNow Installation
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Jason:
I think Snowflake connector that you mentioned is to bring ServiceNow data into Snowflake. The discussion here is to bring Snowflake data into ServiceNow. We are trying to integrate Snowflake into ServiceNow, not the other way around. With that being said, the steps mentioned above by Immanuel does work. The only drawback is that it's using local user account, which is not the most secure way to authenticate. We are still looking into other options for more secure authentication. Hopefully that helps.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I have installed the JAR file for the mid server and able to find it in the mid server host under ext-lib, however I am still getting error as below
MID Server reported error: SQLState: null
java.sql.SQLException: java.sql.SQLException: No suitable driver found for jdbc:snowflake
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @VinothKumar Mur ,
Did the issue got resolved? I'm getting the same error
MID Server reported error: SQLState: null
java.sql.SQLException: java.sql.SQLException: No suitable driver found
Regards,
Srinivas
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Did the issue is resolved, I'm getting the similar error
MID Server reported error: SQLState: null
java.sql.SQLException: java.sql.SQLException: No suitable driver found
Regards
Srinivas
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Did the issue got resolved, I'm getting the same error
MID Server reported error: SQLState: null
java.sql.SQLException: java.sql.SQLException: No suitable driver found for jdbc:snowflake
Thanks
Srinivas
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello Team
I am looking for key pair authentication, user- password basic authentication is exist but , customer asking for key-pair authentication
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@SupriyaWaghmode @Immanuel Raj Does key pair authentication is possible in this integration?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello Divya ,
Key-pair method for connecting with Snowflake can be found in the Snowflake documentation. It is advisable to attempt a proof of concept initially. In my situation, we encountered issues implementing the key-pair method while connecting with Snowflake from ServiceNow. Despite ServiceNow's team sharing only a link to the documentation, the detailed steps were not provided.
As an alternative approach, we have chosen to utilize Snowflake Spoke within Snow.