flatten transformation should create index field
See original GitHub issueFrom the flatten
example:
Input data:
[ {"name": "alpha", "data": 123, "foo": [1, 2]}, {"name": "beta", "data": 456, "foo": [3, 4, 5]} ]
Result:
[ {"name": "alpha", "data": 123, "foo": 1}, {"name": "alpha", "data": 123, "foo": 2}, {"name": "beta", "data": 456, "foo": 3}, {"name": "beta", "data": 456, "foo": 4}, {"name": "beta", "data": 456, "foo": 5} ]
It would be infinitely more helpful if the result were:
[
{"name": "alpha", "data": 123, "foo": 1, "index": 0},
{"name": "alpha", "data": 123, "foo": 2, "index": 1},
{"name": "beta", "data": 456, "foo": 3, "index": 0},
{"name": "beta", "data": 456, "foo": 4, "index": 1},
{"name": "beta", "data": 456, "foo": 5, "index": 2}
]
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Flattened field type | Elasticsearch Guide [8.5] | Elastic
This data type can be useful for indexing objects with a large or unknown number of unique keys. Only one field mapping is...
Read more >Flattening array column and creating Index ... - Stack Overflow
You can use flatten transformation to flatten the array values and Window transformation to get the RowNumber, partition by Col1.
Read more >Flatten Transform - Trifacta Documentation
Unpacks array data into separate rows for each value. This transform operates on a single column.
Read more >Flatten - Confluent Documentation
Flatten a nested data structure, generating names for each field by concatenating the field names at each level with a configurable delimiter character....
Read more >Flattening Fields - Informatica Documentation
Flatten fields of a complex data type to modify hierarchical data or to convert to relational data.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Added in 0cc590a.
I think what you did with only string makes sense. Can you add a few tests and update the docs?
@jheer will review and merge.