Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Pipe Streak Data to CSV in PowerShell
Use standard PowerShell cmdlets to access Streak tables.
The CData Cmdlets Module for Streak is a standard PowerShell module offering straightforward integration with Streak. Below, you will find examples of using our Streak Cmdlets with native PowerShell cmdlets.
Creating a Connection to Your Streak Data
Use the following steps to generate a new API key for authenticating to Streak.
- Navigate to Gmail
- Click on the Streak dropdown to the right of the search bar
- Select the Integrations button. This will open a window where you can view existing integrations and create new API keys.
- Under the Streak API section of integrations, click the button to Create New Key.
$conn = Connect-Streak -ApiKey "$ApiKey"
Selecting Data
Follow the steps below to retrieve data from the Users table and pipe the result into to a CSV file:
Select-Streak -Connection $conn -Table Users | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myUsersData.csv -NoTypeInformation
You will notice that we piped the results from Select-Streak 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.