Cmdlets for Elasticsearch

Build 25.0.9434

Update-Elasticsearch Cmdlet

Parameters   Output Objects  

Updates Elasticsearch data.

Syntax

Update-Elasticsearch [parameters]

Remarks

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

$conn = Connect-Elasticsearch -Server '127.0.0.1' -Port 9200
Update-Elasticsearch -Connection $conn -Table "[CData].[Elasticsearch].Employee" -Columns @("Name") -Values @("Jon Doe") -Id "1"
The Where parameter can also be used to specify the primary key of the table:
Update-Elasticsearch -Connection $conn -Table "[CData].[Elasticsearch].Employee" -Columns @("Name") -Values @("Jon Doe") -Where "Id = '1'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-Elasticsearch -Connection $conn -Table [CData].[Elasticsearch].Employee -Where "Industry = 'Floppy Disks'" | Update-Elasticsearch -Columns @("Industry") -Values @("Floppy Disks 2")

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