Documentation
¶
Index ¶
- func ToSpannerType(columnType string) (ddl.Type, error)
- func VerifyManifest(conv *internal.Conv, tables []utils.ManifestTable) error
- type CsvImpl
- func (c *CsvImpl) GetCSVFiles(conv *internal.Conv, sourceProfile profiles.SourceProfile) (tables []utils.ManifestTable, err error)
- func (c *CsvImpl) ProcessCSV(conv *internal.Conv, tables []utils.ManifestTable, nullStr string, ...) error
- func (c *CsvImpl) SetRowStats(conv *internal.Conv, tables []utils.ManifestTable, delimiter rune) error
- type CsvInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyManifest ¶
func VerifyManifest(conv *internal.Conv, tables []utils.ManifestTable) error
VerifyManifest performs certain prechecks on the structure of the manifest while populating the conv with the ddl types. Also checks on valid file paths and empty CSVs are handled as conv.Unexpected errors later during processing.
Types ¶
type CsvImpl ¶
type CsvImpl struct{}
func (*CsvImpl) GetCSVFiles ¶
func (c *CsvImpl) GetCSVFiles(conv *internal.Conv, sourceProfile profiles.SourceProfile) (tables []utils.ManifestTable, err error)
GetCSVFiles finds the appropriate files paths and downloads gcs files in any.
func (*CsvImpl) ProcessCSV ¶
func (c *CsvImpl) ProcessCSV(conv *internal.Conv, tables []utils.ManifestTable, nullStr string, delimiter rune) error
ProcessCSV writes data across the tables provided in the manifest file. Each table's data can be provided across multiple CSV files hence, the manifest accepts a list of file paths in the input.
func (*CsvImpl) SetRowStats ¶
func (c *CsvImpl) SetRowStats(conv *internal.Conv, tables []utils.ManifestTable, delimiter rune) error
SetRowStats calculates the number of rows per table.
type CsvInterface ¶
type CsvInterface interface { GetCSVFiles(conv *internal.Conv, sourceProfile profiles.SourceProfile) (tables []utils.ManifestTable, err error) SetRowStats(conv *internal.Conv, tables []utils.ManifestTable, delimiter rune) error ProcessCSV(conv *internal.Conv, tables []utils.ManifestTable, nullStr string, delimiter rune) error }
Click to show internal directories.
Click to hide internal directories.