change_lake_items_metadata | R Documentation |
Batch changes of metadata can be usefule if there are hunderds or thousands of objects in the data lake which we need to change the metadata on.
change_lake_items_metadata(path, filter, new_metadata, mode, credentials)
path |
The path in the data lake which the objects are in |
filter |
A filter used to select the objects in the data lake which the metadata needs to be changed on. |
new_metadata |
A list type objects containing the new metadata to be applied on the lake objects. |
mode |
The mode to apply the metadata with. Can take the following values:
|
credentials |
A list object containing your Hublot credential. |
# To be documented
## Not run:
# get credentials from hublot
credentials <- hublot::get_credentials(
Sys.getenv("HUB3_URL"),
Sys.getenv("HUB3_USERNAME"),
Sys.getenv("HUB3_PASSWORD")
)
# filter for selecting the lakes items to be changed
filter <- list(
path = "political_party_press_releases",
metadata__political_party = "CAQ",
metadata__province_or_state="QC",
metadata__country="CAN",
metadata__storage_class="lake"
)
# new metadata
# Change the metadata on the lake items complying with the filter
clessnverse::change_lake_items_metadata(
path = "political_party_press_releases",
filter = list(
metadata__province_or_state="QC",
metadata__country="CAN",
metadata__political_party="QS"
),
new_metadata = list(
"tags": "elxn-qc2022, vitrine_democratique, polqc",
"format": "html",
"source": "https://pq.org/nouvelles/lettre...",
"country": "CAN",
"description": "Communiqués de presse des partis politiques",
"object_type": "raw_data",
"source_type": "website",
"content_type": "political_party_press_release",
"storage_class": "lake",
"political_party": "PQ",
"province_or_state": "QC"
),
mode = "merge",
credentials = credentials
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.