sanitize

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CSV_NUM_HEADER_ROWS = 4
	CSV_DATA_ROWS_START = CSV_NUM_HEADER_ROWS

	CSV_CVR_NUM_INDEX      = 0
	CSV_TABULATOR_ID_INDEX = 1
	CSV_BATCH_ID_INDEX     = 2
	CSV_RECORD_ID_INDEX    = 3
)
View Source
const (
	PATH_TABULATOR_ID_INDEX = 0
	PATH_BATCH_ID_INDEX     = 1
	PATH_RECORD_ID_INDEX    = 2
)
View Source
const (
	ONE_MILLION = 1000000
)

Variables

This section is empty.

Functions

func CleanCSVFile

func CleanCSVFile(dirtyPath string, cleanPath string)

Read the dirtyPath CSV in either standard CSV or odd-ball CSV (="0" style fields) format and then:

  • Sanitize the record ID column
  • Re-order rows based on the new record ID
  • Tabulator and batch IDs are maintaine
  • Re-number the CVR Numbers of the newly-ordered rows
  • Write to cleanPath with the same format that was read (standard or odd-ball)

func CleanJSONZip

func CleanJSONZip(dirtyZipPath string, cleanZipPath string)

func CleanTIFSHAFiles

func CleanTIFSHAFiles(dirtyPaths []string, dirtyBaseDir string, cleanBaseDir string)

func Initialize

func Initialize(seed []byte)

func IsTIFSHAFilename

func IsTIFSHAFilename(filename string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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