pola-rs / polars-cli

CLI interface for running SQL queries with Polars as backend

Home Page:https://pola.rs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syntax for converting file formats

lucazanna opened this issue · comments

commented

Problem description

Currently the Polars CLI has the following syntax for converting a file from CSV to Parquet:

polars -o parquet "SELECT * FROM read_csv('data.csv')" > data.parquet

This is already helpful, however could we add syntactic sugar so that the following becomes possible:

polars -s csv -o parquet data.csv > data.parquet

(or anything similar)

this would make for a very easy syntax for running simple file conversion. And use SQL whenever we need something more advanced than a simple file conversion

commented

tagging @universalmind303 for your thoughts