BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cmoore
Obsidian | Level 7

Hi,

 

I have a series of API's that I want to automatically pull into SAS on a daily/weekly basis. The data is in Json format. Please can somebody offer advice on how I would go about doing this from a coding perspective? I've never needed to do this before and hence I'm not quite sure the steps involved. I am using SAS 9.4.

 

Many thanks

Chris

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisBrooks
Ammonite | Level 13

That's a very big question but as a start you could check out Proc HTTP to issue HTTP requests to bring the data into SAS then use the JSON libname engine to convert the JSON into SAS data sets. You'll find some documentation to get you started at these links:

 

Reading data with PROC HTTP and the JSON libname engine

How to test PROC HTTP and the JSON engine

 

PROC HTTP documentation

The JSON LIBNAME Engine: Real-World Applications Using Open APIs

 

My advice would be to give this a try and post more specific questions if/when you hit a problem.

View solution in original post

1 REPLY 1
ChrisBrooks
Ammonite | Level 13

That's a very big question but as a start you could check out Proc HTTP to issue HTTP requests to bring the data into SAS then use the JSON libname engine to convert the JSON into SAS data sets. You'll find some documentation to get you started at these links:

 

Reading data with PROC HTTP and the JSON libname engine

How to test PROC HTTP and the JSON engine

 

PROC HTTP documentation

The JSON LIBNAME Engine: Real-World Applications Using Open APIs

 

My advice would be to give this a try and post more specific questions if/when you hit a problem.

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 connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

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