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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...