converter

package
v0.0.0-...-246cd80 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ProjectMetadataKey = "routingDataProject"

ProjectMetadataKey maps to the project source in an archive's GCS metadata.

Variables

This section is empty.

Functions

func Convert

func Convert(collector string, r io.Reader, dst io.Writer)

Convert translates the bzip'ed MRT raw bytes into a BigQuery compatible format and write to the destination.

func ObjExists

func ObjExists(ctx context.Context, gcsCli *storage.Client, object, bucket string) (bool, error)

ObjExists checks if a converted archive already exists at the destination.

func ProcessMRTArchive

func ProcessMRTArchive(ctx context.Context, gcsCli *storage.Client, cfg *Config) error

ProcessMRTArchive converts an MRT dump into updates on GCS, which will later be picked up by BigQuery automatically. ProcessMRTDump converts on a best- effort basis as it will convert as much as it can from every archive, and it only supports archives of updates.

Types

type Config

type Config struct {
	SrcBucket string
	DstBucket string
	SrcObject string
}

Jump to

Keyboard shortcuts

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