Specify writetime timestamp column
In the Apache Pulsar™ topic mapping, you can optionally specify which column should be used to note the timestamp when the Pulsar-produced record was inserted into any of the supported databases.
The mapping setting provides a special property,
The format is:
topic: my_topic: my_ks: my_table: mapping: 'col1=key.f1, col2=value.f1, __timestamp=value.f2'
By default, the database internally tracks the
writetime timestamp of records inserted from Pulsar.
__timestamp feature in the mapping supports the scenario where the Pulsar records have an explicit timestamp field that you want to use as a writetime for the database record produced by the connector.
|The column value that you use must be a number.|
When you map the
__timestamp value, you may also want to specify the
timeUnit of the provided timestamp.
The default is
For example, if your column used as the timestamp is in a different format (for example
SECONDS) set it to
The connector will automatically transform it to the database’s proper numeric timestamp format;
that is, to
topic: my_topic: my_ks: my_table: timestampTimeUnit: SECONDS