Documentation ¶
Index ¶
- Variables
- type BinaryType
- type BooleanType
- type ByteType
- type DataFrame
- type DataFrameReader
- type DataFrameWriter
- type DataType
- type DateType
- type DecimalType
- type DoubleType
- type FloatType
- type GenericRowWithSchema
- type IntegerType
- type LongType
- type RangePartitionColumn
- type Row
- type ShortType
- type SparkSessionBuilder
- type StringType
- type StructField
- type StructType
- type TimestampNtzType
- type TimestampType
- type UnsupportedType
Constants ¶
This section is empty.
Variables ¶
View Source
var SparkSession sparkSessionBuilderEntrypoint
Functions ¶
This section is empty.
Types ¶
type BinaryType ¶
type BinaryType struct { }
func (BinaryType) TypeName ¶
func (t BinaryType) TypeName() string
type BooleanType ¶
type BooleanType struct { }
func (BooleanType) TypeName ¶
func (t BooleanType) TypeName() string
type DataFrame ¶
type DataFrame interface { // Show prints out data frame data. Show(numRows int, truncate bool) error // Schema returns the schema for the current data frame. Schema() (*StructType, error) // Collect returns the data rows of the current data frame. Collect() ([]Row, error) // Write returns a data frame writer, which could be used to save data frame to supported storage. Write() DataFrameWriter // CreateTempView creates or replaces a temporary view. CreateTempView(viewName string, replace bool, global bool) error // Repartition re-partitions a data frame. Repartition(numPartitions int, columns []string) (DataFrame, error) // RepartitionByRange re-partitions a data frame by range partition. RepartitionByRange(numPartitions int, columns []RangePartitionColumn) (DataFrame, error) }
DataFrame is a wrapper for data frame, representing a distributed collection of data row.
type DataFrameReader ¶
type DataFrameReader interface { // Format specifies data format (data source type) for the underlying data, e.g. parquet. Format(source string) DataFrameReader // Load reads the underlying data and returns a data frame. Load(path string) (DataFrame, error) }
DataFrameReader supports reading data from storage and returning a data frame. TODO needs to implement other methods like Option(), Schema(), and also "strong typed" reading (e.g. Parquet(), Orc(), Csv(), etc.
type DataFrameWriter ¶
type DataFrameWriter interface { // Mode specifies saving mode for the data, e.g. Append, Overwrite, ErrorIfExists. Mode(saveMode string) DataFrameWriter // Format specifies data format (data source type) for the underlying data, e.g. parquet. Format(source string) DataFrameWriter // Save writes data frame to the given path. Save(path string) error }
DataFrameWriter supports writing data frame to storage.
type DecimalType ¶
type DecimalType struct { }
func (DecimalType) TypeName ¶
func (t DecimalType) TypeName() string
type DoubleType ¶
type DoubleType struct { }
func (DoubleType) TypeName ¶
func (t DoubleType) TypeName() string
type GenericRowWithSchema ¶
type GenericRowWithSchema struct {
// contains filtered or unexported fields
}
func (*GenericRowWithSchema) Schema ¶
func (r *GenericRowWithSchema) Schema() (*StructType, error)
func (*GenericRowWithSchema) Values ¶
func (r *GenericRowWithSchema) Values() ([]any, error)
type IntegerType ¶
type IntegerType struct { }
func (IntegerType) TypeName ¶
func (t IntegerType) TypeName() string
type RangePartitionColumn ¶
type SparkSessionBuilder ¶
type SparkSessionBuilder struct {
// contains filtered or unexported fields
}
func (SparkSessionBuilder) Build ¶
func (s SparkSessionBuilder) Build() (sparkSession, error)
func (SparkSessionBuilder) Remote ¶
func (s SparkSessionBuilder) Remote(connectionString string) SparkSessionBuilder
type StringType ¶
type StringType struct { }
func (StringType) TypeName ¶
func (t StringType) TypeName() string
type StructField ¶
type StructType ¶
type StructType struct { TypeName string Fields []StructField }
type TimestampNtzType ¶
type TimestampNtzType struct { }
func (TimestampNtzType) TypeName ¶
func (t TimestampNtzType) TypeName() string
type TimestampType ¶
type TimestampType struct { }
func (TimestampType) TypeName ¶
func (t TimestampType) TypeName() string
type UnsupportedType ¶
type UnsupportedType struct {
TypeInfo any
}
func (UnsupportedType) TypeName ¶
func (t UnsupportedType) TypeName() string
Click to show internal directories.
Click to hide internal directories.