> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/concepts/resources/nilus/batch/sample-configs.md).

# Sample Configs

All examples below use the current Nilus pipeline shape with `spec.type: batch`:

```yaml
type: nilus
spec:
  type: batch
```

Batch pipelines use the `type: nilus` resource with `spec.type: batch`. This page is a sample gallery for common batch connector patterns; for the field-by-field reference, see [Understanding Batch Pipeline Config](/concepts/resources/nilus/batch/pipeline-config.md).

{% hint style="info" %}
Streaming sources (Kafka, NATS+JetStream) use `spec.type: stream`, not `spec.type: batch`. See [Stream Sample Configs](/concepts/resources/nilus/stream/sample-configs.md) for those patterns.
{% endhint %}

## Current Nilus shape

```yaml
name: nilus-batch-example
version: v1alpha
type: nilus
spec:
  type: batch
  compute: universe-compute
  source:
    address: <source-uri>
    options:
      source_table: <object-or-schema.table>
  sink:
    address: <sink-uri>
    options:
      dest_table: <target-object>
      incremental_strategy: <append|replace|merge>
```

## SQL database to Lakehouse

Use this as the recommended first production-like path when the source is represented by a DataOS depot and Nilus should read one PostgreSQL table into a DataOS Lakehouse destination.

```yaml
name: postgres-orders-batch
version: v1alpha
type: nilus
spec:
  type: batch
  compute: universe-compute
  source:
    address: dataos://postgres-source?purpose=ro
    options:
      source_table: public.orders
      incremental_key: updated_at
      primary_key: order_id
  sink:
    address: dataos://orders-lakehouse?purpose=rw
    options:
      dest_table: analytics.orders
      incremental_strategy: merge
```

## SaaS API to warehouse

Use this pattern for connectors such as Salesforce, Stripe, or HubSpot where Nilus extracts named objects or endpoints over an API. Direct connector URIs with `{ENV_VAR}` placeholders require `spec.use.projection`; see [Secrets and Projections](/concepts/resources/nilus/concepts/secrets-and-projections.md) for the full projection block.

```yaml
name: salesforce-account-batch
version: v1alpha
type: nilus
spec:
  type: batch
  compute: universe-compute
  source:
    address: salesforce://?username={SALESFORCE_USERNAME}&password={SALESFORCE_PASSWORD}&token={SALESFORCE_TOKEN}&domain={SALESFORCE_DOMAIN}
    options:
      source_table: account
  sink:
    address: databricks://token:{DATABRICKS_TOKEN}@{DATABRICKS_HOST}?http_path={DATABRICKS_HTTP_PATH}&catalog=main&schema=crm
    options:
      dest_table: account
      incremental_strategy: append
```

## Spreadsheet to Lakehouse

Use this pattern for sheet-style sources that behave like snapshots rather than incremental databases.

```yaml
name: gsheets-sheet-batch
version: v1alpha
type: nilus
spec:
  type: batch
  compute: universe-compute
  source:
    address: gsheets://?credentials_path=/etc/dataos/secret/gsheets_sa.json
    options:
      source_table: 1OblKaJc2HwoprRNHSH9eKRdPlx1M45tUuzf5x9k_TNY.EMP_DATA
  sink:
    address: dataos://sheet-lakehouse?purpose=rw
    options:
      dest_table: analytics.emp_data
      incremental_strategy: replace
```

## Validation notes

* Use `type: nilus` and keep the pipeline mode under `spec.type: batch`.
* `source_table` means different things by connector: a SQL table, an API object, a spreadsheet range, or a stream name.
* Prefer `replace` for snapshot-style sources such as Google Sheets.
* Use `append` or `merge` only when the source contract and destination semantics support them.

## Related docs

* [Understanding Batch Pipeline Config](/concepts/resources/nilus/batch/pipeline-config.md)
* [CDC sample configs](/concepts/resources/nilus/cdc/sample-configs.md)
* [Stream sample configs](/concepts/resources/nilus/stream/sample-configs.md)
* [Optimize Sink Datasets](/concepts/resources/nilus/pipeline-optimization/optimize-sink-datasets.md): tune `incremental_strategy`, `partition_by`, `page_size`, and other dataset-shape settings before going to production.
* [Salesforce](/concepts/resources/nilus/batch/batch-sources/salesforce.md)
* [Google Sheets](/concepts/resources/nilus/batch/batch-sources/google-sheets.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://v2.dataos.info/concepts/resources/nilus/batch/sample-configs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
