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
{{ message }}
This repository was archived by the owner on Dec 22, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,6 +211,9 @@ You can anonymise specific columns in your table using the `Anonymise` key. Anon
211
211
[Tables.Anonymise]
212
212
email = "EmailAddress"
213
213
firstName = "FirstName"
214
+
postalCode = "DigitsN:5"
215
+
creditCard = "CreditCardNum"
216
+
voucher = "Password:3:5:true"
214
217
215
218
[[Tables]]
216
219
Name = "users"
@@ -219,7 +222,7 @@ You can anonymise specific columns in your table using the `Anonymise` key. Anon
219
222
password = "literal:1234"
220
223
```
221
224
222
-
This would replace these 4 columns from the `customer` and `users` tables and run `fake.EmailAddress` and `fake.FirstName` against them respectively. We can use`literal:[some-constant-value]` to specify a constant we want to write for a column. In this case, `password = "literal:1234"` would write `1234` for every row in the password column of the users table.
225
+
This would replace all the specified columns from the `customer` and `users` tables with the spcified fake function. If a function requires arguments to be passed, we can specify them splitting with the `:` character, the default value of a argument type will be used in case the provided one is invalid or missing. There is also a special function`literal:[some-constant-value]` to specify a constant we want to write for a column. In this case, `password = "literal:1234"` would write `1234` for every row in the password column of the users table.
0 commit comments