Cmdlets for Snowflake

Build 24.0.9060

Update-Snowflake Cmdlet

Parameters   Output Objects  

Updates Snowflake data.

Syntax

Update-Snowflake [parameters]

Remarks

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

$conn = Connect-Snowflake -Url 'https://myaccount.region.snowflakecomputing.com' -User 'Admin' -Password 'test123' -Database 'Northwind' -Warehouse 'TestWarehouse' Account 'Tester1'
Update-Snowflake -Connection $conn -Table "[DemoDB].[PUBLIC].Products" -Columns @("ProductName") -Values @("Ikura") -Id "22"
The Where parameter can also be used to specify the primary key of the table:
Update-Snowflake -Connection $conn -Table "[DemoDB].[PUBLIC].Products" -Columns @("ProductName") -Values @("Ikura") -Where "Id = '22'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-Snowflake -Connection $conn -Table [DemoDB].[PUBLIC].Products -Where "ProductName = 'Konbu'" | Update-Snowflake -Columns @("ProductName") -Values @("Konbu 2")

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060