How to pipe Greenhouse Data to CSV in PowerShell



Use standard PowerShell cmdlets to access Greenhouse tables.

The CData Cmdlets Module for Greenhouse is a standard PowerShell module offering straightforward integration with Greenhouse. Below, you will find examples of using our Greenhouse Cmdlets with native PowerShell cmdlets.

Creating a Connection to Your Greenhouse Data

You need an API key to connect to Greenhouse. To create an API key, follow the steps below:

  1. Click the Configure icon in the navigation bar and locate Dev Center on the left.
  2. Select API Credential Management.
  3. Click Create New API Key.
    • Set "API Type" to Harvest.
    • Set "Partner" to custom.
    • Optionally, provide a description.
  4. Proceed to Manage permissions and select the appropriate permissions based on the resources you want to access through the driver.
  5. Copy the created key and set APIKey to that value.

$conn = Connect-Greenhouse  -APIKey "$APIKey"

Selecting Data

Follow the steps below to retrieve data from the Applications table and pipe the result into to a CSV file:

Select-Greenhouse -Connection $conn -Table Applications | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myApplicationsData.csv -NoTypeInformation

You will notice that we piped the results from Select-Greenhouse 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.

Ready to get started?

Download a free trial of the Greenhouse Cmdlets to get started:

 Download Now

Learn more:

Greenhouse Icon Greenhouse Data Cmdlets

An easy-to-use set of PowerShell Cmdlets offering real-time access to Greenhouse. The Cmdlets allow users to easily read, write, update, and delete live data - just like working with SQL server.