# Input-jdbc transform row with all columns to json

**URL:** <https://discuss.elastic.co/t/input-jdbc-transform-row-with-all-columns-to-json/211553>\
**Category:** Logstash\
**Created:** [December 12, 2019, 3:13am UTC](https://discuss.elastic.co/t/input-jdbc-transform-row-with-all-columns-to-json/211553 "2019-12-12T03:13:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashutosh\_Pandey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashutosh_pandey/32/50577_2.png) [@Ashutosh\_Pandey](https://discuss.elastic.co/u/Ashutosh_Pandey)\
**Post date:** [December 12, 2019, 3:13am UTC](https://discuss.elastic.co/t/input-jdbc-transform-row-with-all-columns-to-json/211553/1 "2019-12-12T03:13:09Z")

</div>

I have a jdbc input plugin. My intention is to read a row and transform all the data into a kafka payload object and send it to kafka.

{  
....  
"payload" : " All the data from one row of jdbc input should come here"  
"timestamp" : "12:45:56"  
}

I want it to be a generic solution, and i do not want to transcribe all the fields from sql one by one.  
if i can get the name of the field/array in which jdbc\_input plugin sends the data that should also work.

or if there is a way to provide the target field which would hold the row by row output of a jdbc-input plugin, please let me know

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 9, 2020, 3:13am UTC](https://discuss.elastic.co/t/input-jdbc-transform-row-with-all-columns-to-json/211553/2 "2020-01-09T03:13:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
