Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Filter json output in azure synapse-pipeline?

I’m creating a Pipeline in Azure Synapse Analytics using the synapse pipeline to get the content of a Rest-API call. Before the call I have to get the bearer token. While using the web activity to get the bearer token for an Rest-API Call, I get the bearer token in a format like {"access_token":"Sample-Bearer-Token","token_type":"bearer","expires_in":999999}.

I would like to only get the content from "access_token", in order to pass it for the REST-API Call. It seems like I can get the whole output of the web activity with @activity('Web1').output but how can I filter the json output in a synapse-pipeline to only get the bearer token?

Best regards and thanks!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can reference key name value pairs in json using the dot syntax, so something like this should work for you:

@activity('Web1').output.access_token

You could assign this to a variable using the Set Variable activity for testing or just use it directly in the next activity.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading