Skip to content

Commit

Permalink
Fix snowflake_put output linting
Browse files Browse the repository at this point in the history
Users should now be able to run `benthos lint` on a config which
has `private_key_file: "${PRIVATE_KEY_PATH:}"` and
`snowpipe: "${SF_SNOWPIPE:}"` without having to set those env vars
to some non-empty values.

Signed-off-by: Mihai Todor <[email protected]>
  • Loading branch information
mihaitodor committed Jul 6, 2023
1 parent ef48b45 commit 89f545e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/impl/snowflake/output_snowflake_put.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ and it must be set to the `+"`<cloud>`"+` part of the Account Identifier
Field(service.NewBatchPolicyField("batching")).
Field(service.NewIntField("max_in_flight").Description("The maximum number of parallel message batches to have in flight at any given time.").Default(1)).
LintRule(`root = match {
this.exists("password") && this.exists("private_key_file") => [ "both `+"`password`"+` and `+"`private_key_file`"+` can't be set simultaneously" ],
this.exists("snowpipe") && (!this.exists("private_key_file") || this.private_key_file == "") => [ "`+"`private_key_file`"+` is required when setting `+"`snowpipe`"+`" ],
this.exists("password") && this.password != "" && this.exists("private_key_file") && this.private_key_file != "" => [ "both `+"`password`"+` and `+"`private_key_file`"+` can't be set simultaneously" ],
this.exists("snowpipe") && this.snowpipe != "" && (!this.exists("private_key_file") || this.private_key_file == "") => [ "`+"`private_key_file`"+` is required when setting `+"`snowpipe`"+`" ],
}`).
Example("Kafka / realtime brokers", "Upload message batches from realtime brokers such as Kafka persisting the batch partition and offsets in the stage path and filename similarly to the [Kafka Connector scheme](https://docs.snowflake.com/en/user-guide/kafka-connector-ts.html#step-1-view-the-copy-history-for-the-table) and call Snowpipe to load them into a table. When batching is configured at the input level, it is done per-partition.", `
input:
Expand Down

0 comments on commit 89f545e

Please sign in to comment.