duckdb

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

+marmot:name=DuckDB +marmot:description=Discovers schemas, tables, views and foreign key relationships from DuckDB database files. +marmot:status=experimental +marmot:features=Assets, Lineage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	plugin.BaseConfig        `json:",inline"`
	*plugin.FileSourceConfig `json:",inline"`

	Path string `json:"path" description:"Path to the DuckDB database file (local path, s3://bucket/key or git::url)" validate:"required"`

	IncludeColumns       bool `json:"include_columns" description:"Whether to include column information in table metadata" default:"true"`
	EnableMetrics        bool `json:"enable_metrics" description:"Whether to include table metrics (row counts and sizes)" default:"true"`
	DiscoverForeignKeys  bool `json:"discover_foreign_keys" description:"Whether to discover foreign key relationships" default:"true"`
	ExcludeSystemSchemas bool `json:"exclude_system_schemas" description:"Whether to exclude system schemas (information_schema, pg_catalog)" default:"true"`
}

Config for DuckDB plugin. +marmot:config

type DuckDBColumnFields

type DuckDBColumnFields struct {
	ColumnName    string `json:"column_name" metadata:"column_name" description:"Column name"`
	DataType      string `json:"data_type" metadata:"data_type" description:"Column data type"`
	IsNullable    bool   `json:"is_nullable" metadata:"is_nullable" description:"Whether null values are allowed"`
	ColumnDefault string `json:"column_default" metadata:"column_default" description:"Default value expression"`
}

DuckDBColumnFields represents DuckDB column-specific metadata fields. +marmot:metadata

type DuckDBFields

type DuckDBFields struct {
	Path       string `json:"path" metadata:"path" description:"Path to the DuckDB database file"`
	Schema     string `json:"schema" metadata:"schema" description:"Schema name"`
	TableName  string `json:"table_name" metadata:"table_name" description:"Table or view name"`
	ObjectType string `json:"object_type" metadata:"object_type" description:"Object type (BASE TABLE, VIEW)"`
	RowCount   int64  `json:"row_count" metadata:"row_count" description:"Estimated row count"`
	Size       int64  `json:"size" metadata:"size" description:"Estimated size in bytes"`
	Comment    string `json:"comment" metadata:"comment" description:"Object comment/description"`
}

DuckDBFields represents DuckDB-specific metadata fields. +marmot:metadata

type DuckDBForeignKeyFields

type DuckDBForeignKeyFields struct {
	ConstraintName string `json:"constraint_name" metadata:"constraint_name" description:"Foreign key constraint name"`
	SourceSchema   string `json:"source_schema" metadata:"source_schema" description:"Schema of the referencing table"`
	SourceTable    string `json:"source_table" metadata:"source_table" description:"Name of the referencing table"`
	SourceColumn   string `json:"source_column" metadata:"source_column" description:"Column in the referencing table"`
	TargetSchema   string `json:"target_schema" metadata:"target_schema" description:"Schema of the referenced table"`
	TargetTable    string `json:"target_table" metadata:"target_table" description:"Name of the referenced table"`
	TargetColumn   string `json:"target_column" metadata:"target_column" description:"Column in the referenced table"`
}

DuckDBForeignKeyFields represents DuckDB foreign key relationship fields. +marmot:metadata

type Source

type Source struct {
	// contains filtered or unexported fields
}

Source represents the DuckDB plugin.

func (*Source) Discover

func (s *Source) Discover(ctx context.Context, pluginConfig plugin.RawPluginConfig) (*plugin.DiscoveryResult, error)

Discover discovers DuckDB tables, views and foreign key relationships.

func (*Source) Validate

func (s *Source) Validate(rawConfig plugin.RawPluginConfig) (plugin.RawPluginConfig, error)

Validate validates and normalises the plugin configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL