Getting Data In

DB Connect replacing trailing Zero's?

Gattaca2
Explorer

Hi

Has anyone seen this before, I'm using DB connect to pull data in from a MySQL db, and this is the results shown in the data lab

Gattaca2_0-1678461459765.png

but the raw events have the training zero's replaced with E7, any idea how I stop this?

Gattaca2_1-1678461564575.png

Thanks in advance

Andy

 

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

It's not that the trailing zeroes have been replaced by "E7".  The number has been converted to scientific format.  There should be functions you can use to ensure the value is returned as an integer ("cast", perhaps).  Ask your DBA.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

Gattaca2
Explorer

Thanks

I did have a quick look for something like that, I'll go and investigate further.

 

Andy

richgalloway
SplunkTrust
SplunkTrust

It's not that the trailing zeroes have been replaced by "E7".  The number has been converted to scientific format.  There should be functions you can use to ensure the value is returned as an integer ("cast", perhaps).  Ask your DBA.

---
If this reply helps you, Karma would be appreciated.

Gattaca2
Explorer

Yep a CAST command worked

For anyone who comes across this thread in the future, this solved the problem

CAST(Value AS DECIMAL(12)) as Value

What confused me was it was showing fine in the DB Connect Data Lab, but the data changed when it was ingested.

Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...