> For the complete documentation index, see [llms.txt](https://docs.midio.com/midio-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.midio.com/midio-docs/etl-and-high-performance-computing.md).

# ETL and high performance computing

Midio has an **experimental** native package for using the [**polars data frame library**](https://pola.rs/) for handling large amounts of data.

## How to use it

Start by adding the **polars** package using the [package manager](/midio-docs/package-manager.md).

Then, use one of the functions in the `Polars.Source` module, to import your data into the polars format. Supported formats include CSV, JSON, newline delimited JSON and querying a Postgres database.

These functions return a dataframe object, which can be operated on using either `Polars.Execute Sql` or `Polars.Execute Dynamic Sql`.

### Execute Sql

`Execute Sql` lets you provide a list of inputs using, and then executing an SQL query over those inputs. By default its accepts a single input.

<figure><img src="/files/LwkxD6odbGRq4Rmyn61c" alt=""><figcaption></figcaption></figure>

### Execute Dynamic SqlAbout the output

Works in a simliar way, but expects an object where the key is the name of the source, and the value is a data frame.

<figure><img src="/files/LyAyDlDi5mxtSY4uQgTQ" alt=""><figcaption></figcaption></figure>

## Getting the results

After executing one or more queries, the results can be collected using the `Polars.Collect` function.

<figure><img src="/files/nWSt2UNKM5PLtF1c2FMp" alt=""><figcaption></figcaption></figure>

### About the output

The output is by default in a column-oriented format, meaning you get an object where each field represents a column, and its value is a list containing the values for each row.

<figure><img src="/files/eU8PV6X2HeZQQbdXjd7T" alt=""><figcaption></figcaption></figure>

To get this data converted back to a list of objects, which is often a more useful format, you can use the `Transpose` function.

<figure><img src="/files/riUKXVwFXdeCpBA2bHBs" alt=""><figcaption></figcaption></figure>
