Analysis

com.phasmidsoftware.tableparser.core.table.Analysis
object Analysis

The Analysis object provides factory methods to analyze tables from various sources.

Example usage:

 // Analyze a CSV-sourced RawTable
 val stats: ColumnStatistics = Analysis(rawTable)

 // Analyze a CSV file by Path
 implicit val parser: RawTableParser = RawTableParser()
 val stats: ColumnStatistics = Analysis.forCsv(Path.of("data.csv"))

 // Analyze a Parquet file (requires parquet module in scope)
 val stats: ColumnStatistics = Analysis.forParquet[YellowTaxiTrip](Path.of("data.parquet"))

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Analysis.type

Members list

Value members

Concrete methods

Analyze a CSV-sourced RawTable. This is the primary method for analyzing in-memory tables.

Analyze a CSV-sourced RawTable. This is the primary method for analyzing in-memory tables.

Value parameters

table

the raw table to be analyzed.

Attributes

Returns

a ColumnStatistics object containing rows, columns, and column-level statistics.

def forCsv(path: Path)(using tableParser: RawTableParser = ...): ColumnStatistics

Analyze a CSV file by Path. Parses the file using the provided RawTableParser, then analyzes the result.

Analyze a CSV file by Path. Parses the file using the provided RawTableParser, then analyzes the result.

Value parameters

path

the path to a CSV file.

tableParser

the RawTableParser to use. Defaults to RawTableParser().

Attributes

Returns

a ColumnStatistics object.

def forParquet[Row <: Product](path: Path)(using singleFileFactory: SingleFileAnalyzerFactory): ColumnStatistics

Analyze a single Parquet file by Path. Fails if path is a directory; use forParquetDataset for dataset directories. Requires the parquet module to be in scope: import com.phasmidsoftware.tableparser.parquet._

Analyze a single Parquet file by Path. Fails if path is a directory; use forParquetDataset for dataset directories. Requires the parquet module to be in scope: import com.phasmidsoftware.tableparser.parquet._

Type parameters

Row

the target case class type.

Value parameters

path

the path to a .parquet file.

singleFileFactory

implicit single-file analyzer factory from parquet module.

Attributes

Returns

a ColumnStatistics object.

def forParquetDataset[Row <: Product](path: Path)(using datasetFactory: DatasetAnalyzerFactory): ColumnStatistics

Analyze a Parquet dataset directory by Path. Fails if path is not a directory; use forParquet for single files. Requires the parquet module to be in scope: import com.phasmidsoftware.tableparser.parquet._

Analyze a Parquet dataset directory by Path. Fails if path is not a directory; use forParquet for single files. Requires the parquet module to be in scope: import com.phasmidsoftware.tableparser.parquet._

Type parameters

Row

the target case class type.

Value parameters

datasetFactory

implicit dataset analyzer factory from parquet module.

path

the path to a dataset directory containing part-*.parquet files.

Attributes

Returns

a ColumnStatistics object.