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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...