merge

package
v0.0.0-...-2f503fb Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectFileLinks(meta *model.Metadata, merged []byte, rawDataPath string, mergedDataPath string) (*model.DataResource, []byte, error)

InjectFileLinks traverses all file links and injests the relevant data.

func InjectFileLinksFromFile

func InjectFileLinksFromFile(meta *model.Metadata, inputFilename string, rawDataPath string, mergedDataPath string, hasHeader bool) (*model.DataResource, []byte, error)

InjectFileLinksFromFile traverses all file links and injests the relevant data.

func LeftJoin

func LeftJoin(leftFile string, leftCol int, rightFile string, rightCol int, hasHeader bool) ([]byte, int, int, error)

LeftJoin provides a function to join to csv files based on the specified column

Types

type FileLink struct {
	Name      string
	IndexVar  *model.Variable
	Lookup    map[string][]string
	Header    []string
	Variables []*model.Variable
}

FileLink represents a link between a dataset col and a file.

type JoinIndices

type JoinIndices struct {
	LeftColIdx  int
	RightColIdx int
}

JoinIndices provides the column indices to join the left and right csvs on

func GetColIndices

func GetColIndices(schemaPath string, columnName string) (*JoinIndices, error)

GetColIndices will get the indices of the 'd3mIndex' column for the training and training target files from a dataset schema

Jump to

Keyboard shortcuts

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