Stream pipeline config
Complete field reference for Nilus Stream pipelines: spec structure, all source.options, source.cdc settings, sink.options, and annotated examples.
Nilus stream pipelines are authored as type: nilus resources with spec.type: stream. This page explains the current Nilus stream pipeline shape, long-running consumers that pull records from event-streaming systems (Kafka, NATS+JetStream) in micro-batches and write them to the configured sink. Stream pipelines do not run on a schedule; they stay up and consume continuously while run_in_loop: true is set.
For sample configs by connector, see Stream Sample Configs. For the connector-specific options, see the Kafka and NATS pages.
Configuration elements
Fields are grouped below by function.
1. Pipeline metadata
name
Unique pipeline identifier.
version
Use v1alpha for the current Nilus resource shape.
type
Must be nilus for Nilus-managed pipelines.
tags
Optional labels for search, grouping, and operations.
description
Optional human-readable summary.
2. Nilus spec
The spec block defines the stream pipeline contract that Nilus validates and renders into a long-running service.
spec.type
Yes
Must be stream for streaming pipelines.
compute
Yes
Compute profile used to run the long-running consumer.
logLevel
No(default: INFO)
Optional log level: DEBUG, INFO, WARNING, or ERROR.
runAsUser
No
Optional runtime identity. When omitted, Nilus uses the resource owner.
resources
No
Optional CPU and memory requests or limits.
use
No
Optional secret projection rules for direct-URI credentials.
source
Yes
Defines how Nilus connects to the streaming system.
sink
Yes
Defines where Nilus writes the consumed records.
3. Source
The source block defines how Nilus connects to the streaming system.
addressis a direct connector URI (kafka://,nats+jetstream://) or adataos://depot reference for clusters managed centrally in DataOS.Connection options that govern transport (brokers, host/port, security protocol, SASL/SSL material, NATS subject) live as query parameters on the URI.
options.source_tableis the topic (Kafka) or JetStream stream name (NATS).options.run_in_loopkeeps the consumer connected. Without it, Nilus exits after the first pull, which is rarely what you want for stream pipelines.
source.options
source_table
Yes
Logical source object. Topic for Kafka, JetStream stream name for NATS.
orders
run_in_loop
Recommended
Keep the consumer running and continue pulling new batches. Set true for production stream services.
true
primary_key
No
Logical row identifier used mainly with merge-style sinks.
order_id
mask
No
Column masking rules. Object whose values are algorithm strings (hash, redact, partial:3).
{ email: hash }
max_table_nesting
No
Schema hint that caps how deeply nested fields are flattened. Nodes deeper than this level are loaded as a struct or JSON column instead of being expanded into their own table. Useful for Kafka or NATS streams carrying nested JSON payloads. 0 keeps the runtime default.
0 (default): increase to flatten nested fields
Connector-specific options, bootstrap_servers, group_id, batch_size, batch_timeout, security_protocol, sasl_*, ssl_* for Kafka; subject, durable, batch_size, timeout, token, nkeys_seed for NATS, go on the URI query string and are documented on the Kafka and NATS source pages.
Direct URI vs depot address
Use a direct connector URI (
kafka://...,nats+jetstream://...) when you want to assemble the connection explicitly and project secrets throughspec.use.projection.Use
dataos://<depot>?purpose=rwwhen the connection should come from a DataOS depot that already has credentials and TLS material configured.
4. Secrets and projections
Stream sources almost always need credentials. For direct URIs, project secrets under spec.use.projection and reference them as {ENV_VAR} placeholders inside the URI:
When a dataos:// depot is used, credentials and TLS material come from the depot, no projection is required.
5. Sink
The sink block defines where Nilus writes the consumed records. Streaming pipelines almost always use incremental_strategy: append because every record represents a new event in the source.
sink.options
dest_table
Yes
Target object in the destination.
analytics.orders_stream
incremental_strategy
Yes
Write behavior across micro-batches. append is the default for stream sinks. Use merge only when the destination has a stable primary key and deduplication is genuinely needed.
append
primary_key
When incremental_strategy: merge
Column(s) used to deduplicate.
order_id
partition_by
No
Partitioning hint for lakehouse-style destinations.
structured partition rules
cluster_by
No
Clustering hint for destinations that support it.
customer_id
loader_file_size
No
Controls how many rows Nilus writes per output file or loader batch.
100000
Destination-specific knobs (region, catalog, warehouse, file format, etc.) live on the destination page rather than this stream-config reference.
6. Execution model
Stream pipelines are continuously running workloads. The important authoring consequences:
Author the
nilusresource inv1alpha.Set
spec.type: streamso Nilus treats the source as an ongoing event consumer.Keep the operational intent in
spec.Stream services persist offsets/sequences in the source (Kafka consumer-group offsets, NATS durable consumers). A pipeline restart resumes from the last committed position only if the consumer identity (
group_idfor Kafka,durable=for NATS) is stable.
Validation notes
Use
type: niluswithspec.type: streamfor streaming pipelines. Misclassifying a stream asspec.type: batchmakes Nilus run the consumer once and exit.Always set
run_in_loop: trueundersource.options.Do not add
spec.schedule, stream services are continuously running, not cron-triggered.Use
spec.use.projectionfor direct URI credentials. Usedataos://...?purpose=rwwhen a depot should supply credentials automatically.Keep
group_id(Kafka) ordurable(NATS) stable across deployments so offsets survive restarts.Prefer
incremental_strategy: appendfor stream sinks; reach formergeonly when the destination has a primary key and deduplication is required.
Related docs
Last updated
Was this helpful?