Platform

 View Only

 Generic Database Connector

Jump to  Best Answer
  • Datalink
Apptio Community Member's profile image
Apptio Community Member posted Sat January 08, 2022 09:30 PM
Happy New Year Community,

I have a problem with the import step in a table sourced from  a Generic Database Connector on an On-Prem Datalink accessing data in a MS SQL Server.

In Datalink I setup the connector and am able to successfully execute Test Table and successfully manually run the saved Connector.

The problem is that I get a json parsing error on the import step once the connector has run when I configure the SQL statement to pull back more than one column.

When I use this select statement:

select [Computer Name] from PCData;

I get a table in Apptio with computer names for the 204, 308 PCs that are in the inventory.

When I use this select statement:

select [Computer Name], [Asset Domain] from PCData;

I get "Unexpected character ('{' (code 123)): was expecting comma to separate Array entries at [Source: (InputStreamReader); line: 1, column: 54]" rather than any data imported.  Unfortunately, I have not been able to find the json that is being generated by Datalink.

I have opened a support case with Apptio which has been escalated to engineering.  I figure it is a long shot but as it has been a while I thought I would see if anyone in the community has any suggestions.

For now I have a python script extracting the data to a csv file and then am uploading the CSV file to Apptio.  However, the script adds an extra layer of complexity which using the Generic Database Connector avoids.

Thanks,

Gregory




#Datalink
Apptio Community Member's profile image
Apptio Community Member  Best Answer

Renee,

Progress has been made but we continue to have problems.

It was determined that there is a bug with the Database Connector which causes the parsing of the json it to fail in Apptio if the first column or the last column for a row is null.  This caused the initial failures.  The work around is to make sure you don’t have nulls in your first or last column.

During our testing of the work around we started seeing another problem where entire columns appear to be dropped.  Unfortunately, due to a change in the configuration setup for the Database Connector our on-prem connectors are not working.  We are working with Support to get this resolved.

The story continues…

Thank you,

Gregory J. Donaldson


#Datalink
Renee Daignault's profile image
Renee Daignault
Hello Gregory - I am taking a look into this with a few team members and I will be in touch soon!
#Datalink
Renee Daignault's profile image
Renee Daignault
Gregory - have you always used .json or have they recently changes file types in the import(s)?
#Datalink
Apptio Community Member's profile image
Apptio Community Member
Renee, thank you so much for reaching out.

We initially were manually uploading the data using a spreadsheet.

When we setup the connector it is the connector that is formatting the data as json.

Some additional comments:

We are selecting 95 columns out of the database.  The upload fails when the connector is configured with a select that results in more than one column.  If I just setup the connector to select one column the upload works fine.

To see if it was an issue with our data I took the data from the database and python's jsonify converted it to json and uploaded it manually and it loaded just fine.

We setup another Generic Database Connector to another MS SQL database and it works fine.

I expect the problem is the way that the connector is formatting the data into json something in our data is causing invalid json syntax.
#Datalink
Renee Daignault's profile image
Renee Daignault
Hello Gregory - Have you been able to resolve this issue with support? If not I have more question/responses to your last update. 

Thank you - Renee
#Datalink
Debbie Hagen's profile image
Debbie Hagen
@Gregory Donaldson,
Thanks for sharing the update.  Sounds like you are working on this with our support team.  ​Once you get the solution, we'd love it if you'd post here to share with others!

Cheers,
Debbie
#Datalink