Cmdlets for Snowflake

Build 25.0.9434

Update-Snowflake Cmdlet

Parameters   Output Objects  

Snowflake データを更新します。

Syntax

Update-Snowflake [parameters]

Remarks

Update-Snowflake コマンドレットを使って、SQL UPDATE ステートメントに似た構文を用いてSnowflake データを更新できます。

$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"
Where パラメータはテーブルの主キーを指定するためにも使われます。
Update-Snowflake -Connection $conn -Table "[DemoDB].[PUBLIC].Products" -Columns @("ProductName") -Values @("Ikura") -Where "Id = '22'"
主キーは、パイプライン上でコマンドレットに渡すこともできます。
Select-Snowflake -Connection $conn -Table [DemoDB].[PUBLIC].Products -Where "ProductName = 'Konbu'" | Update-Snowflake -Columns @("ProductName") -Values @("Konbu 2")

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434