Skip to content
Manifest Schema

Manifest Schema

This document provides the complete schema reference for all manifest kinds in DataKit.

The platform uses five manifest kinds, each with a clear ownership boundary:

KindOwnerPurpose
ConnectorPlatform teamVersioned technology type with tools and connection schema
StoreInfra / SRENamed instance of a Connector with connection details and secrets
DataSetData engineerData contract — table, prefix, or topic in a Store
DataSetGroupData engineerBundle of DataSets produced by a single materialisation
TransformData engineerUnit of computation reading input DataSets, producing output DataSets

Transform Schema

The Transform manifest (dk.yaml) defines a unit of computation. It is the only manifest kind that runs — Connectors, Stores, and DataSets are declarative metadata.

Full Schema

# dk.yaml
apiVersion: datakit.infoblox.dev/v1alpha1          # Required: API version
kind: Transform                                 # Required: Resource type

metadata:                           # Required: Transform metadata
  name: string                      # Required: Transform name (1-63 chars, lowercase, hyphenated)
  namespace: string                 # Optional: Team namespace
  version: string                   # Optional: Semantic version (e.g., "0.1.0")
  labels:                           # Optional: Key-value labels
    key: value
  annotations:                      # Optional: Arbitrary metadata
    key: value

spec:                               # Required: Transform specification
  runtime: string                   # Required: cloudquery | generic-go | generic-python | dbt
  mode: string                      # Optional: batch | streaming (default: batch)

  inputs:                           # Required: Input DataSet references
    - dataset: string               # DataSet name (local or OCI ref)
      tags:                         # OR match DataSets by labels
        key: value
      version: string               # Optional: Semver range constraint
      cell: string                  # Optional: Cell/region constraint

  outputs:                          # Required: Output DataSet references
    - dataset: string               # DataSet name (local or OCI ref)
      tags:                         # OR match DataSets by labels
        key: value
      version: string               # Optional: Semver range constraint
      cell: string                  # Optional: Cell/region constraint

  image: string                     # Required for generic-go/generic-python/dbt runtimes
  command: [string]                 # Optional: Override container entrypoint

  env:                              # Optional: Environment variables
    - name: string
      value: string
    - name: string
      valueFrom:
        secretRef:
          name: string
          key: string

  trigger:                          # Optional: Reactive trigger policy
    policy: string                  # Required: schedule | on-change | manual | composite
    schedule:                       # Required when policy=schedule
      cron: string                  # 5-field cron expression
      timezone: string              # IANA timezone (default: UTC)
    policies:                       # Required when policy=composite
      - string                      # e.g., ["schedule", "on-change"]

  timeout: string                   # Optional: Max execution time (e.g., "30m", "1h")

  resources:                        # Optional: Kubernetes resource limits
    cpu: string                     # e.g., "500m", "1", "2"
    memory: string                  # e.g., "512Mi", "2Gi"

  replicas: integer                 # Optional: Parallel workers (streaming mode, default: 1)

  lineage:                          # Optional: Lineage configuration
    enabled: boolean                # Enable OpenLineage events (default: false)
    heartbeatInterval: string       # Heartbeat frequency (default: 30s)

Field Reference

metadata.name

PropertyValue
Typestring
RequiredYes
Pattern^[a-z][a-z0-9-]{0,62}$
DescriptionDNS-safe transform identifier. Must start with a lowercase letter.

metadata.version

PropertyValue
Typestring
RequiredNo
FormatSemantic version (e.g., 0.1.0)
DescriptionVersion of the transform package. Used in OCI artifact tags.

spec.runtime

PropertyValue
Typestring
RequiredYes
Enumcloudquery, generic-go, generic-python, dbt
DescriptionExecution engine for the transform.

Runtime descriptions:

RuntimeUse CaseRequirements
cloudqueryCQ source-to-destination syncsNo image — plugin images come from Connector
generic-goCustom Go containersRequires image field
generic-pythonCustom Python containersRequires image field
dbtdbt transformationsRequires image field

