title: How to transform all timestamp fields when using Kafka Connect?
body: <p>I am trying to convert all timestamp fields to a string type with the format <code>yyyy-MM-dd HH:mm:ss</code>.</p>
  
  <p>To transform multiple fields, I have to create a transform for each one individually.</p>
  
  <pre><code>...
  "transforms":"tsFormat1,tsFormat2,...,tsFormatN",
  "transforms.tsFormat1.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value",
  "transforms.tsFormat1.target.type": "string",
  "transforms.tsFormat1.field": "ts_col1",
  "transforms.tsFormat1.format": "yyyy-MM-dd HH:mm:ss",
  "transforms.tsFormat2.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value",
  "transforms.tsFormat2.target.type": "string",
  "transforms.tsFormat2.field": "ts_col2",
  "transforms.tsFormat2.format": "yyyy-MM-dd HH:mm:ss",
  ...
  "transforms.tsFormatN.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value",
  "transforms.tsFormatN.target.type": "string",
  "transforms.tsFormatN.field": "ts_colN",
  "transforms.tsFormatN.format": "yyyy-MM-dd HH:mm:ss",
  ...
  </code></pre>
  
  <p>&nbsp;</p>
  
  <p>Is there any way to apply a single transform on all timestamp columns?</p>
  
  <p>I have tried,</p>
  
  <pre><code>...
  "transforms":"tsFormat",
  "transforms.tsFormat.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value",
  "transforms.tsFormat.target.type": "string",
  "transforms.tsFormat.field": "ts_col1, ts_col2,..., ts_colN",
  "transforms.tsFormat.format": "yyyy-MM-dd HH:mm:ss",
  ...
  </code></pre>
  
  <p>and</p>
  
  <pre><code>...
  "transforms":"tsFormat",
  "transforms.tsFormat.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value",
  "transforms.tsFormat.target.type": "string",
  "transforms.tsFormat.field": "ts_col1",
  "transforms.tsFormat.field": "ts_col2",
  ...
  "transforms.tsFormat.field": "ts_colN",
  "transforms.tsFormat.format": "yyyy-MM-dd HH:mm:ss",
  ...
  </code></pre>
  
  <p>&nbsp;</p>
  
  <hr>
  
  <p>What would be even better is something like numeric type matching <code>"numeric.mapping": "best_fit"</code>. Just like how <code>numeric.mapping</code> applies to all numeric fields (without having to manually specify the field names) to try and find the best numeric type, is there something like this that can apply a transform or string format for all timestamp fields?</p>