filepaths

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const TempParquetExtension = ".parquet.tmp"

Variables

This section is empty.

Functions

func CleanupCollectionTempDirs added in v0.2.0

func CleanupCollectionTempDirs()

func EnsureCollectionTempDir added in v0.2.0

func EnsureCollectionTempDir() string

func GetParquetFileGlobForPartition

func GetParquetFileGlobForPartition(dataDir, tableName, partitionName, fileRoot string) string

func GetParquetFileGlobForTable

func GetParquetFileGlobForTable(dataDir, tableName, fileRoot string) string

func GetParquetPartitionPath

func GetParquetPartitionPath(dataDir, tableName, partitionName string) string

func GetTempAndInvalidParquetFileGlobForPartition added in v0.2.0

func GetTempAndInvalidParquetFileGlobForPartition(dataDir, tableName, partitionName string) string

GetTempAndInvalidParquetFileGlobForPartition returns a glob pattern for invalid and temporary parquet files for a partition

func GetTempParquetFileGlobForPartition added in v0.2.0

func GetTempParquetFileGlobForPartition(dataDir, tableName, partitionName, fileRoot string) string

func InvalidParquetFilePath added in v0.2.0

func InvalidParquetFilePath() string

func PruneTree

func PruneTree(folder string) error

PruneTree recursively deletes empty directories in the given folder.

func TailpipeDbFilePath

func TailpipeDbFilePath() string

Types

type PartitionFields added in v0.2.0

type PartitionFields struct {
	Table     string
	Partition string
	Date      time.Time
	Index     int
}

PartitionFields represents the components of a parquet file path

func ExtractPartitionFields added in v0.2.0

func ExtractPartitionFields(parquetFilePath string) (PartitionFields, error)

ExtractPartitionFields parses a parquet file path and returns its components. Expected path format:

/path/to/dir/tp_table=<table_name>/tp_partition=<partition_id>/tp_date=<YYYY-MM-DD>/tp_index=<index>/file.parquet

Rules:

  • Fields can appear in any order
  • It is an error for the same field to appear with different values
  • Date must be in YYYY-MM-DD format
  • Missing fields are allowed (will have zero values)

Jump to

Keyboard shortcuts

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