# 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="extract/google-drive" %}
[google-drive](https://docs.dataspace.ch/platform/transformation/extract/google-drive)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
{% content-ref url="extract/postgres" %}
[postgres](https://docs.dataspace.ch/platform/transformation/extract/postgres)
{% endcontent-ref %}
{% endcolumn %}
{% endcolumns %}
