csv

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

README

csv

Usage

source:
  name: csv
  config:
    path: ./path-to-a-file-or-a-directory

Inputs

Key Value Example Description
path string ./folder/filename.csv Path to a file or a directory required
Notes

Passing directory in path will collect and extract metadata from all .csv files directly inside the directory path.

Outputs

Field Sample Value
resource.urn filename.csv
resource.name filename.csv
resource.service csv
schema.columns []Column
Column
Field Sample Value Description
name order_id csv header e.g. first row

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 {
	Path string `mapstructure:"path" validate:"required"`
}

Config holds the path configuration for the csv 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(_ context.Context, emit plugins.Emit) error

Extract checks if the extractor is configured and returns the extracted data

func (*Extractor) Init

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

Jump to

Keyboard shortcuts

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