![]() |
VOOZH | about |
The CData Cmdlets Module for SAS xpt is a standard PowerShell module offering straightforward integration with SAS xpt. Below, you will find examples of using our SASXpt Cmdlets with native PowerShell cmdlets.
You can connect to local SASXpt file by setting the URI to a folder containing SASXpt files.
You can connect to Amazon S3 source to read SASXpt files. Set the following properties to connect:
You can connect to ADLS Gen2 to read SASXpt files. Set the following properties to connect:
$conn = Connect-SASXpt -URI "$URI"
Follow the steps below to retrieve data from the SampleTable_1 table and pipe the result into to a CSV file:
Select-SASXpt -Connection $conn -Table SampleTable_1 | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\mySampleTable_1Data.csv -NoTypeInformation
You will notice that we piped the results from Select-SASXpt into a Select-Object cmdlet and excluded some properties before piping them into an Export-Csv cmdlet. We do this because the CData Cmdlets append Connection, Table, and Columns information onto each "row" in the result set, and we do not necessarily want that information in our CSV file.
The Connection, Table, and Columns are appended to the results in order to facilitate piping results from one of the CData Cmdlets directly into another one.Download a free trial of the SASxpt Cmdlets to get started:
Download NowLearn more:
👁 SAS XPORT files IconAn easy-to-use set of PowerShell Cmdlets offering real-time access to SAS xpt (XPORT) files. The Cmdlets allow users to easily read, write, update, and delete live data - just like working with SQL server.