-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
167c5a8
commit 0bbacdf
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
title: Last Name | ||
id: last-name | ||
hide_title: true | ||
slug: /transformers/system/last-name | ||
--- | ||
|
||
import { TransformerPageHeader } from '@site/src/CustomComponents/TransformerPageHeader.tsx'; | ||
|
||
import { DocsTable } from '@site/src/CustomComponents/DocsTable.tsx'; | ||
|
||
<TransformerPageHeader | ||
title="Last Name" | ||
type="string" | ||
apiRef="https://github.com/nucleuscloud/neosync/blob/main/worker/internal/benthos/transformers/lastname.go" | ||
/> | ||
|
||
## Definition | ||
|
||
The last name transformer generates a valid last name from a list of predefined last name values. You can see the entire list of last name value [here.](https://github.com/nucleuscloud/neosync/blob/main/worker/internal/benthos/transformers/data-sets/last-names.json). | ||
|
||
By default, the last name transformer generates a last name of random length. To preserve the length of the input last name, you can set the `preserveLength` config. | ||
|
||
## Configurations | ||
|
||
Depending on your validations, you may want to configure the output last name. The last name transformer has the following configurations: | ||
|
||
<DocsTable | ||
headers={[ | ||
'Name', | ||
'Description', | ||
'Default', | ||
'Example Input', | ||
'Example Output', | ||
]} | ||
rowData={[ | ||
{ | ||
data: [ | ||
'PreserveLength', | ||
'Preserve Length will ensure that the output last name is the same length as the input last name. The preserveLength config only preserves names up to 12 characters long.', | ||
'false', | ||
'Hills', | ||
'Kunze', | ||
], | ||
}, | ||
]} | ||
/> | ||
|
||
## Examples | ||
|
||
There are several ways you can mix-and-match configurations to get different last name formats. Here are some possible combinations: | ||
|
||
<DocsTable | ||
headers={['PreserveLength', 'Example Input', 'Example Output']} | ||
rowData={[ | ||
{ | ||
data: ['false', 'Lei', 'Dach'], | ||
}, | ||
{ | ||
data: ['true', 'Littel', 'Sporer'], | ||
}, | ||
{ | ||
data: ['false', 'Johnsonston', 'Rodriguezon'], | ||
}, | ||
]} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters