Skip to content

[datadog_observability_pipeline] Add ClickHouse destination (OPA-5308)#3810

Draft
Jansen-w wants to merge 2 commits into
masterfrom
jansen-w/OPA-5308-tf-clickhouse-destination
Draft

[datadog_observability_pipeline] Add ClickHouse destination (OPA-5308)#3810
Jansen-w wants to merge 2 commits into
masterfrom
jansen-w/OPA-5308-tf-clickhouse-destination

Conversation

@Jansen-w
Copy link
Copy Markdown

Summary

  • Adds clickhouse destination to the Observability Pipelines Terraform provider
  • Full field surface from OPW v1 schema: endpoint_url_key, database, table, format, skip_unknown_fields, date_time_best_effort, compression, auth, batch, batch_encoding, tls, buffer
  • Registered in the main resource model struct, schema, expand switch, and flatten switch
  • Three acceptance tests: full config, minimal config (table only), and arrow_stream format with batch_encoding

SDK Dependency — BLOCKER

This PR will not compile until the following dependency is resolved:

The datadogV2.ObservabilityPipelineClickhouseDestination SDK types do not yet exist in the datadog-api-client-go module. The API spec PR (OPA-5308) must be merged first, and then go.mod must be bumped to the new pseudoversion that includes the generated ClickHouse types.

Once the API spec PR lands:

  1. Run API_CLIENT_VERSION=<new-pseudoversion> make update-go-client
  2. Remove this blocker note from the PR description
  3. Run go build ./... and go vet ./... to verify

Files Changed

  • datadog/fwprovider/observability_pipeline/clickhouse_destination.go — new component file
  • datadog/fwprovider/resource_datadog_observability_pipeline.go — registration (model, schema, expand, flatten)
  • datadog/tests/resource_datadog_observability_pipeline_test.go — acceptance tests

Test plan

  • Wait for API spec PR (OPA-5308) to merge and SDK pseudoversion to be published
  • Bump go.mod to new pseudoversion
  • go build ./... passes
  • go vet ./... passes
  • RECORD=false TESTARGS="-run TestAccDatadogObservabilityPipeline_clickhouse" make testacc with cassettes

🤖 Generated with Claude Code

…es TF provider

Implements the clickhouse destination component (OPA-5308) with full field
surface matching the OPW v1 schema: endpoint_url_key, database, table, format
(json_each_row/json_as_object/json_as_string/arrow_stream), skip_unknown_fields,
date_time_best_effort, compression (algorithm+level), auth (basic strategy),
batch (max_events, timeout_secs), batch_encoding (arrow_stream codec), tls, and buffer.

Registers the destination in the main resource model, schema, expand, and flatten
switch statements. Adds three acceptance tests covering the full config, minimal
config, and arrow_stream format with batch_encoding.

NOTE: This PR requires a go.mod bump to a new datadogV2 SDK pseudoversion that
includes ObservabilityPipelineClickhouseDestination types (OPA-5308 API spec PR
not yet merged). Build will fail until that pseudoversion is available.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@datadog-prod-us1-5
Copy link
Copy Markdown
Contributor

datadog-prod-us1-5 Bot commented May 21, 2026

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 19 Pipeline jobs failed

PR Integration Tests | integration-tests   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). Compilation errors in clickhouse_destination.go: multiple undefined identifiers and an unknown field in struct literal.

Run Tests | linter-checks   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). Compilation errors in clickhouse_destination.go: undefined types and fields.

Run Tests | test (1.1.5, 0, ubuntu-latest)   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). Detected formatting violations requiring 'gofmt' on files. Run 'make fmt' to fix.

View all 19 failed jobs.

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: da50082 | Docs | Datadog PR Page | Give us feedback!

Add required auth_strategy field to http_server source blocks in the
clickhouse destination acceptance tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant