Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// GitRepo is used for initialization of SFGA archive.
GitRepo
// LocalSchemaPath is an optional path to a local schema.sql file.
// If set, it will be used instead of fetching from GitRepo.
LocalSchemaPath string
// NomCode represents nomenclatural code relevant for the dataset.
NomCode nomcode.Code
// BadRow sets how to process rows with wrong number of fields in CSV
// files.
BadRow gnfmt.BadRow
// WithQuotes sets CSV reader to use `"` as quote. When it is true,
// RFC-based CSV reader is used, even if delimiter is tab or pipe.
WithQuotes bool
// WithParents flag can be set to true when a dataset with a flat
// hierachy needs conversion to a parent/child hierachy.
// All IDs generated during unflattening will have 'sf-' prefix.
WithParents bool
// BatchSize tells how many elements (rows, structs) to deal with in
// a chunk of data.
BatchSize int
// JobsNum conveys the number of concurrent jobs to run, where it is
// needed.
JobsNum int
}
type GitRepo ¶
type GitRepo struct {
// URL to the SFGA schema repository.
URL string
// Tag is a version tag of the SFGA repository to use.
Tag string
// ShaSumSchema is sha256 hash for the content of schema.sql file.
// If the has is trucated, only trucated part is checked. If it is
// empty, no check is done.
ShaSchemaSQL string
}
type Option ¶
type Option func(*Config)
func OptBatchSize ¶
func OptJobsNum ¶
func OptLocalSchemaPath ¶
func OptNomCode ¶
func OptWithParents ¶
func OptWithQuotes ¶
Click to show internal directories.
Click to hide internal directories.