Using user-provided timestamps

When the records do not contain a timestamp in a suitable format, compute a timestamp column from a field in the data, and use it as the event time of the table.

For example, if the records contain the order time as a string in the order_time_string field, convert the string to a timestamp in a computed column, and define the watermark on that column.

Create the table with a computed timestamp column and a watermark on that column:
CREATE TABLE orders (
  order_id STRING,
  price DECIMAL(32,2),
  currency STRING,
  order_time_string STRING,
  order_time AS TO_TIMESTAMP(order_time_string),
  WATERMARK FOR order_time AS order_time
) WITH (/* ... */);

You can use any Flink SQL expression that returns a TIMESTAMP(3) or TIMESTAMP_LTZ(3) value, for example TO_TIMESTAMP_LTZ(epoch_millis, 3) for a field that contains epoch milliseconds. For the functions, see Built-in functions in the Apache Flink documentation.