Skip to content

Commit b6c47fb

Browse files
committed
add docs for id-prefix
1 parent f6b925a commit b6c47fb

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/options.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,24 @@ import flatterer
766766
flatterer.flatten('inputfile.jl', 'ouput_dir', schema_titles='underscore_slug_')
767767
```
768768

769+
## ID Prefix
770+
771+
Add a string to the start of all `_link` ids. For example if this is set to `myprefix_` then all `_link` ids will be `myprefix_<id>` eg `myprefix_0`, `myprefix_1` etc.
772+
773+
### CLI Usage
774+
775+
```bash
776+
flatterer INPUT_FILE OUTPUT_DIRECTORY --id-prefix myprefix_
777+
```
778+
779+
### Python Usage
780+
781+
```python
782+
import flatterer
783+
784+
flatterer.flatten('inputfile.json', 'ouput_dir', id_prefix='myprefix_')
785+
```
786+
769787
## Stats
770788

771789
Adds additional statistics about the output files in the `datapackage.json` output.
@@ -834,7 +852,11 @@ Python only. Export scripts for importing data into the database.
834852

835853
### Python Usage
836854

855+
```python
856+
import flatterer
857+
837858
flatterer.flatten('inputfile.json', 'ouput_dir', sql_scripts=True)
859+
```
838860

839861

840862
## Low Memory (api only)

0 commit comments

Comments
 (0)