Code Monkey home page Code Monkey logo

parquet's Introduction

What is this?

This is a parquet file reader made by lisp. You can read headers of FileMetaData, ColumnMetadata, ChunkData but not all headers. Currently, this project is only support a SNAPPY compression codesc.

For more parquet headers, please read a parquet-format specs. (https://github.com/apache/parquet-format).

usages

For example, some parquet files is located in "tests/tpch/".

load parquet file

load-parquet will return a data-parquet-table class. This class has a column-names, dataset of the loaded parquet file.

(load-parquet "./tests/tpch/region.parquet")
(print (load-parquet "./tests/tpch/region.parquet"))

show me the dataset

show data set by limit

A defalut limit is 10.

(show-data (load-parquet "./tests/tpch/region.parquet"))
(show-data (load-parquet "./tests/tpch/part.parquet") :limit 9)

column names

(get-column-names (load-parquet "./tests/tpch/region.parquet"))

take a data by column name

(get-data (load-parquet "./tests/tpch/region.parquet"))
(get-data-by-name (load-parquet "./tests/tpch/region.parquet") "r_regionkey")
(get-data-by-name (load-parquet "./tests/tpch/region.parquet") "r_comment")

row and column count

(get-num-cols (load-parquet "./tests/tpch/region.parquet"))
(get-num-rows (load-parquet "./tests/tpch/region.parquet"))

five number summary

;; means
(sample-mean (get-data-by-name (load-parquet "./tests/tpch/region.parquet") "r_regionkey"))
;; min
(min-item-from (get-data-by-name (load-parquet "./tests/tpch/region.parquet") "r_regionkey"))
;; max
(max-item-from (get-data-by-name (load-parquet "./tests/tpch/region.parquet") "r_regionkey"))
;; quantile
(quantile-of-ordered-seq (sort (get-data-by-name (load-parquet "./tests/tpch/region.parquet") "r_regionkey") #'<) 0.25)
(quantile-of-ordered-seq (sort (get-data-by-name (load-parquet "./tests/tpch/region.parquet") "r_regionkey") #'<) 0.75)

parquet's People

Watchers

 avatar

Forkers

symbolics

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.