spec.mode

PropertyValue
Typestring
RequiredNo
Enumbatch, streaming
Defaultbatch
DescriptionExecution mode. Batch creates k8s Jobs; streaming creates Deployments.

spec.inputs / spec.outputs

PropertyValue
Typearray of DataSetRef objects
RequiredYes
DescriptionInput/output DataSet references. Each entry uses either dataset (named reference) or tags (label matching) — not both.

DataSetRef fields:

FieldTypeDescription
datasetstringNamed DataSet reference (local name or OCI ref)
tagsmap(string→string)Match DataSets by labels (alternative to dataset)
versionstringSemver range constraint (e.g., >=1.0.0)
cellstringCell/region constraint

At runtime, the runner resolves the chain: Transform → DataSet → Store → Connector to obtain connection details and plugin images.

spec.trigger

PropertyValue
Typeobject
RequiredNo
DescriptionReactive trigger policy. Defines when this transform executes.

Trigger fields:

FieldTypeDescription
policystring (required)schedule, on-change, manual, or composite
scheduleobjectRequired when policy=schedule. Has cron and timezone fields.
policiesarray of stringsRequired when policy=composite. Sub-policies to combine.

spec.image

PropertyValue
Typestring
RequiredYes (for generic-go, generic-python, dbt)
Examplesmy-team/enrich-users:latest, python:3.11
DescriptionContainer image for non-CloudQuery runtimes. Not needed for cloudquery runtime.

spec.timeout

PropertyValue
Typestring
RequiredNo
Default30m
PatternGo duration format (e.g., 30m, 1h30m, 2h)
DescriptionMaximum execution time before timeout.

spec.resources

PropertyValue
Typeobject
RequiredNo
Fieldscpu (string), memory (string)
DescriptionKubernetes-style resource requests/limits.

spec.replicas

PropertyValue
Typeinteger
RequiredNo
Default1
Range1-100
DescriptionParallel workers for streaming mode.

spec.lineage

PropertyValue
Typeobject
RequiredNo
Fieldsenabled (boolean), heartbeatInterval (string)
DescriptionOpenLineage event configuration.

Transform Validation Errors

CodeMessageResolution
E001metadata.name is requiredAdd name field
E002spec.runtime is requiredAdd runtime field
E004invalid name formatUse lowercase and hyphens only
E005name too longMaximum 63 characters

Examples

CloudQuery Transform (no image needed)

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Transform
metadata:
  name: pg-to-s3
  namespace: default
  version: 0.1.0
  labels:
    team: datakit
spec:
  runtime: cloudquery
  mode: batch
  inputs:
    - dataset: users
  outputs:
    - dataset: users-parquet
  trigger:
    policy: schedule
    schedule:
      cron: "0 */6 * * *"
  timeout: 30m

Generic Python Transform

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Transform
metadata:
  name: enrich-users
  namespace: default
  version: 0.2.0
spec:
  runtime: generic-python
  mode: batch
  inputs:
    - dataset: users-parquet
  outputs:
    - dataset: users-enriched
  image: my-team/enrich-users:latest
  timeout: 15m

Streaming Transform

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Transform
metadata:
  name: event-processor
  namespace: default
  version: 1.0.0
spec:
  runtime: generic-go
  mode: streaming
  inputs:
    - dataset: raw-events
  outputs:
    - dataset: processed-events
  image: my-team/event-processor:v1.0.0
  replicas: 3
  resources:
    cpu: "1"
    memory: 2Gi
  lineage:
    enabled: true
    heartbeatInterval: 30s

Reactive Transform with Trigger

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Transform
metadata:
  name: enrich
  version: 0.3.0
spec:
  runtime: generic-python
  inputs:
    - dataset: raw-events-parquet
  outputs:
    - dataset: enriched-events
  image: my-team/enrich:latest
  trigger:
    policy: on-change

Tag-based Input Resolution

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Transform
metadata:
  name: aggregate-all
  version: 1.0.0
spec:
  runtime: dbt
  inputs:
    - tags:
        domain: analytics
        tier: curated
      version: ">=1.0.0"
  outputs:
    - dataset: analytics-summary
  image: my-team/dbt-runner:latest
  trigger:
    policy: schedule
    schedule:
      cron: "0 */6 * * *"

DataSet Schema

A DataSet is a named data contract: a table, S3 prefix, or Kafka topic that lives in a Store. It declares the schema (with optional column-level lineage via from) and data classification.

Full Schema

# dataset/<name>.yaml
apiVersion: datakit.infoblox.dev/v1alpha1          # Required: API version
kind: DataSet                                   # Required: Resource type

metadata:                           # Required: DataSet metadata
  name: string                      # Required: DataSet name (1-63 chars, lowercase, hyphenated)
  namespace: string                 # Optional: Team namespace
  version: string                   # Optional: Semantic version (e.g., "1.0.0")
  labels:                           # Optional: Key-value labels
    key: value

spec:                               # Required: DataSet specification
  store: string                     # Required: Name of the Store where this data lives
  table: string                     # Optional: Fully-qualified table name (relational stores)
  prefix: string                    # Optional: Object prefix (object stores like S3)
  topic: string                     # Optional: Topic name (streaming stores like Kafka)
  format: string                    # Optional: Data format (parquet, json, csv, avro)
  classification: string            # Optional: public | internal | confidential | restricted

  schema:                           # Optional: Field/column definitions
    - name: string                  # Required: Field name
      type: string                  # Required: Data type (integer, string, timestamp, boolean, float)
      pii: boolean                  # Optional: Contains PII? (default: false)
      from: string                  # Optional: Lineage source (e.g., "users.id") — links to another DataSet

  dev:                              # Optional: Development-only configuration
    seed:                           # Optional: Sample data for local development
      inline:                       # Option A: Rows defined directly in YAML
        - { col: value, ... }
      file: string                  # Option B: Path to a CSV or JSON seed file
      profiles:                     # Optional: Named alternative data sets
        <profile-name>:
          inline:                   # Inline rows for this profile
            - { col: value, ... }
          file: string              # OR file path for this profile

!!! info “Dev-only section” The dev block is ignored in production deployments. It exists solely to support the local development workflow (dk dev seed and auto-seeding during dk run).

Field Reference

metadata.name

PropertyValue
Typestring
RequiredYes
Pattern^[a-z][a-z0-9-]{0,62}$
DescriptionDNS-safe DataSet identifier.

spec.store

PropertyValue
Typestring
RequiredYes
DescriptionName of the Store manifest this DataSet lives in.

spec.table / spec.prefix / spec.topic

PropertyValue
Typestring
RequiredAt least one of table, prefix, or topic
DescriptionLocation within the Store. Use table for databases, prefix for S3, topic for Kafka.

spec.classification

PropertyValue
Typestring
RequiredNo
Enumpublic, internal, confidential, restricted
DescriptionData sensitivity level.

spec.schema[].from

PropertyValue
Typestring
RequiredNo
Format<dataset-name>.<field-name>
DescriptionDeclares column-level lineage. Links this field to its source in another DataSet.

DataSet Validation Errors

CodeMessageResolution
E025pii=true requires classificationAdd classification level
E026confidential requires retention policyAdd retention policy

Examples

Input DataSet (database table)

apiVersion: datakit.infoblox.dev/v1alpha1
kind: DataSet
metadata:
  name: users
  namespace: default
spec:
  store: warehouse
  table: public.users
  classification: confidential
  schema:
    - name: id
      type: integer
    - name: email
      type: string
      pii: true
    - name: created_at
      type: timestamp

Output DataSet with column-level lineage

apiVersion: datakit.infoblox.dev/v1alpha1
kind: DataSet
metadata:
  name: users-parquet
  namespace: default
