BookmarkSubscribeRSS Feed
dcmacedo
Obsidian | Level 7

I'm testing "Proc Lua" to produce a simpler program, which performs multiple "RESTful" requests, based on a listing.

As a result, this generates much simpler code than if you had used Macro programming. As in the example below:

 

proc lua ;
submit;
  local dsid = sas.open("work.stg_organograma_sefaz")
  for row in sas.rows(dsid) do
    local guid = row.guid
	local sigla = row.sgl_sigla
	local resp_json = "'/SASDATA_PRD/usuarios/GETEC/SIC/apiOrganograma/unidade/resp_" .. sigla .. ".json'"
	local api_url = "'https://api.organograma.es.gov.br/unidades/" .. guid .. "'"
	sas.submit[[
filename resp @resp_json@; proc http url=@api_url@ method="GET" out=resp OAUTH_BEARER="&token_access"; run; filename resp clear; ]]
end sas.close(dsid) endsubmit; run;

I would like to explore this feature further, and the next step would be to use LUA modules to process URLs and JSON.

Therefore, I would like to know suggestions for the best LUA modules for this objective.

I am currently using the following paper as a reference:  PRE_AD06.pdf (lexjansen.com) 

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 0 replies
  • 378 views
  • 0 likes
  • 1 in conversation