Skip to content

Commit

Permalink
docs: change delivery to exactly_once
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgehermo9 committed Mar 5, 2025
1 parent 1ca9405 commit 8a20469
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
3 changes: 2 additions & 1 deletion website/cue/reference.cue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ _values: {
//
// * `at_least_once` - The event will be delivered at least once and
// could be delivered more than once.
// * `exactly_once` - The event will be delivered exactly once.
// * `best_effort` - We will make a best effort to deliver the event,
// but the event is not guaranteed to be delivered.
#DeliveryStatus: "at_least_once" | "best_effort"
#DeliveryStatus: "at_least_once" | "exactly_once" | "best_effort"

// `#DeploymentRoles` clarify when a component should be used under
// certain deployment contexts.
Expand Down
24 changes: 12 additions & 12 deletions website/cue/reference/components/sinks/postgres.cue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ components: sinks: postgres: {

classes: {
commonly_used: false
delivery: "at_least_once"
delivery: "exactly_once"
development: "beta"
egress_method: "batch"
stateful: false
Expand Down Expand Up @@ -44,19 +44,19 @@ components: sinks: postgres: {

support: {
requirements: []
warnings: []
notices: [
warnings: [
"""
[PostgreSQL's default values](\(urls.postgresql_default_values)) defined in the destination table
are not supported. If the ingested event is missing a field which is present as a table column,
a `null` value will be inserted for that record even if that column has a default value defined.
This is a limitation of the `jsonb_populate_recordset` function of PostgreSQL.
As a workaround, you can add a `NOT NULL` constraint to the column, so when inserting an event which is missing that field
a `NOT NULL` constraint violation would be raised, and define a [constraint trigger](\(urls.postgresql_constraint_trigger))
to catch the exception and set the desired default value.
""",
[PostgreSQL's default values](\(urls.postgresql_default_values)) defined in the destination table
are not supported. If the ingested event is missing a field which is present as a table column,
a `null` value will be inserted for that record even if that column has a default value defined.
This is a limitation of the `jsonb_populate_recordset` function of PostgreSQL.
As a workaround, you can add a `NOT NULL` constraint to the column, so when inserting an event which is missing that field
a `NOT NULL` constraint violation would be raised, and define a [constraint trigger](\(urls.postgresql_constraint_trigger))
to catch the exception and set the desired default value.
""",
]
notices: []
}

configuration: base.components.sinks.postgres.configuration
Expand Down
4 changes: 4 additions & 0 deletions website/layouts/partials/docs/component-under-hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
{{ if eq $classes.delivery "at_least_once" }}
{{ partial "badge.html" (dict "prefix" "delivery" "word" "at-least-once" "color" "blue" "inline" true) }}
{{ end }}

{{ if eq $classes.delivery "exactly_once" }}
{{ partial "badge.html" (dict "prefix" "delivery" "word" "exactly-once" "color" "blue" "inline" true) }}
{{ end }}

{{ if eq $features.acknowledgements true }}
{{ partial "badge.html" (dict "prefix" "acknowledgements" "word" "yes" "color" "green" "inline" true) }}
Expand Down

0 comments on commit 8a20469

Please sign in to comment.