spec:
  store: lake-raw
  prefix: data/users/
  format: parquet
  classification: confidential
  schema:
    - name: id
      type: integer
      from: users.id
    - name: email
      type: string
      pii: true
      from: users.email
    - name: created_at
      type: timestamp
      from: users.created_at

Input DataSet with seed data and profiles

apiVersion: datakit.infoblox.dev/v1alpha1
kind: DataSet
metadata:
  name: users
  namespace: default
spec:
  store: warehouse
  table: example_table
  classification: internal
  schema:
    - name: id
      type: integer
    - name: name
      type: string
    - name: created_at
      type: timestamp
  dev:
    seed:
      inline:
        - { id: 1, name: "alice",   created_at: "2026-01-01T00:00:00Z" }
        - { id: 2, name: "bob",     created_at: "2026-01-15T00:00:00Z" }
        - { id: 3, name: "charlie", created_at: "2026-02-01T00:00:00Z" }
      profiles:
        large-dataset:
          file: testdata/large-users.csv
        edge-cases:
          inline:
            - { id: -1, name: "",        created_at: "1970-01-01T00:00:00Z" }
            - { id: 999, name: "O'Reilly", created_at: "2099-12-31T23:59:59Z" }
        empty: {}

spec.dev.seed

PropertyValue
Typeobject
RequiredNo
DescriptionSample data to load into the backing store for local development.
Sub-fieldTypeDescription
inlinearray of mapsRows defined directly in YAML (default profile).
filestringPath (relative to package root) to a CSV or JSON seed file (default profile).
profilesmap of objectsNamed alternative data sets. Each profile has its own inline or file.

Seed data is loaded by dk dev seed or automatically before dk run. A SHA-256 checksum is tracked in a _dp_seed_meta table so that unchanged data is skipped on subsequent runs.


DataSetGroup Schema

A DataSetGroup bundles multiple DataSets produced by a single materialisation (e.g., a CloudQuery sync that snapshots several tables at once).

Full Schema

# dataset-group/<name>.yaml
apiVersion: datakit.infoblox.dev/v1alpha1          # Required: API version
kind: DataSetGroup                              # Required: Resource type

metadata:                           # Required: DataSetGroup metadata
  name: string                      # Required: Group name (1-63 chars, lowercase, hyphenated)
  namespace: string                 # Optional: Team namespace
  labels:                           # Optional: Key-value labels
    key: value

spec:                               # Required: DataSetGroup specification
  store: string                     # Required: Common Store for all DataSets in the group
  datasets:                         # Required: List of DataSet names
    - string

Example

apiVersion: datakit.infoblox.dev/v1alpha1
kind: DataSetGroup
metadata:
  name: pg-snapshot
  namespace: default
spec:
  store: lake-raw
  datasets:
    - users-parquet
    - orders-parquet
    - products-parquet

Connector Schema

A Connector describes a storage technology type (e.g., Postgres, S3, Kafka). Maintained by the platform team. Multiple versions of the same connector (identified by spec.provider) can coexist — each as a separate CR with a unique metadata.name (e.g., postgres-1-2-0, postgres-1-3-0).

Full Schema

# connector/<name>.yaml
apiVersion: datakit.infoblox.dev/v1alpha1          # Required: API version
kind: Connector                                 # Required: Resource type

metadata:                           # Required: Connector metadata
  name: string                      # Required: CR instance name (e.g., "postgres-1-2-0")
  labels:                           # Optional: Key-value labels (convention: datakit.infoblox.dev/provider)
    key: value
  annotations:                      # Optional: Arbitrary annotations
    key: value

