postgres

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

PostgreSQL

Extract table metadata from a PostgreSQL server.

Usage

source:
  name: postgres
  config:
    connection_url: postgres://admin:pass123@localhost:5432/postgres?sslmode=disable
    exclude:
      databases:
        - testDB
        - secondaryDB

Configuration

Key Type Required Description
connection_url string Yes PostgreSQL connection URL.
exclude.databases []string No List of databases to exclude.

Entities

  • Type: table
  • URN format: urn:postgres:{scope}:table:{database}.{table}
Properties
Property Type Description
properties.columns []object List of column metadata objects.
properties.grants []object List of user privilege grants (when available).
Column object
Field Type Description
name string Column name.
data_type string Data type of the column.
is_nullable bool Whether the column is nullable.
length int Maximum character length (omitted when 0).
Grant object
Field Type Description
user string Grantee name.
privilege_types []string List of granted privileges (e.g. SELECT, INSERT).

Edges

Source Target Type Description
table table references Foreign key relationship to the referenced table.

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertStringListToInterface

func ConvertStringListToInterface(s []string) []any

Types

type Config

type Config struct {
	ConnectionURL string  `json:"connection_url" yaml:"connection_url" mapstructure:"connection_url" validate:"required"`
	Exclude       Exclude `json:"exclude" yaml:"exclude" mapstructure:"exclude"`
}

Config holds the set of configuration options for the extractor

type Exclude added in v0.13.0

type Exclude struct {
	Databases []string `json:"databases" yaml:"databases" mapstructure:"databases"`
}

Exclude contains the list of databases to skip during extraction.

type Extractor

type Extractor struct {
	plugins.BaseExtractor
	// contains filtered or unexported fields
}

Extractor manages the extraction of data from the extractor

func New

func New(logger log.Logger) *Extractor

New returns a pointer to an initialized Extractor Object

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) error

Extract collects metadata from the source. Metadata is collected through the emitter

func (*Extractor) Init

func (e *Extractor) Init(ctx context.Context, config plugins.Config) (err error)

Init initializes the extractor

Jump to

Keyboard shortcuts

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