Skip to contents

Updates one or more metadata fields of an existing Project object stored in S3. Useful for editing attributes such as client, end_client, industry, region, or adding document/link lists.

Usage

dl_project_update_fields(..., project = dl_get_project(), env = "prod")

Arguments

...

Named field-value pairs to update within the Project object. Supported fields correspond to those in the Project R6 class:

  • title — Human-readable project title; taken from DESCRIPTION$get("Title").

  • created_on — Creation date; a Date object or string convertible via as.Date().

  • project_type — Either "client" or "internal". Default "client".

  • client — The immediate client name, if applicable.

  • end_client — The end client (for projects done on behalf of an agency).

  • industry — The project's industry (e.g., "CPG", "Finance", "Tech").

  • region — The region or market scope (e.g., "US", "EU", "Global").

  • git_path — Full Git path to the project's source (e.g. "packages/g6tr.projects/vignettes/2025-08-01_fever").

  • monorepo_path — Path to the project's S3 prefix (from DESCRIPTION$get("cloudfs.s3")).

  • google_drive_id — Google Drive folder ID (ID or URL; stored as ID).

  • google_drive_r_id — Google Drive subfolder ID for R outputs (ID or URL).

  • vector_store_id — OpenAI vector store ID for the project's Workspace context.

  • surveys — A tibble with columns wave, type, external_id, and data.

  • links — A list of relevant project links (e.g., Crunch URL).

  • crunch — A list of Crunch-related project information.

  • models — A list of models-related project information.

  • notes — Free-form project notes (character).

  • other — A list containing any additional project objects.

Fields DESCRIPTION, project, and last_modified cannot be modified through this function. Undeclared fields (not part of the Project class) are allowed with a warning — handy for stashing an ad-hoc field without bumping the package. They are stored and carried across reads by dl_project_rehydrate(), but are not type-checked.

project

Character. Project ID to load from S3. Defaults to dl_get_project().

env

Datalake environment ("prod" or "test"). Default "prod".

Value

The updated Project object (invisibly).

Examples

if (FALSE) { # \dontrun{
# Update a few scalar fields
dl_project_update_fields(
  title = "Johnson Controls Thought Leadership Study",
  client = "Co:collective"
)

} # }