Sorting¶
Since data in CAS can be spread across many machines and may even be redistributed depending on events that occur, the data is not stored in an ordered form. In general, when using statistical actions, this doesn’t make much difference since the CAS actions doing the work will handle the data regardless of the order that it is in. However, when you are bringing a table of data back to the client from CAS using the fetch action, you may want to have it come back in a sorted form.
In [1]: conn = swat.CAS(host, port, username, password)
In [2]: tbl = conn.read_csv('https://raw.githubusercontent.com/'
...: 'sassoftware/sas-viya-programming/master/data/cars.csv')
...:
NOTE: Cloud Analytic Services made the uploaded file available as table TMPWW1WGLQK in caslib CASUSER(kesmit).
NOTE: The table TMPWW1WGLQK has been created in caslib CASUSER(kesmit) from binary data uploaded to Cloud Analytic Services.
In [3]: tbl.fetch(to=5)