CData Cmdlets for Amazon Redshift 2019 - Online Help
Questions / Feedback?

QueryResults Output Object (Select-Redshift Cmdlet)

CData Cmdlets for Amazon Redshift 2019 - Build 19.0.7354

The results of the query.

Syntax

PSObject QueryResults

Remarks

When executing a search, the results will be returned to the pipeline in a PSObject for each row, one row at a time. Each row object contains the columns of the table with their corresponding values. The row object also contains the table and the connection, which makes it easy to input these values to other cmdlets through a pipeline. Below is an example of a row object in JSON form:

PS C:\> $conn  = Connect-Redshift -User 'admin' -Password 'admin' -Server 'examplecluster.my.us-west-2.redshift.amazonaws.com' -Port '5439' -Database 'dev'
PS C:\> $row = Select-Redshift -Connection $conn -Table "Orders" -Columns (ShipName, ShipCity)  -Where "ShipCountry = 'USA'" | select -first 1
PS C:\> $row | ConvertTo-Json
{
  "Connection":  {

  },
    "Table":  "Orders",
    "Columns":  [

    ],
    "ShipName":  "MyShipName",
    "ShipCity":  "MyShipCity"
}

 
 
Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 19.0.7354.0