Data Management on SAS Viya
for developers

Getting started with Data Management (DM) on SAS Viya

Data Management on SAS Viya enables developers to:

  • Load, import and profile data using an integrated development environment (IDE) or REST APIs.
  • Cleanse, prepare, and transform your data.
  • Use functions to manage and provide governance for data assets and their relationships.

Sample code

The sample code below performs an HTTP GET request to get a table by passing its session identifier as the query parameter sessionId. To see further sample code, visit the samples page on GitHub.

Get Table Contents


# HTTP GET request to get a table passing their session identifier as the query parameter sessionId

GET /dataTables/dataSources/cas~fs~cas~fs~CASTestTmp/tables/AIRLINES?sessionId=d5272d22-ef57-4r61-lb80-4a98f1l4cc96

# Response application/vnd.sas.data.table+json

{
  "name": "AIRLINES",
  "providerId": "cas",
  "dataSourceId": "cas~fs~cas~fs~CASTestTmp",
  "creationTimeStamp": "2016-03-03T14:59:52.000Z",
  "modifiedTimeStamp": "2016-03-03T14:59:52.000Z",
  "createdBy": "etlguest",
  "modifiedBy": "etlguest",
  "type": "table",
  "attributes": {
    "loaded": true,
    "sourceTableName": null,
    "characterSet": "UTF8",
    "global": true,
    "caslibId": "CASTestTmp",
    "rowCount": 6048,
    "columnCount": 8,
    "sessionId": "feb250ff-15fc-ed44-913c-28c3f311c17b",
    "encoding": "utf-8",
    "serverId": "cas"
  },
  "version": 1,
  "links": \[
    {
      "method": "GET",
      "rel": "self",
      "href": "/dataTables/dataSources/cas~fs~cas~fs~CASTestTmp/tables/AIRLINES",
      "uri": "/dataTables/dataSources/cas~fs~cas~fs~CASTestTmp/tables/AIRLINES",
      "type": "application/vnd.sas.data.table"
    },
    {
      "method": "GET",
      "rel": "sessionScoped",
      "href": "/dataTables/dataSources/cas~fs~cas~fs~CASTestTmp/tables/AIRLINES?sessionId=d5272d22-ef57-4761-8b80-4998f114cc96",
      "uri": "/dataTables/dataSources/cas~fs~cas~fs~CASTestTmp/tables/AIRLINES?sessionId=d5272d22-ef57-4761-8b80-4998f114cc96",
      "type": "application/vnd.sas.data.table"
    },
    {
      "method": "GET",
      "rel": "session",
      "href": "/dataSources/providers/cas/sources/cas/sessions/d5272d22-ef57-4761-8b80-4998f114cc96",
      "uri": "/dataSources/providers/cas/sources/cas/sessions/d5272d22-ef57-4761-8b80-4998f114cc96",
      "type": "application/vnd.sas.data.session"
    },
    {
      "method": "GET",
      "rel": "up",
      "href": "/dataTables/dataSources/cas~fs~cas~fs~CASTestTmp/tables?sessionId=d5272d22-ef57-4761-8b80-4998f114cc96",
      "uri": "/dataTables/dataSources/cas~fs~cas~fs~CASTestTmp/tables?sessionId=d5272d22-ef57-4761-8b80-4998f114cc96",
      "type": "application/vnd.sas.collection",
      "itemType": "application/vnd.sas.data.table"
    },
    {
      "method": "GET",
      "rel": "dataSource",
      "href": "/dataSources/providers/cas/sources/cas~fs~CASTestTmp?sessionId=d5272d22-ef57-4761-8b80-4998f114cc96",
      "uri": "/dataSources/providers/cas/sources/cas~fs~CASTestTmp?sessionId=d5272d22-ef57-4761-8b80-4998f114cc96",
      "type": "application/vnd.sas.data.source"
    },
   {
      "method": "GET",
      "rel": "provider",
      "href": "/dataTables/providers/cas",
      "uri": "/dataTables/providers/cas",
      "type": "application/vnd.sas.data.provider"
    },
    {
      "method": "GET",
      "rel": "rows",
      "href": "/rowSets/tables/cas~fs~cas~fs~CASTestTmp~fs~AIRLINES/rows?sessionId=d5272d22-ef57-4761-8b80-4998f114cc96",
      "uri": "/rowSets/tables/cas~fs~cas~fs~CASTestTmp~fs~AIRLINES/rows?sessionId=d5272d22-ef57-4761-8b80-4998f114cc96",
      "type": "application/vnd.sas.collection",
      "itemType": "application/vnd.sas.data.row.summary"
    },
    {
      "method": "GET",
      "rel": "columns",
      "href": "/dataTables/dataSources/cas~fs~cas~fs~CASTestTmp/tables/AIRLINES/columns?sessionId=d5272d22-ef57-4761-8b80-4998f114cc96",
      "uri": "/dataTables/dataSources/cas~fs~cas~fs~CASTestTmp/tables/AIRLINES/columns?sessionId=d5272d22-ef57-4761-8b80-4998f114cc96",
      "type": "application/vnd.sas.collection",
      "itemType": "application/vnd.sas.data.column.summary"
    }
  \]
}

Additional resources

SAS Data Preparation Support site — quick links to learning resources, doc and support channels

SAS Data Quality 3.4: Getting Started — documentation

Exploring SAS Viya: Programming and Data Management — free e-book explaining how to manage and access data files, libraries, and existing SAS code

 

Back to Top