spec:                               # Required: Connector specification
  provider: string                  # Optional: Logical identity stores reference (defaults to type)
  version: string                   # Optional: Semantic version of this release (e.g., "1.2.0")
  type: string                      # Required: Technology identifier (postgres, s3, kafka, snowflake)
  protocol: string                  # Optional: Wire protocol (postgresql, s3, kafka)
  capabilities:                     # Required: Supported roles
    - string                        # "source", "destination", or both

  plugin:                           # Optional: CloudQuery plugin images
    source: string                  # CQ source plugin image
    destination: string             # CQ destination plugin image

  tools:                            # Optional: Technology-specific actions
    - name: string                  # Required: Tool identifier (e.g., "psql", "dsn")
      description: string           # Optional: Human-readable summary
      type: string                  # Required: "exec" (run command) or "config" (generate output)
      requires: [string]            # Optional: Binaries that must be on $PATH
      command: string               # Optional: Go template for shell command (type=exec)
      format: string                # Optional: Output format — "text", "file", or "env" (type=config)
      path: string                  # Optional: File path to write to (format=file)
      mode: string                  # Optional: "append" or "overwrite" (format=file)
      template: string              # Optional: Go template for output content (type=config)
      postMessage: string           # Optional: Go template displayed after execution
      default: boolean              # Optional: Default tool when none is specified

  connectionSchema:                 # Optional: Structured connection field declarations
    <logical-name>:
      field: string                 # Required: Key in Store.spec.connection
      description: string           # Optional: Human-readable explanation
      default: string               # Optional: Fallback value when absent
      secret: boolean               # Optional: May also be fulfilled from Store.spec.secrets
      optional: boolean             # Optional: Field is not required

Field Reference

spec.provider

PropertyValue
Typestring
RequiredNo
DefaultFalls back to spec.type if omitted
Examplespostgres, s3, kafka
DescriptionLogical connector identity that Stores reference via spec.connector. Multiple CRs can share the same provider — one per version.

spec.version

PropertyValue
Typestring
RequiredNo
FormatSemantic version (e.g., 1.2.0)
DescriptionVersion of this connector release. Used with connectorVersion on Stores for version-constrained resolution.

spec.type

PropertyValue
Typestring
RequiredYes
Examplespostgres, s3, kafka, snowflake
DescriptionTechnology identifier.

spec.capabilities

PropertyValue
Typearray of strings
RequiredYes
Valuessource, destination
DescriptionWhat roles this connector can serve.

spec.plugin

PropertyValue
Typeobject
RequiredNo
Fieldssource (string), destination (string)
DescriptionCloudQuery plugin images for the cloudquery runtime.

spec.tools

PropertyValue
Typearray of ConnectorTool objects
RequiredNo
DescriptionTechnology-specific actions this connector exposes (e.g., launch psql, generate DSN, mount S3 bucket).

ConnectorTool fields:

FieldTypeRequiredDescription
namestringYesTool identifier (e.g., psql, dsn, mount)
descriptionstringNoHuman-readable summary
typestringYesexec (run a command) or config (generate output)
requiresarray of stringsNoBinary names that must be on $PATH
commandstringNoGo template for shell command (type=exec)
formatstringNoOutput format: text, file, or env (type=config)
templatestringNoGo template for output content (type=config)
defaultbooleanNoMark as default tool when none is specified

spec.connectionSchema

PropertyValue
Typemap of ConnectionSchemaField objects
RequiredNo
DescriptionDeclares the structured connection fields this connector expects. Maps logical field names to Store.spec.connection keys.

ConnectionSchemaField fields:

FieldTypeRequiredDescription
fieldstringYesKey name in Store.spec.connection
descriptionstringNoHuman-readable explanation
defaultstringNoFallback value when absent from the store
secretbooleanNoMay also be fulfilled from Store.spec.secrets
optionalbooleanNoField is not required

Examples

Basic Connector (single version)

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Connector
metadata:
  name: postgres
spec:
  type: postgres
  protocol: postgresql
  capabilities: [source, destination]
  plugin:
    source: ghcr.io/infobloxopen/cq-source-postgres:0.1.0
    destination: ghcr.io/cloudquery/cq-destination-postgres:latest

