UUID

This page describes the UUID function in Lenses SQL.

UUID(expr)

Returns a universally unique identifier.

Available in:

Processors
SQL Studio

Sample code:

USE `kafka`;
SELECT 
    UUID(),
    * 
FROM sea-vessel-position-reports
LIMIT 1;

Output:

{
  "key": {
    "MMSI": 257641900
  },
  "value": {
    "UUID": "1acbe81e-1af2-4c1f-a1b6-b5bd244378ab",
    "Type": 1,
    "Repeat": 0,
    "MMSI": 257641900,
    "Speed": 0,
    "Accuracy": true,
    "Longitude": "11.701588333333333",
    "Latitude": 58.007945,
    "location": "58.007945,11.701588",
    "Course": 0,
    "Heading": 174,
    "Second": 34,
    "RAIM": true,
    "Radio": 34075,
    "Status": 3,
    "Turn": 0,
    "Maneuver": 0,
    "Timestamp": "1503158676433679390"
  }
}

Last updated

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.