All Apps and Add-ons

Why does Splunk DB Connect truncate data from SQL varchar columns that contain newlines?

jhambrick
New Member

I'm currently working on ingesting data from a large SQL database table. One of the columns is a varchar that contains line breaks. For some reason, dbx will ingest the item on the first line, but will ignore the rest of the data in this column. Can someone please provide assistance on a workaround for this issue?

example

ColumnA
string1;
string2;
string3;
string4;
string5

When the data is pushed to splunk, it is stored as an kv pair that only contains the first string. We need all of the strings to be included in this kv pair.

ColumnA = string1

Please provide feedback if possible. Thanks

0 Karma

javiergn
Super Champion

I don't know why that wouldn't work from DB Connect but as a workaround I would try one of the following:

  • Ask your DBAs to create an SQL view that points to your table but replaces newlines with other character in that particular column. Something like:

    CREATE VIEW MyView AS
    SELECT
    Col1
    ,Col2
    ,REPLACE(ColWithNewLines, CHAR(13), 'somethingelse') AS ColWithNewLines
    FROM MyWonderfulTable

  • Another option would be to apply the same logic straight from DB Connect, avoiding the SQL view in this case. So rather than selecting your fields straight from the table using the wizard, use a query instead.

Hope that makes sense.

Thanks,
J

0 Karma

jhambrick
New Member

I've already taken the query route. I'm using a query that only selects 1000 rows at a time.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Tiling

This puzzle (first published here) is based on finding groups of tessellated tiles (inspired by floor tiles I ...

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...