csv

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: 0

README

CSV

Extract column metadata from CSV files.

Usage

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

Configuration

Key Type Required Description
path string Yes Path to a .csv file or a directory. When a directory is given, all .csv files directly inside it are extracted.

Entities

  • Entity type: table
  • URN format: urn:csv:{scope}:file:{filename.csv}
Property Type Description
properties.columns []object List of column objects derived from the CSV header row.
properties.columns[].name string Column header name.

Edges

This extractor does not emit edges.

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(ctx context.Context, emit plugins.Emit) (err 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) (err error)

Jump to

Keyboard shortcuts

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