cassandra

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: 13 Imported by: 0

README

cassandra

Usage

source:
  name: cassandra
  config:
    user_id: admin
    password: 1234
    host: localhost
    port: 9042
    exclude:
      keyspaces: [mykeyspace]
      tables: [mykeyspace_2.tableName_1]

Inputs

Key Value Example Description
user_id string admin User ID to access the cassandra server required
password string 1234 Password for the cassandra Server required
host string 127.0.0.1 The Host address at which server is running required
port int 9042 The Port number at which server is running required
exclude.keyspcaes []string [keyspace1,keyspace2] List of keyspaces to be excluded from crawling optional
exclude.tables []string [keyspace3.table1] List of tables to be excluded from crawling optional

Outputs

Field Sample Value
resource.urn my_keyspace.my_table
resource.name my_table
resource.service cassandra
description table description
profile.total_rows 2100
schema []column
Column
Field Sample Value
name total_price
type text

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 {
	UserID   string  `json:"user_id" yaml:"user_id" mapstructure:"user_id" validate:"required"`
	Password string  `json:"password" yaml:"password" mapstructure:"password" validate:"required"`
	Host     string  `json:"host" yaml:"host" mapstructure:"host" validate:"required"`
	Port     int     `json:"port" yaml:"port" mapstructure:"port" validate:"required"`
	Exclude  Exclude `json:"exclude" yaml:"exclude" mapstructure:"exclude"`
}

Config holds the set of configuration for the cassandra extractor

type Exclude

type Exclude struct {
	Keyspaces []string `json:"keyspaces" yaml:"keyspaces" mapstructure:"keyspaces"`
	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 cassandra

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) (err error)

Extract checks if the extractor is configured and if the connection to the DB is successful and then starts the extraction process

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