From 5f19d9eb6cc19747f9327f1a4ae7425cf177d7d6 Mon Sep 17 00:00:00 2001 From: Ilian Iliev Date: Wed, 21 May 2025 09:52:27 +0300 Subject: [PATCH 01/14] Static and dynamic key expiration examples --- .../redis-expiration-example.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md new file mode 100644 index 000000000..4da956fb4 --- /dev/null +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -0,0 +1,102 @@ +--- +Title: Set custom expiration times / TTL +alwaysopen: false +categories: +- docs +- integrate +- rs +- rdi +description: null +group: di +linkTitle: Set expiration times / TTL +summary: How to set expiration times / TTL to keys +type: integration +weight: 40 +--- + + +You can configure custom key expiration times (TTL) for keys written to Redis by using the `expire` parameter in the `output` section of the job file. This parameter specifies the duration, in seconds, that a newly created key will remain in Redis before being automatically deleted. If the `expire` parameter is not provided, the keys will persist indefinitely. + +There are two ways to set the expiration time: + +- as a static value +- as a dynamic value using a JMESPath or SQL expression + + +## Static expiration time + +The following example sets the expiration time to 100 seconds for all keys: + +```yaml +output: + - uses: redis.write + with: + data_type: hash + expire: 100 +``` + +## Dynamic expiration time + +Settings the expiration time dynamically using a JMESPath or SQL expression is useful when the expiration time is based on a field in the source data. For example, you can set the expiration time to the value of a `ttl` field in the source data: + +```yaml +output: + - uses: redis.write + with: + data_type: hash + expire: + expression: ttl + language: jmespath +``` + +Settings the expiration according to a field that contains a date, datetime, or timestamp value is also possible, but it depends on the source database and the data types it supports. + + +### Oracle examples +The transformation depends on the data type of the field in the source database: + +- `DATE` - represented by debezium as 64-bit integer representing the milliseconds since epoch + ```yaml + output: + - uses: redis.write + with: + data_type: hash + expire: + # To set the expiration time to a date field, convert the value to seconds and subtract the current time in seconds since epoch + expression: EXPIRES_DATE / 1000 - STRFTIME('%s', 'now') + language: sql + ``` +- `TIMESTAMP` - the value is represented by debezium as 64-bit integer and depends on the fractional second precision of the column. For example, if the column is defined as `TIMESTAMP(6)`, the value is represented as microseconds since epoch. + ```yaml + output: + - uses: redis.write + with: + data_type: hash + expire: + # To set the expiration time to a date field, convert the value to seconds (divider differs based on the fractional second precision) and subtract the current time in seconds since epoch. Example below is for 6 digits of precision. + expression: EXPIRES_TIMESTAMP / 1000000 - STRFTIME('%s', 'now') + language: sql + ``` +- `TIMESTAMP WITH TIME ZONE` - the value is represented as string representation of the timestamp with time zone information. +- `TIMESTAMP WITH LOCAL TIME ZONE` - the value is represented as string representation of the timestamp with local time zone information. + + For both `TIMESTAMP WITH TIME ZONE` and `TIMESTAMP WITH LOCAL TIME ZONE`, a two-step approach is needed. First, calculate the difference between the given time and now in seconds and then invert the value. + ```yaml + transform: + - uses: add_field + with: + fields: + - field: expire_seconds + language: jmespath + expression: time_delta_seconds(EXPIRES_TS_TZ) + output: + - uses: redis.write + with: + data_type: hash + expire: + # `time_delta_seconds` Returns the number of seconds between a given dt and now. + # A negative value means that the given dt is in the future, so we need to invert it. + # A positive value means that the given dt is in the past, so we set the expiration to -1 (expire immediately). + expression: CASE WHEN expire_seconds < 0 THEN -expire_seconds ELSE -1 END + language: sql + ``` From f58e252c11e87fe32f3ce38018a01e8cfe51abd7 Mon Sep 17 00:00:00 2001 From: Ilian Iliev Date: Tue, 27 May 2025 16:08:22 +0300 Subject: [PATCH 02/14] Adding examples for SQL Server --- .../redis-expiration-example.md | 65 ++++++++++++++++++- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index 4da956fb4..eeeae935a 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -49,10 +49,12 @@ output: language: jmespath ``` -Settings the expiration according to a field that contains a date, datetime, or timestamp value is also possible, but it depends on the source database and the data types it supports. +## Dynamic expiration time based on a date, datetime, or timestamp field +Settings the expiration according to a field that contains a date, datetime, or timestamp value is also possible, but it depends on the source database and the data types it supports. Please refer to the examples below for your specific source database and data type. + +{{< expand "Oracle examples" >}} -### Oracle examples The transformation depends on the data type of the field in the source database: - `DATE` - represented by debezium as 64-bit integer representing the milliseconds since epoch @@ -100,3 +102,62 @@ The transformation depends on the data type of the field in the source database: expression: CASE WHEN expire_seconds < 0 THEN -expire_seconds ELSE -1 END language: sql ``` +{{< /expand >}} + + +{{< expand "SQL Server examples" >}} +SQL Server supports the following date and time data types: + +- `date` - represented in Debezium as number of days since epoch (1970-01-01). Please note that due to the lack of time information, this method is not very accurate. + ```yaml + output: + - uses: redis.write + with: + data_type: hash + expire: + # We calculate the number of seconds for the amount of days and subtract the current time in seconds since epoch. + expression: (event_date * 86400) - strftime('%s', 'now') + language: sql + ``` + +- `datetime`, `smalldatetime` - represented in Debezium as number of milliseconds since epoch. + ```yaml + output: + - uses: redis.write + with: + data_type: hash + expire: + # Due to event_datetime being in milisecond we need to divide it by 1000 to convert it to seconds. + expression: event_datetime / 1000 - strftime('%s', 'now') + language: sql + ``` +- `datetime2` - similar to `datetime` but with higher precision. For `datetime2(0-3)` the representation is the same as for `datetime`. For `datetime2(4-6)` it is the number of microseconds since epoch. and for `datetime2(7)` it is the number of nanoseconds since epoch. You can use the same approach as for `datetime` but you need to divide by 1000, 1000000 or 1000000000 depending on the precision. + +- `time` - the time of milliseconds since midnight. + ```yaml + output: + - uses: redis.write + with: + data_type: hash + expire: + # We convert the time to seconds and subtract the current time in seconds since midnight. + expression: (event_time / 1000.0) - + ( + CAST(strftime('%H', 'now') AS INTEGER) * 3600 + + CAST(strftime('%M', 'now') AS INTEGER) * 60 + + CAST(strftime('%S', 'now') AS INTEGER) + ) + language: sql + ``` +- `datetimeoffset` - represented as a timestamp with timezone information, where the timezone is GMT + ```yaml + output: + - uses: redis.write + with: + data_type: hash + expire: + # We convert the time to seconds and subtract the current time in seconds since epoch. + expression: strftime('%s', event_datetimeoffset) - strftime('%s', 'now') + language: sql + ``` +{{< /expand >}} From 672db691bddd7d0c8d8cf86f9facf87f1c7876a6 Mon Sep 17 00:00:00 2001 From: Ilian Iliev Date: Wed, 28 May 2025 09:20:41 +0300 Subject: [PATCH 03/14] Changing layout to use right-side navigation Adding TODO for adding examples for other databases --- .../transform-examples/redis-expiration-example.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index eeeae935a..098fe75b2 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -53,7 +53,7 @@ output: Settings the expiration according to a field that contains a date, datetime, or timestamp value is also possible, but it depends on the source database and the data types it supports. Please refer to the examples below for your specific source database and data type. -{{< expand "Oracle examples" >}} +### Oracle examples The transformation depends on the data type of the field in the source database: @@ -102,10 +102,10 @@ The transformation depends on the data type of the field in the source database: expression: CASE WHEN expire_seconds < 0 THEN -expire_seconds ELSE -1 END language: sql ``` -{{< /expand >}} +---- -{{< expand "SQL Server examples" >}} +### SQL Server examples SQL Server supports the following date and time data types: - `date` - represented in Debezium as number of days since epoch (1970-01-01). Please note that due to the lack of time information, this method is not very accurate. @@ -160,4 +160,5 @@ SQL Server supports the following date and time data types: expression: strftime('%s', event_datetimeoffset) - strftime('%s', 'now') language: sql ``` -{{< /expand >}} + + From dff55055287b05f2245bdbde8afac3e18c21b292 Mon Sep 17 00:00:00 2001 From: ilianiliev-redis Date: Thu, 29 May 2025 13:12:41 +0300 Subject: [PATCH 04/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index 098fe75b2..0ff66c9f7 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -9,7 +9,7 @@ categories: description: null group: di linkTitle: Set expiration times / TTL -summary: How to set expiration times / TTL to keys +summary: How to set expiration times / TTL for keys type: integration weight: 40 --- From 5e573d0c6038440880d6ded0c0c515f099826529 Mon Sep 17 00:00:00 2001 From: ilianiliev-redis Date: Thu, 29 May 2025 13:13:07 +0300 Subject: [PATCH 05/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index 0ff66c9f7..ca84419d8 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -37,7 +37,7 @@ output: ## Dynamic expiration time -Settings the expiration time dynamically using a JMESPath or SQL expression is useful when the expiration time is based on a field in the source data. For example, you can set the expiration time to the value of a `ttl` field in the source data: +You can use a JMESPath or SQL expression to set the expiration time dynamically when it is based on a field in the source data. For example, you can set the expiration time to the value of a `ttl` field in the source data: ```yaml output: From 1a291118c867bd218ff24224e3e5d9e8b9f75500 Mon Sep 17 00:00:00 2001 From: ilianiliev-redis Date: Thu, 29 May 2025 13:14:37 +0300 Subject: [PATCH 06/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index ca84419d8..9fc3228ba 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -51,7 +51,7 @@ output: ## Dynamic expiration time based on a date, datetime, or timestamp field -Settings the expiration according to a field that contains a date, datetime, or timestamp value is also possible, but it depends on the source database and the data types it supports. Please refer to the examples below for your specific source database and data type. +In some cases, you can also set the expiration time based a field that contains a date, datetime, or timestamp value, but it depends on the source database and the data types it supports. See the examples below for your specific source database and data type. ### Oracle examples From 48301194333e17f94942a137997b2da88cea31eb Mon Sep 17 00:00:00 2001 From: ilianiliev-redis Date: Thu, 29 May 2025 13:14:43 +0300 Subject: [PATCH 07/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index 9fc3228ba..7a92e1809 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -57,7 +57,7 @@ In some cases, you can also set the expiration time based a field that contains The transformation depends on the data type of the field in the source database: -- `DATE` - represented by debezium as 64-bit integer representing the milliseconds since epoch +- `DATE` - represented by debezium as a 64-bit integer representing the milliseconds since epoch ```yaml output: - uses: redis.write From 17fccd46a5cc4254aa6b8924d487e52e057ee4b6 Mon Sep 17 00:00:00 2001 From: ilianiliev-redis Date: Thu, 29 May 2025 13:20:09 +0300 Subject: [PATCH 08/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index 7a92e1809..b7284e0b6 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -68,7 +68,7 @@ The transformation depends on the data type of the field in the source database: expression: EXPIRES_DATE / 1000 - STRFTIME('%s', 'now') language: sql ``` -- `TIMESTAMP` - the value is represented by debezium as 64-bit integer and depends on the fractional second precision of the column. For example, if the column is defined as `TIMESTAMP(6)`, the value is represented as microseconds since epoch. +- `TIMESTAMP` - the value is represented by Debezium as a 64-bit integer and depends on the number of decimal places of precision of the column, representing fractions of a second. For example, if the column is defined as `TIMESTAMP(6)`, there are six decimal places and so the value is represented as microseconds since epoch (since there are 10^6 microseconds in each second). ```yaml output: - uses: redis.write From 1fbbaa9de7f0b4aaa56134e57d954a83ea2fb423 Mon Sep 17 00:00:00 2001 From: ilianiliev-redis Date: Thu, 29 May 2025 13:20:20 +0300 Subject: [PATCH 09/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index b7284e0b6..e42c7ae73 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -115,7 +115,7 @@ SQL Server supports the following date and time data types: with: data_type: hash expire: - # We calculate the number of seconds for the amount of days and subtract the current time in seconds since epoch. + # Calculate the number of seconds equivalent to the number of days and subtract the current time in seconds since epoch. expression: (event_date * 86400) - strftime('%s', 'now') language: sql ``` From 8d874326d4194b4cf105d2978e1f8d83403f9d8c Mon Sep 17 00:00:00 2001 From: ilianiliev-redis Date: Thu, 29 May 2025 13:20:40 +0300 Subject: [PATCH 10/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index e42c7ae73..6285f4474 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -98,7 +98,7 @@ The transformation depends on the data type of the field in the source database: expire: # `time_delta_seconds` Returns the number of seconds between a given dt and now. # A negative value means that the given dt is in the future, so we need to invert it. - # A positive value means that the given dt is in the past, so we set the expiration to -1 (expire immediately). + # A positive value means that the given dt is in the past, so set the expiration to -1 (expire immediately). expression: CASE WHEN expire_seconds < 0 THEN -expire_seconds ELSE -1 END language: sql ``` From 9e005ae6e0fda36084a9221bec15868dd0cd6f94 Mon Sep 17 00:00:00 2001 From: ilianiliev-redis Date: Thu, 29 May 2025 13:20:52 +0300 Subject: [PATCH 11/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index 6285f4474..7f14c79f6 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -127,7 +127,7 @@ SQL Server supports the following date and time data types: with: data_type: hash expire: - # Due to event_datetime being in milisecond we need to divide it by 1000 to convert it to seconds. + # Since event_datetime is in miliseconds, you must divide it by 1000 to convert it to seconds. expression: event_datetime / 1000 - strftime('%s', 'now') language: sql ``` From 476366f330eb3b7eb8078b63a615b087d9f7f23b Mon Sep 17 00:00:00 2001 From: ilianiliev-redis Date: Thu, 29 May 2025 13:21:03 +0300 Subject: [PATCH 12/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index 7f14c79f6..5d816e4d3 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -140,7 +140,7 @@ SQL Server supports the following date and time data types: with: data_type: hash expire: - # We convert the time to seconds and subtract the current time in seconds since midnight. + # Convert the time to seconds and subtract the current time in seconds since midnight. expression: (event_time / 1000.0) - ( CAST(strftime('%H', 'now') AS INTEGER) * 3600 + From c49233a6ecb1f6a146d42645d3796a531320881e Mon Sep 17 00:00:00 2001 From: ilianiliev-redis Date: Thu, 29 May 2025 13:21:11 +0300 Subject: [PATCH 13/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index 5d816e4d3..d80137986 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -156,7 +156,7 @@ SQL Server supports the following date and time data types: with: data_type: hash expire: - # We convert the time to seconds and subtract the current time in seconds since epoch. + # Convert the time to seconds and subtract the current time in seconds since epoch. expression: strftime('%s', event_datetimeoffset) - strftime('%s', 'now') language: sql ``` From 9e77905d093d4f7318e71928b656d1e7b7d4ecdc Mon Sep 17 00:00:00 2001 From: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> Date: Thu, 29 May 2025 11:25:18 +0100 Subject: [PATCH 14/14] Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md --- .../transform-examples/redis-expiration-example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md index d80137986..b63e19a00 100644 --- a/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md +++ b/content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-expiration-example.md @@ -51,7 +51,7 @@ output: ## Dynamic expiration time based on a date, datetime, or timestamp field -In some cases, you can also set the expiration time based a field that contains a date, datetime, or timestamp value, but it depends on the source database and the data types it supports. See the examples below for your specific source database and data type. +In some cases, you can also set the expiration time based on a field that contains a date, datetime, or timestamp value, but it depends on the source database and the data types it supports. See the examples below for your specific source database and data type. ### Oracle examples