Description
Currently it is not possible to generate a key from json path, only first level properties.
The following example do not work:
i.e.
document |
\{
|
|
“sub”: \{
|
|
“id”:1234
|
|
}
|
|
}
|
/opt/couchbase/bin/cbimport json -c cluster -u Administrator -p password -b bucket -f lines -d file:///home/user/test.json -g %sub.id%
|
We need to support it so it would support more use cases.
I’m getting an error:
2018-03-19T11:12:47.924+02:00 ERRO: Key generation for document failed, field with sub.id does not exist in document -- jsondata.(*Parallelizer).Execute.func1() at source.go:187
|
It is working if the key is flat on the first level.
Attachments
Issue Links
For Gerrit Dashboard: MB-29092 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
100624,4 | MB-29092 Support key generators with nested field | master | backup | Status: MERGED | +2 | +1 |
100956,5 | MB-27676 Add ignore-field flag to cbimport | master | backup | Status: MERGED | +2 | +1 |
101182,3 | MB-31795 Add unit test for keygen field reference | master | backup | Status: MERGED | +2 | +1 |