postgres

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

README

postgres

Usage

source:
  name: postgres
  config:
    connection_url: postgres://admin:pass123@localhost:3306/testDB?sslmode=disable
    exclude: primaryDB,secondaryDB

Inputs

Key Value Example Description
connection_url string postgres://admin:pass123@localhost:3306/testDB?sslmode=disable URL to access the postgres server required
exclude string primaryDB,secondaryDB This is a comma separated db list optional

Outputs

Field Sample Value
resource.urn postgres::my-postgres/my_database/my_table
resource.name my_table
resource.service postgres
description table description
profile.total_rows 2100
schema []Column
Column
Field Sample Value
name total_price
description item's total price
data_type decimal
is_nullable true
length 12,2

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) []interface{}

Types

type Config

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

Config holds the set of configuration options for the extractor

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