Website | Source | Docs


Process Github API as a table to get the information of Byzer Org

-- Get Github Organization Info

-- set API URL and params
SET org_name="byzer-org";

-- Load Github Organization API as table
 where `config.connect-timeout`="10s"
 and `config.method`="GET"
 and `header.accept`="application/vnd.github.v3+json"
as github_org;

-- decode API response from binary to a json string
select string(content) as content from github_org as response_content;

-- expand the json string 
run response_content as JsonExpandExt.`` where inputCol="content" and structColumn="true" as github_org;

-- retrieve user infomation and process as a table
select content.* from github_org as org_info;

-- save the table to delta lake
save overwrite org_info as delta.`github_info_db.byzer_org`;

Tags: language   low-code   storage  

Last modified 05 February 2024