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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...