mssql

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

README

mssql

Usage

source:
  name: mssql
  config:
    connection_url: sqlserver://admin:pass123@localhost:3306/
    exclude:
      databases:
        - database_a
        - database_b
      tables:
        - database_c.table_a

Inputs

Key Value Example Description
connection_url string sqlserver://admin:pass123@localhost:3306/ URL to access the mssql server required
exclude.databases []string [database_a, database_b] List of databases to be excluded optional
exclude.tables []string [database_c.table_a, database_c.table_b] List of tables to be excluded optional

Outputs

Field Sample Value
resource.urn mssql::my-mssql/my_database/my_table
resource.name my_table
resource.service mssql
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

This section is empty.

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 connection URL for the extractor

type Exclude

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

type Extractor

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

Extractor manages the extraction of data from the database

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 checks if the extractor is ready to extract and then extract and push data into stream

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