- Shell 100%
| host_scripts | ||
| duckdb.md | ||
| get_dn_canonical.sh | ||
| README.md | ||
| yolo.sh | ||
Hatlas datanommer parquet downloader
get_dn_canonical.sh downloads the canonical
datanommer parquet dataset from
Hatlas password-protected URLs into a hive-partitioned directory
layout for use with DuckDB et al. If that's all mumbo-jumbo to you, see duckdb.md for
some examples of how to work with this data.
If you don't yet have a Hatlas account, visit us in #data on Matrix.
The download script tries to act as a sort of "download manager", resuming interrupted downloads and
allowing incremental updates. Note that while the messages table never changes, the users and
packages tables do, so the script will re-download those tables as needed.
Data can be downloaded:
- Per month:
2022-05 - Per year:
2022 - In its entirety:
all
| Dataset | Approx. Size |
|---|---|
| All | 100 Gb (as of 2026-02) |
| 2012 | 0.01 Gb |
| 2013 | 0.3 Gb |
| 2014 | 3.0 Gb |
| 2015 | 4.8 Gb |
| 2016 | 5.9 Gb |
| 2017 | 4.5 Gb |
| 2018 | 5.6 Gb |
| 2019 | 8.0 Gb |
| 2020 | 11 Gb |
| 2021 | 13 Gb |
| 2022 | 5.3 Gb |
| 2023 | 6.3 Gb |
| 2024 | 9.5 Gb |
| 2025 | 12 Gb |
Logins required
For GDPR compliance, access to this data must be restricted to verified Fedorans. Hatlas has a login system very similar to Fedora Accounts (FAS), and you must have a Hatlas account to access this data.
The technical details of how this login system works is called "OIDC Device Flow", and it's quite a
pain to use manually, but fortunately a tool called
oidc-agent handles all the details for us.
Just like ssh-agent, the general process is:
- Run the agent in the background
- Sign in using the tools. They store your login details in the agent.
- When programs like
curlwant to download data, they get the keys from the agent.
YOLO setup (just go!)
Install
curl https://forge.fedoraproject.org/fdwg/datanommer-parquet-download/raw/branch/main/yolo.sh | bash
Download some 2024 parquet
curl https://forge.fedoraproject.org/fdwg/datanommer-parquet-download/raw/branch/main/get_dn_canonical.sh \
| bash -s -- -d 2024
Now see duckdb.md for querying.
OHNO setup (with enhanced carefuling)
1: Install oidc-agent
# Minimum
sudo dnf install oidc-agent-cli
# Highly recommended if you're on a graphical system!
sudo dnf install oidc-agent-desktop
For other platforms see the oidc-agent documentation.
2: Start the agent
eval `oidc-agent-service use`
Note: you'll need to do this in each terminal session. I highly recommend you add this to
~/.zshrc or whatever your inferior equivalent is.
3: Log in to Hatlas
oidc-gen \
--issuer https://auth.hatlas.mwinters.net/realms/hatlas \
--client-id www-download \
--client-secret "" \
--flow device \
--scope "openid profile email offline_access" \
--redirect-uri "edu.kit.data.oidc-agent:/redirect" \
hatlas-dl
This command does three things:
- It configures your
oidc-agentwith a "client" namedhatlas-dl. This is like creating a container for your key. - It prompts you to log into your Hatlas account in a web browser and enter a code, just like logging into a streaming video provider. This issues you a key to use for the downloads.
- After successful login, it encrypts the key using whatever password you provide, and saves the
encrypted key in the container. (Usually under
~/.config/oidc-agent/.)
The password you set doesn't have to match anywhere else -- it's only for accessing these keys on your computer.
Download some parquet already
Now you're ready to go! As long as you use these keys at least once every 40 days, you should not need to log into Hatlas again. Every use will "refresh" the keys for another 40 days.
1: Load the key into memory
oidc-add hatlas-dl
This step uses your password from the setup phase to decrypt the key and load it into memory. You'll have to enter your password the first time you use the key, and then for any subsequent uses the key will stay decrypted until you reboot or explicitly tell the agent to unload the key.
Note: If you need to fully automate this step to avoid the need for local passwords, e.g. for use
with cron, the oidc-agent manual and website can tell
you how.
2: Download some parquet already!!
Ok, fine, calm down! Just run the script from the directory where you want the parquet files to be written.
# Download "the current year"
./get_dn_canonical.sh
# Download "the current year" some more (maybe a month later)
./get_dn_canonical.sh
# Download a specific year
./get_dn_canonical.sh -d 2024
# Download a specific month
./get_dn_canonical.sh -d 2024-03
# Download the full dataset back to 2012 (roughly 110Gb)
./get_dn_canonical.sh -d all
3: What now?
For a suggestion, see: duckdb.md.