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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...