FasterXML / FasterXML/jackson-dataformats-text

CSV: Support for Map and Nested fields

Ouverte
#211 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
csv to-evaluate
Langage dominant
Java
Étoiles
455
Forks
164
Merge moyen
6 j 10 h
PR mergées (30 j)
2

Description

Use Case: reading/writing 'complex' CSV files interoperable with Athena / Presto / Hive

Example: a 'serde' for CSV from Hive (or athena or presto ) can support the following attributes

```
row format delimited
fields terminated by ','
collection items terminated by '|'
map keys terminated by '#'

```
In addition to the above is a built in (not customizable) support for nested collections which are deliminated by 'level' with a different delimiter per level -- enabling representing [ 1 , [2,3, { "a": [ 4 ] ]

Currently the array element separator provides part of this
A useful addition would a 'map' seperator that would work like the arrays but create json Objects.

example:
```
FIELDS=,
ARRAY=|
MAP=#

1,2|3|4,key#value|key2#value2|key3#value3,four

could map to the java class

class Complex {
int col1;
int col2[];
innerclass col3 ;
String col4;
}

class innerclass {
String key ;
String key2;
String key3;
}

```

Nested requires 'levels' of both array and map separators.

Hive Reference
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTableCreate/Drop/TruncateTable

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.