BookmarkSubscribeRSS Feed
harihyd2021
Calcite | Level 5

Hi All,

 

I am fetch the data using Rest API using SAS Studio. Data is  coming but it is storing in one column Table under RESPOSE JSON COLUMN NAME  . So, how fetch the data from that column.

1 REPLY 1
sbxkoenk
SAS Super FREQ

Hello,

 

I think this paper will help you out :

Paper 856-2017
Parsing JSON with SAS® in 2017
John Kennedy, Mesa Digital
https://support.sas.com/resources/papers/proceedings17/0856-2017.pdf

 

How to make JSON response file available within SAS (numeric and string data in a SAS data set)? :

 

USING THE JSON LIBNAME

The JSON libname is the newest, sexiest, and easiest way to import JSON data into SAS. It handles the parsing of the data, can account for a variable data structure, and can be combined with other procedures to increase its functionality.

 

filename response temp;

proc http  

  url="http://data.ny.gov/api/views/kwxv-fwze/rows.json?accessType=DOWNLOAD"

  method= "GET"

  out=response;

run;

libname lotto JSON fileref=response;

proc print data=lotto.data;

run;

 

Koen

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 241 views
  • 0 likes
  • 2 in conversation