Hi all,

I'm using a JOLT transformation at the very end of my flow to filter out some 
attributes that I don't want to send to ElasticSearch for Indexing. So far, it 
is working great but I'd like to include the value of an attribute (docId) into 
the transformation as well.

My JOLT specs are:
[{
                "operation": "shift",
                "spec": {
                                "companyId": "&",
                                "companyName": "&",
                                "s3Key": "&",
                                "runId": "&",
                                "urls": "&",
                                "urlId": "&",
                                "urlLevel": "&",
                                "urlAddress": "&",
                             "docId": "${docId}"
                }
}]

When I run my flow through this processor, the result is (check the last field):

{
  "companyId" : 1,
  "companyName" : "some company",
  "s3Key" : "1.9fe1cf4d384cd0a4cec3d97f54ae5a8d.json",
  "runId" : 1,
  "urls" : [ {
    "url" : "http://www.somecompany.com";,
    "id" : 0,
    "filter_status" : "ok"
  }, {
    "url" : "http://www. somecompany.com/contact",
    "id" : 0,
    "filter_status" : "ok"
  }, {
    "url" : "http://www. somecompany.com/#nav",
    "id" : 0,
    "filter_status" : "ok"
  }, {
    "url" : "http://www. somecompany.com#top",
    "id" : 0,
    "filter_status" : "ok"
  } ],
  "urlId" : 1,
  "urlLevel" : 0,
  "urlAddress" : "http://www. somecompany.com",
  "1001" : "1001"
}

I was expecting the last field to read like "docId": "1001"...
Now, I'm pretty sure this is obvious to someone experienced with JOLT but I 
googled a bit and could not find good documentation about JOLT's syntax.

Thanks
--
Jean-Sébastien Vachon

[email protected]<mailto:[email protected]>
[email protected]<mailto:[email protected]>
www.brizodata.com<http://www.brizodata.com/>

Reply via email to