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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1417 views
  • 0 likes
  • 2 in conversation