Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Unable to extract JSON fields using Json Path Expression Filter

Hi

 

I am trying to extract a JSON filed using the 'tExtractJSONFields' component.

 

The payload is looks like this

 

{"Records":[{"eventVersion":"2.0","eventSource":"aws:s3","awsRegion":"eu-west-2","eventTime":"2018-04-09T16:51:33.560Z","eventName":"ObjectCreated:Put","userIdentity":{"principalId":"AWS:AIDAJFTPVIK4V4O4UL3AA"},"requestParameters":{"sourceIPAddress":"81.109.43.51"},"responseElements":{"x-amz-request-id":"3F0D7CB9A0E65E00","x-amz-id-2":"bWCsY6hXSeMme6FPNmqfpNV0q7KO8byKzDFl9Yw6n2drLZcfHDNzVzMGgDrkLLL39bBhFmzu6KY="},"s3":{"s3SchemaVersion":"1.0","configurationId":"pmassieh_s3_file_creation_event","bucket":{"name":"pmassieh.talend.s3.bucket","ownerIdentity":{"principalId":"A1LVUWQKJN95HE"},"arn":"arn:aws:s3:::pmassieh.talend.s3.bucket"},"object":{"key":"walkData10.JSON","size":933,"eTag":"a9f8710f6e89c50d3f981e5421e3ef8b","sequencer":"005ACB9A1587159A23"}}}]}

I am trying to extract using this expression :

 

"$.Records[*].s3.object.key"

0683p000009LtVe.png

 

When I run this the resulting output is NULL, so it appears that the Json Query fails to find the data. when I remove the expression, then the whole payload comes through intact without any issue.

 

I tried testing the filter expression against the pyalod using this (http://www.jsonquerytool.com/#/JSONPath) online tool and when I copy the JSON payload and the filter expression, then I get the desired result, however the talend component fails.

 

Any ideas ?

 

Appreciate your help

 

Thanks

 

Patrice

 

 

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

What fields are you trying to extract?  Try the following for s3.object.key

 0683p000009LtcU.pngd

 

You have "Region" duplicated, you'll need to remove that from the Loop JSONPath Query.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

What fields are you trying to extract?  Try the following for s3.object.key

 0683p000009LtcU.pngd

 

You have "Region" duplicated, you'll need to remove that from the Loop JSONPath Query.

Anonymous
Not applicable
Author

Thanks. That worked. Appreciate your help.