hydromt.data_catalog.DataCatalog.from_dict#
- DataCatalog.from_dict(data_dict: Dict[str, Any], catalog_name: str = '', catalog_version: str | None = None, root: str | Path | None = None, category: str | None = None, mark_used: bool = False) DataCatalog [source]#
Add data sources based on dictionary.
- Parameters:
data_dict (
dict
) – Dictionary of data_sources.catalog_name (
str
, optional) – Name of data catalogroot (
str
,Path
, optional) – Global root for all relative paths in data_dict.category (
str
, optional) – Global category for all sources in data_dict.mark_used (
bool
) – If True, append to used_data list.
Examples
A data dictionary with two entries is provided below, where all the text between <> should be filled by the user. See the specific data adapters for more information about the required and optional arguments.
{ <name1>: { "path": <path>, "data_type": <data_type>, "driver": <driver>, "data_adapter": <data_adapter>, "uri_resolver": <uri_resolver>, "metadata": {...}, "placeholders": {<placeholder_name_1>: <list of names>}, } <name2>: { ... } }