Skip to content

Commit 28121c5

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 543cdf4 of spec repo
1 parent 579feb8 commit 28121c5

23 files changed

Lines changed: 1336 additions & 3 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63744,6 +63744,199 @@ components:
6374463744
x-enum-varnames:
6374563745
- BLOCK
6374663746
- DROP_NEWEST
63747+
ObservabilityPipelineClickhouseDestination:
63748+
description: |-
63749+
The `clickhouse` destination sends log events to a ClickHouse database table over HTTP.
63750+
63751+
**Supported pipeline types:** logs.
63752+
properties:
63753+
auth:
63754+
$ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationAuth"
63755+
batch:
63756+
$ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationBatch"
63757+
batch_encoding:
63758+
$ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationBatchEncoding"
63759+
compression:
63760+
$ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationCompression"
63761+
database:
63762+
description: Optional ClickHouse database name. If omitted, the user's default database on the ClickHouse server is used.
63763+
example: my_database
63764+
type: string
63765+
date_time_best_effort:
63766+
description: When `true`, enables flexible DateTime parsing on the ClickHouse server side.
63767+
example: false
63768+
type: boolean
63769+
endpoint_url_key:
63770+
description: |-
63771+
Name of the environment variable or secret that contains the ClickHouse HTTP endpoint URL.
63772+
Defaults to `DESTINATION_CLICKHOUSE_ENDPOINT_URL` (prefixed with `DD_OP_` at runtime).
63773+
example: CLICKHOUSE_ENDPOINT_URL
63774+
type: string
63775+
format:
63776+
$ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationFormat"
63777+
id:
63778+
description: The unique identifier for this component.
63779+
example: clickhouse-destination
63780+
type: string
63781+
inputs:
63782+
description: A list of component IDs whose output is used as the `input` for this component.
63783+
example: ["filter-processor"]
63784+
items:
63785+
description: The ID of a component whose output is used as input for this destination.
63786+
type: string
63787+
type: array
63788+
skip_unknown_fields:
63789+
description: |-
63790+
When `true`, fields not present in the target table schema are dropped instead of causing insert errors.
63791+
When unset, the ClickHouse server's own `input_format_skip_unknown_fields` setting applies.
63792+
example: true
63793+
nullable: true
63794+
type: boolean
63795+
table:
63796+
description: Target ClickHouse table name. Events are inserted into this table.
63797+
example: application_logs
63798+
type: string
63799+
tls:
63800+
$ref: "#/components/schemas/ObservabilityPipelineTls"
63801+
type:
63802+
$ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationType"
63803+
required:
63804+
- id
63805+
- type
63806+
- inputs
63807+
- table
63808+
type: object
63809+
x-pipeline-types: [logs]
63810+
ObservabilityPipelineClickhouseDestinationAuth:
63811+
description: |-
63812+
HTTP Basic Authentication credentials for the ClickHouse destination.
63813+
When `strategy` is `basic`, provide `username_key` and `password_key` that reference environment variables or secrets containing the credentials.
63814+
properties:
63815+
password_key:
63816+
description: Name of the environment variable or secret that contains the ClickHouse password.
63817+
example: CLICKHOUSE_PASSWORD
63818+
type: string
63819+
strategy:
63820+
$ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationAuthStrategy"
63821+
username_key:
63822+
description: Name of the environment variable or secret that contains the ClickHouse username.
63823+
example: CLICKHOUSE_USERNAME
63824+
type: string
63825+
required:
63826+
- strategy
63827+
type: object
63828+
ObservabilityPipelineClickhouseDestinationAuthStrategy:
63829+
description: The authentication strategy for ClickHouse HTTP requests. Only `basic` is supported.
63830+
enum:
63831+
- basic
63832+
example: basic
63833+
type: string
63834+
x-enum-varnames:
63835+
- BASIC
63836+
ObservabilityPipelineClickhouseDestinationBatch:
63837+
description: Batching configuration for ClickHouse inserts.
63838+
properties:
63839+
max_events:
63840+
description: Maximum number of events per batch before it is flushed.
63841+
example: 1000
63842+
format: int64
63843+
minimum: 1
63844+
type: integer
63845+
timeout_secs:
63846+
description: Maximum number of seconds to wait before flushing a partial batch.
63847+
example: 1
63848+
format: int64
63849+
maximum: 65535
63850+
minimum: 1
63851+
type: integer
63852+
type: object
63853+
ObservabilityPipelineClickhouseDestinationBatchEncoding:
63854+
description: |-
63855+
Batch encoding configuration for the ClickHouse destination.
63856+
Required when `format` is `arrow_stream`. The `codec` field must be set to `arrow_stream`.
63857+
properties:
63858+
allow_nullable_fields:
63859+
description: |-
63860+
When `true`, null values are allowed for non-nullable fields in the ClickHouse schema.
63861+
When `false` (default), missing values for non-nullable columns cause encoding errors.
63862+
example: false
63863+
type: boolean
63864+
codec:
63865+
$ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationBatchEncodingCodec"
63866+
required:
63867+
- codec
63868+
type: object
63869+
ObservabilityPipelineClickhouseDestinationBatchEncodingCodec:
63870+
description: The codec used for batch encoding. Only `arrow_stream` is supported.
63871+
enum:
63872+
- arrow_stream
63873+
example: arrow_stream
63874+
type: string
63875+
x-enum-varnames:
63876+
- ARROW_STREAM
63877+
ObservabilityPipelineClickhouseDestinationCompression:
63878+
description: |-
63879+
Compression setting for outbound HTTP requests to ClickHouse.
63880+
Can be specified as a shorthand string (`"gzip"` or `"none"`) or as an object
63881+
with an `algorithm` field and an optional `level` (gzip only, 1–9).
63882+
oneOf:
63883+
- $ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationCompressionAlgorithm"
63884+
- $ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationCompressionObject"
63885+
ObservabilityPipelineClickhouseDestinationCompressionAlgorithm:
63886+
description: The compression algorithm applied to outbound HTTP requests.
63887+
enum:
63888+
- gzip
63889+
- none
63890+
example: gzip
63891+
type: string
63892+
x-enum-varnames:
63893+
- GZIP
63894+
- NONE
63895+
ObservabilityPipelineClickhouseDestinationCompressionObject:
63896+
description: |-
63897+
Structured compression configuration for the ClickHouse destination.
63898+
Use `algorithm` to specify the compression type and `level` (optional, gzip only) to control compression strength.
63899+
properties:
63900+
algorithm:
63901+
$ref: "#/components/schemas/ObservabilityPipelineClickhouseDestinationCompressionAlgorithm"
63902+
level:
63903+
description: Compression level (1–9). Only applicable when `algorithm` is `gzip`.
63904+
example: 6
63905+
format: int64
63906+
maximum: 9
63907+
minimum: 1
63908+
type: integer
63909+
required:
63910+
- algorithm
63911+
type: object
63912+
ObservabilityPipelineClickhouseDestinationFormat:
63913+
description: |-
63914+
Insert format for events sent to ClickHouse.
63915+
- `json_each_row`: Maps event fields to columns by name (ClickHouse `JSONEachRow`).
63916+
- `json_as_object`: Inserts each event into a single `Object('json')` / `JSON` column (ClickHouse `JSONAsObject`).
63917+
- `json_as_string`: Inserts each event into a single `String`-typed column as raw JSON (ClickHouse `JSONAsString`).
63918+
- `arrow_stream`: Batches events using Apache Arrow IPC streaming format. Requires `batch_encoding`.
63919+
enum:
63920+
- json_each_row
63921+
- json_as_object
63922+
- json_as_string
63923+
- arrow_stream
63924+
example: json_each_row
63925+
type: string
63926+
x-enum-varnames:
63927+
- JSON_EACH_ROW
63928+
- JSON_AS_OBJECT
63929+
- JSON_AS_STRING
63930+
- ARROW_STREAM
63931+
ObservabilityPipelineClickhouseDestinationType:
63932+
default: clickhouse
63933+
description: The destination type. The value must be `clickhouse`.
63934+
enum:
63935+
- clickhouse
63936+
example: clickhouse
63937+
type: string
63938+
x-enum-varnames:
63939+
- CLICKHOUSE
6374763940
ObservabilityPipelineCloudPremDestination:
6374863941
description: |-
6374963942
The `cloud_prem` destination sends logs to Datadog CloudPrem.
@@ -63843,6 +64036,7 @@ components:
6384364036
- $ref: "#/components/schemas/ObservabilityPipelineAmazonS3GenericDestination"
6384464037
- $ref: "#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestination"
6384564038
- $ref: "#/components/schemas/AzureStorageDestination"
64039+
- $ref: "#/components/schemas/ObservabilityPipelineClickhouseDestination"
6384664040
- $ref: "#/components/schemas/ObservabilityPipelineCloudPremDestination"
6384764041
- $ref: "#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination"
6384864042
- $ref: "#/components/schemas/ObservabilityPipelineDatadogLogsDestination"

