Documentation ¶
Overview ¶
Package csv implements the sq driver for CSV/TSV et al.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var OptDelim = options.NewString( "driver.csv.delim", nil, delimCommaKey, nil, "Delimiter for ingest CSV data", `Delimiter to use for CSV files. Default is "comma". Possible values are: comma, space, pipe, tab, colon, semi, period.`, options.TagSource, options.TagIngestMutate, "csv", )
OptDelim specifies the CSV delimiter to use.
View Source
var OptEmptyAsNull = options.NewBool( "driver.csv.empty-as-null", nil, true, "Treat ingest empty CSV fields as NULL", `When true, empty CSV fields are treated as NULL. When false, the zero value for that type is used, e.g. empty string or 0.`, options.TagSource, options.TagIngestMutate, "csv", )
OptEmptyAsNull determines if an empty CSV field is treated as NULL or as the zero value for the kind of that field.
Functions ¶
func DetectCSV ¶
func DetectCSV(ctx context.Context, newRdrFn files.NewReaderFunc) (detected drivertype.Type, score float32, err error, )
DetectCSV implements files.TypeDetectFunc.
func DetectTSV ¶
func DetectTSV(ctx context.Context, newRdrFn files.NewReaderFunc) (detected drivertype.Type, score float32, err error, )
DetectTSV implements files.TypeDetectFunc.
func NamedDelims ¶ added in v0.34.0
func NamedDelims() []string
NamedDelims returns the named delimiters, such as [comma, tab, pipe...].
Types ¶
Click to show internal directories.
Click to hide internal directories.