ServiceNow ODBC Connection with Tableau SQL Query Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2021 10:37 AM
Does anyone in here use Tableau to connect to their ServiceNow instance? If so, how do I go about joining tables? When I try to join them and pick the values that should be joined, they show up as two different tables, instead of being joined to show all data in one. I feel like I'm missing something. I even try to do a custom SQL query but that didn't work out for me either. I'm trying to show the tasks and incident tables together to create some visuals.
m on version 2020.4.1 on Tableau Desktop Professional Edition. So I thought it would be simple as just doing a custom query like "Select top 10 * from task". When I try that it throughs this message: An error occurred while communicating with the Other Databases (ODBC) data source 'ShowData'
Bad Connection: Tableau could not connect to the data source.
Error Code: B19090E0
[SN][ODBC ServiceNow driver][OpenAccess SDK SQL Engine]Cannot create schema.The table has not been found in the DB schema [tableName=TASKS]. The table might not exist in the database or the table ACLs prevent user access to it. Hop on the instance, navigate to Tables, find the requested table and if it is there check ACLs.[1050]
[SN][ODBC ServiceNow driver][OpenAccess SDK SQL Engine]Cannot create schema.The table has not been found in the DB schema [tableName=TASKS]. The table might not exist in the database or the table ACLs prevent user access to it. Hop on the instance, navigate to Tables, find the requested table and if it is there check ACLs.[1050]
Generic ODBC requires additional configuration. The driver and DSN (data source name) must be installed and configured to match the connection.
Unable to connect using the DSN named "ServiceNow". Check that the DSN exists and is a valid connection." However if I drag tables from the left hand side to the upper middle, data is returned at the bottom when I hit update now. When I drag another table I want to join on, it brings up the "How do relationships differ from joins?" I was thinking that I would want to put the item I want to join on. Ex. Assignment Group.
I should note that I can run a query from the interactive SQL window when testing the connection. So I know querying works but not sure why it doesn't with Tableau.
Thank you for any taking the time to look at this and for your answers.
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2021 12:32 PM
Based on the error message it looks like the name is not correct on the table; tableName=TASKS
check your query and make sure that you are using the correct table name it sould be Task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2021 12:38 PM
weird... I had done it both ways and neither were coming back with any results. I was able to run "select top 10 * from task" and results came back. Are you pretty familiar with using SQL queries in Tableau or PBI? If so, do you have any pointers or queries that you prefer to use?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2021 12:50 PM
I am somewhat comfortable with SQL, before the company purchased ServiceNow I used to create reports in Crystal Reports using SQL stored procs. Not too familiar with Tableau.
Just a suggestion try using (NOLOCK) when you can
**sample
SELECT * FROM "tableName" WITH (NOLOCK)
The benefits of querying data using the NOLOCK table hint is that it requires less memory and prevents deadlocks from occurring with any other queries that may be reading similar data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2021 01:17 PM
When I add the WITH (NOLOCK) at the end, I get this error message. "
An error occurred while communicating with Other Databases (ODBC)
Error Code: 2F0F5E42
[SN][ODBC ServiceNow driver][OpenAccess SDK SQL Engine]Syntax error in SQL statement. syntax error line 14 at or after token <with>.[10179]
[SN][ODBC ServiceNow driver][OpenAccess SDK SQL Engine]Syntax error in SQL statement. syntax error line 14 at or after token <with>.[10179]
"