docs/datadog_api_client.v2.model.rst

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26590,6 +26590,83 @@ datadog\_api\_client.v2.model.observability\_pipeline\_buffer\_options\_when\_fu
2659026590
:members:
2659126591
:show-inheritance:
2659226592

26593+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination module
26594+
-------------------------------------------------------------------------------------
26595+
26596+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination
26597+
:members:
26598+
:show-inheritance:
26599+
26600+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination\_auth module
26601+
-------------------------------------------------------------------------------------------
26602+
26603+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_auth
26604+
:members:
26605+
:show-inheritance:
26606+
26607+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination\_auth\_strategy module
26608+
-----------------------------------------------------------------------------------------------------
26609+
26610+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_auth_strategy
26611+
:members:
26612+
:show-inheritance:
26613+
26614+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination\_batch module
26615+
--------------------------------------------------------------------------------------------
26616+
26617+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_batch
26618+
:members:
26619+
:show-inheritance:
26620+
26621+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination\_batch\_encoding module
26622+
------------------------------------------------------------------------------------------------------
26623+
26624+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_batch_encoding
26625+
:members:
26626+
:show-inheritance:
26627+
26628+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination\_batch\_encoding\_codec module
26629+
-------------------------------------------------------------------------------------------------------------
26630+
26631+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_batch_encoding_codec
26632+
:members:
26633+
:show-inheritance:
26634+
26635+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination\_compression module
26636+
--------------------------------------------------------------------------------------------------
26637+
26638+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_compression
26639+
:members:
26640+
:show-inheritance:
26641+
26642+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination\_compression\_algorithm module
26643+
-------------------------------------------------------------------------------------------------------------
26644+
26645+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_compression_algorithm
26646+
:members:
26647+
:show-inheritance:
26648+
26649+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination\_compression\_object module
26650+
----------------------------------------------------------------------------------------------------------
26651+
26652+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_compression_object
26653+
:members:
26654+
:show-inheritance:
26655+
26656+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination\_format module
26657+
---------------------------------------------------------------------------------------------
26658+
26659+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_format
26660+
:members:
26661+
:show-inheritance:
26662+
26663+
datadog\_api\_client.v2.model.observability\_pipeline\_clickhouse\_destination\_type module
26664+
-------------------------------------------------------------------------------------------
26665+
26666+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_type
26667+
:members:
26668+
:show-inheritance:
26669+
2659326670
datadog\_api\_client.v2.model.observability\_pipeline\_cloud\_prem\_destination module
2659426671
--------------------------------------------------------------------------------------
2659526672

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
"""
2+
Validate an observability pipeline with ClickHouse destination returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi
7+
from datadog_api_client.v2.model.observability_pipeline_clickhouse_destination import (
8+
ObservabilityPipelineClickhouseDestination,
9+
)
10+
from datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_auth import (
11+
ObservabilityPipelineClickhouseDestinationAuth,
12+
)
13+
from datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_auth_strategy import (
14+
ObservabilityPipelineClickhouseDestinationAuthStrategy,
15+
)
16+
from datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_batch import (
17+
ObservabilityPipelineClickhouseDestinationBatch,
18+
)
19+
from datadog_api_client.v2.model.observability_pipeline_clickhouse_destination_type import (
20+
ObservabilityPipelineClickhouseDestinationType,
21+
)
22+
from datadog_api_client.v2.model.observability_pipeline_config import ObservabilityPipelineConfig
23+
from datadog_api_client.v2.model.observability_pipeline_config_processor_group import (
24+
ObservabilityPipelineConfigProcessorGroup,
25+
)
26+
from datadog_api_client.v2.model.observability_pipeline_data_attributes import ObservabilityPipelineDataAttributes
27+
from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source import (
28+
ObservabilityPipelineDatadogAgentSource,
29+
)
30+
from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source_type import (
31+
ObservabilityPipelineDatadogAgentSourceType,
32+
)
33+
from datadog_api_client.v2.model.observability_pipeline_filter_processor import ObservabilityPipelineFilterProcessor
34+
from datadog_api_client.v2.model.observability_pipeline_filter_processor_type import (
35+
ObservabilityPipelineFilterProcessorType,
36+
)
37+
from datadog_api_client.v2.model.observability_pipeline_spec import ObservabilityPipelineSpec
38+
from datadog_api_client.v2.model.observability_pipeline_spec_data import ObservabilityPipelineSpecData
39+
40+
body = ObservabilityPipelineSpec(
41+
data=ObservabilityPipelineSpecData(
42+
attributes=ObservabilityPipelineDataAttributes(
43+
config=ObservabilityPipelineConfig(
44+
destinations=[
45+
ObservabilityPipelineClickhouseDestination(
46+
id="clickhouse-destination",
47+
inputs=[
48+
"my-processor-group",
49+
],
50+
type=ObservabilityPipelineClickhouseDestinationType.CLICKHOUSE,
51+
table="application_logs",
52+
database="my_database",
53+
compression="gzip",
54+
auth=ObservabilityPipelineClickhouseDestinationAuth(
55+
strategy=ObservabilityPipelineClickhouseDestinationAuthStrategy.BASIC,
56+
username_key="CLICKHOUSE_USERNAME",
57+
password_key="CLICKHOUSE_PASSWORD",
58+
),
59+
batch=ObservabilityPipelineClickhouseDestinationBatch(
60+
max_events=1000,
61+
timeout_secs=1,
62+
),
63+
),
64+
],
65+
processor_groups=[
66+
ObservabilityPipelineConfigProcessorGroup(
67+
enabled=True,
68+
id="my-processor-group",
69+
include="service:my-service",
70+
inputs=[
71+
"datadog-agent-source",
72+
],
73+
processors=[
74+
ObservabilityPipelineFilterProcessor(
75+
enabled=True,
76+
id="filter-processor",
77+
include="status:error",
78+
type=ObservabilityPipelineFilterProcessorType.FILTER,
79+
),
80+
],
81+
),
82+
],
83+
sources=[
84+
ObservabilityPipelineDatadogAgentSource(
85+
id="datadog-agent-source",
86+
type=ObservabilityPipelineDatadogAgentSourceType.DATADOG_AGENT,
87+
),
88+
],
89+
),
90+
name="Pipeline with ClickHouse Destination",
91+
),
92+
type="pipelines",
93+
),
94+
)
95+
96+
configuration = Configuration()
97+
with ApiClient(configuration) as api_client:
98+
api_instance = ObservabilityPipelinesApi(api_client)
99+
response = api_instance.validate_pipeline(body=body)
100+
101+
print(response)

0 commit comments

Comments
 (0)