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

Update-Redshift Cmdlet

CData Cmdlets for Amazon Redshift 2019 - Build 19.0.7354

Parameters   Output Objects  

Updates Redshift data.


Update-Redshift [parameters]


The Update-Redshift cmdlet allows you to use a syntax similar to SQL UPDATE statements to update Redshift data.

$conn = Connect-Redshift -User 'admin' -Password 'admin' -Server '' -Port '5439' -Database 'dev'
Update-Redshift -Connection $conn -Table "Orders" -Columns @("ShipCity") -Values @("Raleigh") -Id "10261"
The Where parameter can also be used to specify the primary key of the table:
Update-Redshift -Connection $conn -Table "Orders" -Columns @("ShipCity") -Values @("Raleigh") -Where "Id = '10261'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-Redshift -Connection $conn -Table Orders -Where "ShipCountry = 'USA'" | Update-Redshift -Columns @("ShipCountry") -Values @("USA 2")

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