# Logstash syncing from Mongodb to Elasticsearch - Null values in array data objects

**URL:** https://discuss.elastic.co/t/logstash-syncing-from-mongodb-to-elasticsearch-null-values-in-array-data-objects/309965
**Category:** Logstash
**Created:** [July 19, 2022, 1:44am UTC](https://discuss.elastic.co/t/logstash-syncing-from-mongodb-to-elasticsearch-null-values-in-array-data-objects/309965 "2022-07-19T01:44:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bindu1](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@bindu1](https://discuss.elastic.co/u/bindu1)
#### Post date: [July 19, 2022, 1:44am UTC](https://discuss.elastic.co/t/logstash-syncing-from-mongodb-to-elasticsearch-null-values-in-array-data-objects/309965/1 "2022-07-19T01:44:44Z")

</div>

Hello Community,

I'm using logstash to sync data from Mongdb to Elasticsearch & Kibana using JDBC input plugin. But array data fields are being synced as NULL values in ES/Kibana.

Below is logstash.conf:

```auto
input {
          jdbc {
            type => "courses_data"
            jdbc_driver_library => "/usr/share/logstash/logstash-core/lib/jars/mongojdbc4.1.jar"
            jdbc_driver_class => "com.mongodb.MongoClient"
            jdbc_connection_string => " ********"
            jdbc_user => "admin"
            jdbc_password => " ****"
            jdbc_validate_connection => true
            schedule => "*/30 * * * * *"
            use_column_value => true
            tracking_column => "_id"
            tracking_column_type => "numeric"
            statement => "select * from courses"
          }
      
        }

        filter
        {
          if [type] == "courses_data"
          {
            mutate
            {
                rename => { "_id" => "course_id" }
            }
          }

        }
        output {
          stdout {
              codec => rubydebug
          }
          
          if [type] == "courses_data" {
              elasticsearch {
                action => "update"
                doc_as_upsert => true
                document_id => "%{course_id}"
                index => "courses_data"
                hosts => ["elasticsearch:9200"]
                ssl_certificate_verification => false
              }
          }

        }

```

Below is the sample data field which is being synced as NULL in ES.

```auto
"tags": ["mwi", "metalworks institute", "publishing", "copyright", "SU-T1000"],

```

How can I sync array fields from mongdb into ES/Kibana ?

TIA

---

<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: [August 16, 2022, 1:45am UTC](https://discuss.elastic.co/t/logstash-syncing-from-mongodb-to-elasticsearch-null-values-in-array-data-objects/309965/2 "2022-08-16T01:45:38Z")

</div>

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