Guides
Put data into the data lake
How an admin uploads files, folders and archives to staging, arranges them into folders, checks the result before it is added, adds them to the data lake and grants roles.
On this page
This guide is for admins. You upload files to staging, arrange them into the folder structure you want, add them to the data lake, and then grant roles on what you added. Names, paths and numbers here are examples.
-
Step 1: Open Staging
Open [Staging] on the [Data lake] screen.
-
Step 2: Upload
Drop files, folders or archives onto the tree, or pick them with [Upload]. An archive is extracted as soon as its upload finishes.
-
Step 3: Arrange the paths
Make folders with [New folder], then move and rename items until the structure is the one the data lake should have.
-
Step 4: Add
Select one folder and press [Add to the data lake…]. Read what the dialog says the add would do, then press [Add].
-
Step 5: Grant roles
In [Source data], tick the roles for the folder you added and press [Apply]. Until then a path without roles is visible to admins only.
The sections below take these steps in order.
Staging
Staging is where uploaded files, folders and archives wait, and where you check them, before they are added to the data lake. Only admins can use it; researchers cannot see it. All admins share one staging, and each item records who uploaded it. Staging is not the data lake, so anything you delete there is gone for good.
Open [Staging] on the [Data lake] screen. At the top are the [Upload] and [New folder] buttons and a usage bar. The first row of the tree below is always “Top of staging”. When you open the screen only that row is selected, and the right pane shows an overview: use, room left and how to use staging. No other item is selected for you.
- Expiry. Each item at the top of staging (a file or a folder) is deleted, with everything in it, 7 days after its last change. The row of a top item says when; rows inside a folder show no time. Any change inside a top item starts its 7 days again. A change is an upload, an extraction, a new folder, a rename, a move, or deleting or adding to the data lake something inside the item. Listing and previewing are not changes.
- Room. Staging has a limit. What you can still upload is “Room left” in the overview. Staging shares its storage with the source data and the work folders, so this can be less than the limit minus the use.
The place
[New folder], an upload and a paste all go to the same folder, which this guide calls the place. What you have selected decides it.
- With the “Top of staging” row selected, or with nothing selected, it is the top.
- With a folder or a table selected, it is inside that folder or table.
- With one file selected, it is the folder that holds the file.
- With several items selected, it is the folder that holds the item you selected last.
The screen always names the place. The first line of the [Upload] menu reads “Upload to: …”, and the name field of a new folder stands under the place.
Upload
Press [Upload] to choose “Upload files…” or “Upload a folder…”. What you pick goes to the place. You can also drop files, folders and archives from your computer onto the screen.
- Dropped on a folder row, they go into that folder.
- Dropped on the “Top of staging” row or on the empty part of the tree, they go to the top.
When you upload several files or folders at once to the top, they are put into one new folder, and the menu says so. The new folder is named after the time of the upload, or after the folder you chose in [Source data] if you uploaded from there. It is one item, so you can add it to the data lake in one go.
An archive (zip, tar, tar.gz, tar.bz2, tar.xz) that is itself one of the items you uploaded is extracted right after the upload. It goes into a new folder beside the archive (when the archive holds one top folder, that folder is the result), and the archive is deleted once it is extracted. The extracted folder is then selected, and the right pane shows how many files were extracted, what was skipped and the encoding the names were read as. An archive inside an uploaded folder stays a file; extract it with [Extract] below if you need it.
Each upload has one line with the total of files and bytes, the speed (for example 12.3 MiB/s) and the time left. Press [Stop] to stop it while it runs. An upload larger than the room left does not start, and the line says why. Many small files upload faster zipped. If you try to leave the screen before an upload has finished, the app asks first, and leaving stops the upload. Keep this screen open while a large upload runs.
You can also start from [Source data]. Select a folder there and press [Upload files] or [Upload folder], or drop onto the folder. The files go to the top of the same staging, and the screen shows “Add into” with that folder. The path in the add dialog then starts from it: the folder itself when several items were put into one new folder, otherwise the folder plus the item's name.
Make a folder, rename
Press [New folder]. The place opens, and its first row holds a folder icon and an input field. Type a name and press Enter to make the folder. Esc, leaving the field, or an empty name cancels: nothing is made and the row goes away. If the name is taken, or the data lake would refuse it, the folder is refused, and the row and your text stay so that you can fix the name.
Renaming works the same way. Select an item and press F2; its row turns into an input, Enter renames and Esc cancels. A name the data lake refuses (a space at either end, or ..) is listed in the right pane, and you cannot add the item until you rename it. Select a name in that list to go to the item.
Select several items
You select as in a file explorer. An action applies to everything you selected. If you select a folder and something inside it, only the outer folder counts.
| To do this | Do this |
|---|---|
| Select one item | Click |
| Add or remove one item | Ctrl or Cmd and click |
| Select a range | Shift and click |
| Select all siblings in the folder | Ctrl or Cmd and A |
| Move the selection, extend it | Arrow keys, Shift and arrow keys |
| Select rows that are not next to each other | Ctrl or Cmd and arrow keys to move only the focus, then Ctrl or Cmd and Enter |
| Open or close a folder | Double-click its row |
| Rename | F2 |
| Cut, paste | Ctrl or Cmd and X, V |
| Delete | Delete |
| Open the menu | Right-click, Shift+F10, or the menu key |
Move items
Everything you selected moves in one go, and a move is one command for all of it, not one per item. If any item cannot move, none moves. A move is refused if the target already has an item of the same name, or if you try to move a folder into itself or below itself. There are three ways.
- Drag and drop. Drag the selected rows onto a folder row, the “Top of staging” row or the empty part of the tree. Dragging a selected row moves everything selected; dragging a row that is not selected moves only that row.
- Cut and paste. Select items and press Ctrl+X (Cmd+X on a Mac); the cut rows are dimmed. Press Ctrl+V on a folder row to move them into it, on a file row to move them into the folder that holds it, or on the “Top of staging” row to move them to the top. While something is cut, a [Paste] button also appears. Esc cancels the cut.
- [Move…]. Press [Move…] in the right pane and choose the target folder in the folder tree.
The moved items stay selected at their new paths.
Delete
Select items and press Delete (Backspace on a Mac also works), or press [Delete] in the right pane. A dialog asks you to confirm. It says how many items there are and shows the first few, and it warns that staging is not the data lake, so a deletion cannot be undone. When you confirm, everything selected is deleted at once. A deletion always asks first.
The right-click menu
Right-click an item, or press Shift+F10 or the menu key, to open a menu. If the row you clicked is among the selected items, the menu acts on all of them; otherwise it acts on that row, which becomes the selection. The items come in this order, and only those that apply appear.
“Add to the data lake…” (one item), “Extract” (one archive), “New folder”, “Upload files…”, “Upload a folder…”, “Rename” (one item), “Cut”, “Paste” (when something is cut and can be pasted there), “Move…”, and, below a divider, “Delete”.
On the “Top of staging” row and on the empty part of the tree, the menu holds only “New folder”, the two uploads and “Paste”. The menu is a shortcut: everything in it can also be done from the buttons on the screen. Only “Cut” has no button of its own (use Ctrl+X); the same move can be made with [Move…] in the right pane.
The right pane, previews, extracting
With one item selected, the right pane shows its path, kind, size, who uploaded it and when, and when it expires. If it holds empty folders it counts them; empty folders are not added to the data lake. The buttons are [Add to the data lake…] (the filled button on the screen), [Extract] for an archive, [Rename], [Move…] and [Delete]. With several items selected it shows “N selected” with [Move…] and [Delete].
- [Preview]. Select a table, or a file of a format that can be previewed, and [Preview] appears at the top of the right pane, next to the path. Press it to see an image, text or a table. It does not open until you press it, and each time you view the content it is recorded in the audit log.
- [Extract]. It extracts into a new folder beside the archive. In the dialog, “Delete the archive once extracted” is ticked by default, and the dialog shows the room the extraction needs (or the size of the archive, when that cannot be known beforehand) and the room left. Press [Extract] and the dialog closes; a line like an upload's shows “Extracting” and [Stop]. When it is done, the right pane shows the number of files and folders extracted, what was skipped and why, and the encoding the names were read as. Rename any name that was read wrong.
Add to the data lake
Select the one item to add and press [Add to the data lake…]. One add is one item. To add several, put them into one folder first and add that folder.
The dialog has one data lake path. It starts at the path the item has in staging. If you arranged a folder as /ct_2025/chest in staging, the path starts as /ct_2025/chest in the data lake. A table is added below /tables so that workspaces can show it as a DuckDB view, so a table that is not below /tables starts at /tables/<table name>. Type another path, or choose a folder in the tree below it; choosing a folder makes the path that folder plus the last name of the current path.
When it opens and each time you change the path, the dialog says what would happen before anything is added.
- New or merged. Either a new path in the data lake, or a merge into the path that is there. For a merge it says how many files at the same paths are replaced. The old version of a replaced file stays in the stored history. When one file goes in under a folder, the path it will really have is shown too.
- Who can read it at once. The roles granted on that path and the roles inherited from a folder above it, each inherited one with the folder it comes from. If there is no role, it says that only admins can read it until roles are granted.
- Grants below. If paths below carry grants of their own, it says how many; some files can be read by more people.
- Workspaces that get it at once. How many workspaces chose data that overlaps this path and get the files their owner may read.
- What would be refused. Names the data lake refuses are listed above the path field and [Add] is blocked. Select a name in the list to go to that item in staging, rename it, and try again. An empty folder, a path conflict or too little storage room is shown below the path field as a sentence, in place of the lines above, and [Add] is blocked then too.
While the dialog checks, [Add] is blocked. If it cannot check beforehand, it says so but does not block [Add]; the add does the same check again. When [Add] is blocked, hover over it to read the reason. It is also blocked while the path field is empty. The command that will run is shown at the bottom of the dialog.
The dialog stays open until the add is done. Then it closes, “Top of staging” is selected, and the top of the right pane shows “Added to the data lake:” with the path, “What was added left staging.” and [Show in source data].
Grant roles
Until a role is granted on the path you added, only admins can see it. After the add, press [Show in source data] in the right pane, or open [Source data] and select the folder you added. Then tick the roles and press [Apply]. Only people with a ticked role can see it, and a role on a folder applies to everything below it. You can also add a role to a single file.
In a terminal
Every action on the screen is a command, and the console shows it as it runs. The same work can be done from a terminal. Staging paths are written like data lake paths. The example assumes an archive scans.zip and a folder clinical at the top of staging.
lake staging extract /scans.zip --remove-archive lake staging mkdir /ct_2025 lake staging mv /scans /clinical /ct_2025 lake staging rename /ct_2025/clinical meta lake add-preview staging:/ct_2025 /images/ct_2025 lake add staging:/ct_2025 /images/ct_2025 lake grant /images/ct_2025 ct_researchThe move command takes several paths before the target folder, and moves all of them or none. The delete command also takes several paths. What an add would do is answered by a read-only command (lake add-preview). Only admins can run it, it changes nothing, and it does not run inside a workspace. The add dialog shows the answer of this command as it is.
Output (example)
$ lake add-preview staging:/vitals_2025 /tables/vitalsPath: /tables/vitalsFiles: 2 (492 B)In the lake: already there; 1 file would be replacedRead at once by: ehr_basic, ehr_fullWorkspaces: ws-0007 In the output, “Read at once by” lists the roles that can read it as soon as it is added, and “Workspaces” lists the workspaces that get the files at once. Every command and argument is in the CLI reference.