I wonder if someone could clarify the relationship between PDI's MongoDB Input Step and JSONPath. There are a couple forum posts that refer to this reference but I'm not sure why simple looking queries aren't working.
For example, I need to transform some user documents stored in a mongo collection, using a document structure like:
Code:
{
"_id" : ObjectId("5d7a5034041ba5fe61010003"),
"classID" : "14",
"userID": "10",
"otherField": "other data..."
}
If I query for a specific user id, I have no trouble:
Code:
{ "$query" : { "userID" : "10" } }
However if I try to use a wildcard, I get no rows. I would expect the following JSONPath queries to return a row (containing one string field) for each user document in the collection but instead they fail:
Code:
{ "$query" : "$..*" }
Code:
{ "$query" : { "userID" : "*" } }
The wiki has some information on basic operations but precious little on the query syntax. Any suggestions, pointers or clarifications would be greatly appreciated.