data_add()
Add an existing file to the data catalog and record its hash.
Usage
data_add(
file_path: str | Path,
name: str | None = None,
type: str | None = None,
delimiter: str = 'comma',
locked: bool = True,
update_config: bool = True,
) -> dict[str, Any]
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| file_path required | str | Path |
The file to add. It must exist. |
|
| name | str | None | None |
Catalog name. Default: from the folder ( |
| type | str | None | None |
File type. Default: from the extension. |
| delimiter | str | 'comma' |
Delimiter for CSV files. |
| locked | bool | True |
Whether later reads must find the file unchanged. |
| update_config | bool | True |
Write the entry to the settings, not just framework.db. |
Value
The catalog entry. Its path is relative to the project root, so the project still works after it is moved or cloned.