Versioned Connector with tools and connectionSchema

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Connector
metadata:
  name: postgres-1-3-0
  labels:
    datakit.infoblox.dev/provider: postgres
spec:
  provider: postgres
  version: 1.3.0
  type: postgres
  protocol: postgresql
  capabilities: [source, destination]
  plugin:
    source: ghcr.io/infobloxopen/cq-source-postgres:v1.3.0
    destination: ghcr.io/infobloxopen/cq-destination-postgresql:v8.14.1
  tools:
    - name: psql
      description: Launch interactive psql session
      type: exec
      requires: [psql]
      command: "psql {{.DSN}}"
      default: true
    - name: dsn
      description: Print connection string
      type: config
      format: text
      template: "postgresql://{{.Connection.host}}:{{.Connection.port}}/{{.Connection.database}}"
  connectionSchema:
    host:
      field: host
      description: Database hostname
      default: localhost
    port:
      field: port
      description: Database port
      default: "5432"
    database:
      field: database
      description: Database name
    username:
      field: username
      description: Database user
      secret: true
    password:
      field: password
      description: Database password
      secret: true

Destination-only Connector

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Connector
metadata:
  name: s3
spec:
  type: s3
  protocol: s3
  capabilities: [destination]
  plugin:
    destination: ghcr.io/infobloxopen/cloudquery-plugin-s3:v7.10.2

Store Schema

A Store is a named instance of a Connector: a specific database, bucket, or cluster with its connection details and credentials. Secrets live only on the Store.

The spec.connector field references a Connector by its provider identity (i.e., spec.provider on the Connector, NOT metadata.name). This allows multiple connector versions to coexist while stores reference the logical type.

Full Schema

# store/<name>.yaml
apiVersion: datakit.infoblox.dev/v1alpha1          # Required: API version
kind: Store                                     # Required: Resource type

metadata:                           # Required: Store metadata
  name: string                      # Required: Logical store name (e.g., "warehouse", "lake-raw")
  namespace: string                 # Optional: Team namespace
  labels:                           # Optional: Key-value labels
    key: value
  annotations:                      # Optional: Arbitrary annotations
    key: value

spec:                               # Required: Store specification
  connector: string                 # Required: Provider name of the Connector (references spec.provider)
  connectorVersion: string          # Optional: Semver range constraining compatible versions
  connection:                       # Required: Technology-specific connection parameters
    key: value                      # e.g., host, port, bucket, region, endpoint
  secrets:                          # Optional: Credential references using ${VAR} interpolation
    key: string                     # e.g., username: ${PG_USER}

Field Reference

spec.connector

PropertyValue
Typestring
RequiredYes
DescriptionProvider name of the Connector this store is an instance of. References spec.provider on the Connector (e.g., postgres, s3), not the CR metadata.name.

spec.connectorVersion

PropertyValue
Typestring
RequiredNo
FormatSemver range (e.g., ^1.0.0, >=1.2.0 <2.0.0)
DefaultHighest available version of the named provider
DescriptionConstrains which connector versions this store is compatible with. When omitted, the platform selects the highest available version.

spec.connection

PropertyValue
Typemap (string → any)
RequiredYes
DescriptionTechnology-specific connection parameters. Keys should match the Connector’s connectionSchema field definitions.

spec.secrets

PropertyValue
Typemap (string → string)
RequiredNo
DescriptionCredential references using ${VAR} interpolation. Resolved from environment variables or a secret store at runtime.

Examples

Postgres Store

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Store
metadata:
  name: warehouse
  namespace: default
  labels:
    team: datakit
spec:
  connector: postgres
  connection:
    host: dk-postgres-postgresql.dk-local.svc.cluster.local
    port: 5432
    database: datakit
    schema: public
    sslmode: disable
  secrets:
    username: ${PG_USER}
    password: ${PG_PASSWORD}

S3 Store

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Store
metadata:
  name: lake-raw
  namespace: default
