You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/11/08 02:02:43 UTC
[GitHub] [incubator-druid] vogievetsky opened a new issue #8845: Sampler
swallows up `null`s in CSV
vogievetsky opened a new issue #8845: Sampler swallows up `null`s in CSV
URL: https://github.com/apache/incubator-druid/issues/8845
### Affected Version
0.16.0 and probably 0.15.0
### Description
When parsing a CSV in the sampler it totally ignores columns that should return as `null` or `""`
Request:
POST `/druid/indexer/v1/sampler`
Payload:
```json
{
"type": "index",
"spec": {
"type": "index",
"ioConfig": {
"type": "index",
"firehose": {
"type": "inline",
"data": "Make,Model,Color,Year\nHonda,,,2009\nVW,,,2010"
}
},
"dataSchema": {
"dataSource": "sample",
"parser": {
"type": "string",
"parseSpec": {
"format": "csv",
"timestampSpec": {
"column": "!!!_no_such_column_!!!",
"missingValue": "2010-01-01T00:00:00Z"
},
"dimensionsSpec": {},
"hasHeaderRow": true
}
}
}
},
"samplerConfig": {
"numRows": 500,
"timeoutMs": 15000,
"cacheKey": "4cadbef182774626b2f2e397ec28e5f8"
}
}
```
Result:
```json
{
"cacheKey": "4cadbef182774626b2f2e397ec28e5f8",
"numRowsRead": 2,
"numRowsIndexed": 2,
"data": [
{
"raw": "Honda,,,2009",
"parsed": {
"__time": 1262304000000,
"Year": "2009",
"Make": "Honda"
}
},
{
"raw": "VW,,,2010",
"parsed": {
"__time": 1262304000000,
"Year": "2010",
"Make": "VW"
}
}
]
}
```
Where are `Model` / `Color` ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org