Transforms to create a new column in snowflake


I am trying to create a sink snowflake connector and my aim is to create a new column in snowflake which will have the topic metadata timestamp field in format. I have two topic. One is having schema and another is schema-less. The content of the topic is json. In snowflake I am only getting two column “RECORD_CONTENT” and “RECORD_METADATA”.

The topic having schema even though I was able to extract the metadata timestimp field using below transform command . The result is appearing in snowflake table “RECORD_CONTENT” section and in epoch format only .

  "transforms": "InsertField",
  "transforms.InsertField.type": "org.apache.kafka.connect.transforms.InsertField$Value",
  "transforms.InsertField.timestamp.field": "CaptureTime",

In the schema less topic the above configuration doesn’t work at all and it failed with below error.

Only Struct objects supported for [field insertion], found: com.snowflake.kafka.connector.records.SnowflakeRecordContent

Please help me how to fix this issue.