Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

ServiceNow ODBC Connection with Tableau SQL Query Issue

Austin20
Tera Contributor

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.

12 REPLIES 12

Can you share the code you used?

select TOP 10
number,
opened_at,
dv_opened_by
dv_assigned_to,
dv_assignment_group,
closed_at,
dv_closed_by,
escalation,
priority,
dv_state
from task WITH (NOLOCK)

select TOP 10
number,
opened_at,
dv_opened_by,
dv_assigned_to,
dv_assignment_group,
closed_at,
dv_closed_by,
escalation,
priority,
dv_state
from task WITH (NOLOCK)

 

it looks like you were missing a comma 

Sorry about that. Thanks for pointing that out. It works now!

Any thoughts on this one? 

I am trying to gather tickets from last month and keep getting error messages. 

ISQL> SELECT * FROM TASK WHERE month(opened_at)=month(now())-1;
The following error information describes the failure
ODBC Call = SQLPrepareW()
SQL State = HY000
Native error = 1050(41A)
Error Message = [SN][ODBC ServiceNow driver][OpenAccess SDK SQL Engine]Cannot create schema.The table has not been found in the DB schema [tableName=TASK]. 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.
Elapsed time 829 ms.
Elapsed time: Prepare 0 ms. Execute 0 ms. Fetch results 829 ms.