@@ -20,67 +20,45 @@ Place the build JAR inside the `plugins` directory of your `metafacture-core` di
2020|===
2121|Command | In | Out
2222
23- |decode-literal-csv
24- |String
25- |StreamReceiver
26-
27- |encode-literal-csv
23+ |encode-csv
2824|StreamReceiver
2925|String
3026
3127|===
3228
33- === decode-literal -csv
29+ === encode -csv
3430
3531==== Description
3632
37- Reads a csv line and constructs a record with literals.
38- The record id represents the row number and the literal names represent the column numbers.
39- The literal value holds the column content.
40-
41- NOTE: The enumeration starts with 1.
42-
43- ==== Syntax
44-
45- ```
46- decode-literal-csv([separator])
47- ```
48-
49- ==== Parameters
33+ A simple encoder that constructs a table of __Comma-separated values__ (CSV).
5034
51- * `separator`: Delimiter symbol (Default: comma).
35+ Structure:
5236
53- ==== Example
54-
55- Flux:
56-
57- ```
58- > | decode-literal-csv | ...
59- ```
60-
61-
62- === encode-literal-csv
63-
64- ==== Description
37+ * Each record represents a row
38+ ** The sequential order of literal _values_ forms a *row*
39+ ** The sequential order of literal _names_ of the first record is used as _header_ (Optional)
40+ * Each value in a row is surrounded by quotation marks (Quote Character:__"__)
6541
66- Encodes each record as a csv line.
67- Each row contains all literal values that exist in a record.
42+ NOTE: If a sequence of literals (2 or more) share the same name,
43+ the values of those literals will be collected in the corresponding row.
44+ The column will contain a inner row (a nested csv row).
6845
6946==== Syntax
7047
7148```
72- encoder-literal- csv([separator],[includeRecordId])
49+ encode- csv([separator],[includeHeader ],[includeRecordId])
7350```
7451
7552==== Parameters
7653
7754* `separator`: Delimiter symbol (Default: comma)
78- * `includeRecordId`: Add the record id as first element of each line (Default: false).
55+ * `includeHeader`: Add a header with column names (Default: false).
56+ * `includeRecordId`: Add the record id as first element of each row (Default: false).
7957
8058==== Example
8159
8260Flux:
8361
8462```
85- ... | encoder-literal- csv(separator=",", includeRecordId="true") | print;
63+ ... | encoder-csv(separator=",", includeRecordId="true") | print;
8664```
0 commit comments