title: mapper_parsing_exception in Elasticsearch 6.5.4
body: <p>I'm currently running an integration of:
  Debezium MySQL connector source(v0.9.0F), 
  Kafka connect(confluent platform v5.1.2) and 
  ES(v6.5.4) on sink side.
  Source connector is successfully able to parse tables in MySQL(checked in kafka logs), but below error occurs(with certain tables &amp; specified columns) on sink side(ES).</p>
  
  <pre><code>"type\":\"mapper_parsing_exception\",
  \"reason\":\"Mapping definition for [column1] has unsupported parameters:  [null_value : 1970-01-01T00:00:00Z]\"
  </code></pre>
  
  <p><code>column1</code>'s DDL is as follows:</p>
  
  <pre><code>`column1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
  </code></pre>
  
  <p>However, there is no data present in table which is equal to <code>1970-01-01T00:00:00Z</code> (not sure if that matters)</p>
  
  <p>Similarly for another table's column:</p>
  
  <pre><code>"type\":\"mapper_parsing_exception\",
  \"reason\":\"Mapping definition for [column2] has unsupported parameters:  [null_value : ---]\"
  </code></pre>
  
  <p><code>column2</code>'s DDL: </p>
  
  <pre><code>`column2` char(3) COLLATE utf8_unicode_ci NOT NULL DEFAULT '---'
  </code></pre>
  
  <p>The call stack of the error:</p>
  
  <pre><code> at io.confluent.connect.elasticsearch.jest.JestElasticsearchClient.createMapping(JestElasticsearchClient.java:253)
          at io.confluent.connect.elasticsearch.Mapping.createMapping(Mapping.java:65)
          at io.confluent.connect.elasticsearch.ElasticsearchWriter.write(ElasticsearchWriter.java:257)
          at io.confluent.connect.elasticsearch.ElasticsearchSinkTask.put(ElasticsearchSinkTask.java:161)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:565)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:323)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:226)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:194)
          at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:175)
          at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:219)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
  [2019-02-22 15:48:40,217] ERROR WorkerSinkTask{id=stage_refdata_company_essink-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.W
  orkerTask:177)
  org.apache.kafka.connect.errors.ConnectException: Exiting WorkerSinkTask due to unrecoverable exception.
          at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:587)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:323)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:226)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:194)
          at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:175)
          at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:219)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
  Caused by: org.apache.kafka.connect.errors.ConnectException: Cannot create mapping 
  &lt;mapping of table explanation&gt;
   at io.confluent.connect.elasticsearch.jest.JestElasticsearchClient.createMapping(JestElasticsearchClient.java:253)
          at io.confluent.connect.elasticsearch.Mapping.createMapping(Mapping.java:65)
          at io.confluent.connect.elasticsearch.ElasticsearchWriter.write(ElasticsearchWriter.java:257)
          at io.confluent.connect.elasticsearch.ElasticsearchSinkTask.put(ElasticsearchSinkTask.java:161)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:565)
          ... 10 more
  </code></pre>
  
  <p>Data is present in table with the default value of <code>'---'</code>.</p>
  
  <ol>
  <li>Why does ES throw an error at these 2 values? </li>
  <li><code>column2</code> has clearly specified <code>char(3)</code> as its type hence, <code>'---'</code> should be an accepted value. </li>
  </ol>
  
  <p>Can you please help to resolve these errors?</p>
  
  <p>How to avoid these errors in the future for some other custom default values?</p>