You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -952,6 +952,39 @@ transformations:
952
952
953
953
</details>
954
954
955
+
#### Other Transformers
956
+
<details>
957
+
<summary>literal_string</summary>
958
+
959
+
**Description:** Transforms all values into the given constant value.
960
+
961
+
| Supported PostgreSQL types |
962
+
| -------------------------------------- |
963
+
| All types with a string representation |
964
+
965
+
| Parameter | Type | Default | Required |
966
+
| --------------- | ------ | ------- | -------- |
967
+
| literal | string | N/A | Yes |
968
+
969
+
Below example makes all values in the JSON column `log_message` to become `{'error': null}`.
970
+
This transformer can be used for any Postgres type as long as the given string literal has the correct syntax for that type. e.g It can be "5-10-2021" for a date column, or "3.14159265" for a double precision one.
971
+
972
+
**Example Configuration:**
973
+
974
+
```yaml
975
+
transformations:
976
+
table_transformers:
977
+
- schema: public
978
+
table: logs
979
+
column_transformers:
980
+
log_message:
981
+
name: literal_string
982
+
parameters:
983
+
literal: "{'error': null}"
984
+
```
985
+
986
+
</details>
987
+
955
988
### Transformation rules
956
989
957
990
The rules for the transformers are defined in a dedicated yaml file, with the following format:
0 commit comments