Skip to content

Commit f83a6e1

Browse files
Update content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-sql-case-example.md
Co-authored-by: andy-stark-redis <[email protected]>
1 parent 9f0ffc8 commit f83a6e1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-sql-case-example.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ transform:
4444
4545
You can also use the `CASE` statement to filter data based on specific conditions. The example below demonstrates how to filter the `Invoice` table to include only invoices from the USA and Canada that have a `Total` value above their country-specific threshold.
4646

47-
Due to the `Total` field being a Decimal in the source table, it represented as string in Debezium and needs to be cast to `REAL` type for comparison in the `CASE` statement.
48-
Not casting it will result in an incorrect comparison results and incorrect filtering.
47+
Because the `Total` field is a Decimal in the source table, it is represented as a string in Debezium and so you must cast it to `REAL` to compare it numerically in the `CASE` statement. Without this cast, it will be compared as a string value, which will give the wrong result.
4948

5049
```yaml
5150
source:

0 commit comments

Comments
 (0)