> For the complete documentation index, see [llms.txt](https://docs.dataspace.ch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dataspace.ch/platform/transformation/extract.md).

# Extract

### Static Data

It is possible to create static datasets by hardcoding data into the code and returning a LazyFrame

```python
import polars as pl

def transform():    
    return pl.LazyFrame({
        "country_name": ["Switzerland", "Germany", "France", "Italy", "Spain"],
        "iso_code": ["CH", "DE", "FR", "IT", "ES"],
        "population": [8600000, 83000000, 67000000, 60000000, 47000000]
    })
```

Or by creating a CSV file in the repository and loading it via `pl.scan_csv("./static.csv")`

### External Sources

DataSpace enables the extraction of data from various sources, including databases, file shares, web crawling, and external APIs, either through ready-made connectors or by writing custom code that connects to a custom API.

{% columns %}
{% column %}
{% content-ref url="/pages/f85aeff091f4e5a655233f2952b91e6556015f7b" %}
[Google Drive](/platform/transformation/extract/google-drive.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
{% content-ref url="/pages/aba144dcd54197fa9aa0b24643ffd9e146a94113" %}
[Postgres](/platform/transformation/extract/postgres.md)
{% endcontent-ref %}
{% endcolumn %}
{% endcolumns %}
