Remove-Redshift Cmdlet
Deletes Amazon Redshift data.
Syntax
Remove-Redshift [parameters]
Remarks
The Remove-Redshift cmdlet allows you to use a syntax similar to SQL DELETE statements to delete Amazon Redshift data.
$conn = Connect-Redshift -User 'admin' -Password 'admin' -Server 'examplecluster.my.us-west-2.redshift.amazonaws.com' -Port '5439' -Database 'dev' Remove-Redshift -Connection $conn -Table "`"sales_db`".`"public`".Orders" -Id "10261"The Where parameter can also be used to specify the primary key:
Remove-Redshift -Connection $conn -Table "exTablePowershell;" -Where "Id = 10261"The primary key can also be passed to the cmdlet along the pipeline:
Select-Redshift -Connection $conn -Table "sales_db"."public".Orders -Where "ShipCountry = 'USA'" | Remove-Redshift