Null data from SQL

I just transitioned from storing data as .CSV files to storing and retrieving data from a SQL server.

I’m having issues now where periodically random columns from random rows will be null

Just to test, I created a service that pulls data out of SQL and writes it to a CSV file once every 5 seconds – then I had the dashboard load the CSV instead – I did not see any issues with null rows here.

Has anyone else seen this? I’m not even sure where to start troubleshooting; this issue occurs whether the collections are populated via scheduled endpoint or in UDTable endpoint

Any help would be appreciated, this is a huge pain for us – the dashboard works great for a few seconds, but then random object properties will show missing data and eventually entire tables will crash when trying to perform functions (splits, etc) on the null properties.

Thanks in advance!

Any code examples?
Are you using a module for the SQL Queries, or just the invoke-sqlcmd?

Try adding a “| select-object stuff, otherstuff, thirdstudd | out-udgriddata” at the end.

Hey @somecoulombs I use SQL and dashboards quite a bit to display various information and to solve the NULL issue, that is what your SQL query is returning. Run your SQL query in Server management studio, and you will see NULL returned in your results. So you need to be able to construct your SQL query to return 0 when its NULL using a CASE statement or something, or filter out the NULL results in the WHERE clause. Then when you pass the data to your dashboard it all shows correctly

1 Like