spec:
  connector: s3
  connection:
    bucket: cdpp-raw
    region: us-east-1
    endpoint: http://dk-localstack-localstack.dk-local.svc.cluster.local:4566
  secrets:
    accessKeyId: ${AWS_ACCESS_KEY_ID}
    secretAccessKey: ${AWS_SECRET_ACCESS_KEY}

Store with version-constrained Connector

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Store
metadata:
  name: analytics-db
  namespace: analytics
spec:
  connector: postgres
  connectorVersion: ">=1.2.0 <2.0.0"
  connection:
    host: analytics-primary.internal
    port: 5432
    database: analytics
  secrets:
    username: ${ANALYTICS_PG_USER}
    password: ${ANALYTICS_PG_PASSWORD}

Validation Rules Summary

Common Errors

CodeMessageResolution
E001metadata.name is requiredAdd name field
E002spec.runtime is requiredAdd runtime field (Transform)
E004invalid name formatUse lowercase and hyphens only
E005name too longMaximum 63 characters
E011schema file not found: <path>Create the referenced schema file

Classification Errors

CodeMessageResolution
E025pii=true requires classificationAdd classification level on DataSet
E026confidential requires retentionAdd retention policy

CloudQuery Errors

CodeMessageResolution
E060cloudquery runtime requires Connector with pluginEnsure referenced Connector has plugin images
E061Connector role is required and must be validSet valid capability on Connector
E062grpcPort must be between 1024 and 65535Use a valid port number
E063concurrency must be greater than 0Set concurrency ≥ 1

Example: Complete Pipeline Package

A complete pipeline that syncs Postgres tables to S3:

Directory structure

my-pipeline/
├── connector/
│   ├── postgres.yaml
│   └── s3.yaml
├── store/
│   ├── warehouse.yaml
│   └── lake-raw.yaml
├── dataset/
│   ├── users.yaml
│   ├── users-parquet.yaml
│   ├── orders.yaml
│   └── orders-parquet.yaml
├── dataset-group/
│   └── pg-snapshot.yaml
└── dk.yaml                  # Transform manifest

dk.yaml (Transform)

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Transform
metadata:
  name: pg-to-s3
  namespace: analytics
  version: 0.1.0
  labels:
    team: data-engineering
spec:
  runtime: cloudquery
  mode: batch
  inputs:
    - dataset: users
    - dataset: orders
  outputs:
    - dataset: users-parquet
    - dataset: orders-parquet
  trigger:
    policy: schedule
    schedule:
      cron: "0 2 * * *"
  timeout: 30m

connector/postgres.yaml

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Connector
metadata:
  name: postgres
spec:
  type: postgres
  protocol: postgresql
  capabilities: [source, destination]
  plugin:
    source: ghcr.io/infobloxopen/cq-source-postgres:0.1.0

store/warehouse.yaml

apiVersion: datakit.infoblox.dev/v1alpha1
kind: Store
metadata:
  name: warehouse
  namespace: analytics
spec:
  connector: postgres
  connection:
    host: dk-postgres.svc.cluster.local
    port: 5432
    database: analytics
  secrets:
    username: ${PG_USER}
    password: ${PG_PASSWORD}

dataset/users.yaml (input)

apiVersion: datakit.infoblox.dev/v1alpha1
kind: DataSet
metadata:
  name: users
  namespace: analytics
spec:
  store: warehouse
  table: public.users
  classification: confidential
  schema:
    - name: id
      type: integer
    - name: email
      type: string
      pii: true

dataset/users-parquet.yaml (output with lineage)

apiVersion: datakit.infoblox.dev/v1alpha1
kind: DataSet
metadata:
  name: users-parquet
  namespace: analytics
spec:
  store: lake-raw
  prefix: data/users/
  format: parquet
  classification: confidential
  schema:
    - name: id
      type: integer
      from: users.id
    - name: email
      type: string
      pii: true
      from: users.email

See Also