Skip to contents

Adds or updates a web link (e.g., a dashboard, Notion page, shared folder, or document) within a Project object stored in S3. Each link is stored as a simple character string under the provided name key.

Usage

dl_project_attach_link(
  url,
  name = url,
  project = dl_get_project(),
  env = "prod"
)

Arguments

url

Character. The URL to attach. Must start with "http://" or "https://" and be a valid web link.

name

Character. A short, descriptive key under which the link will be stored, such as "dashboard", "stimuli_drive", "client_notebook", or "proposal_link". This parameter is required.

project

Character. Project ID to load from S3. Defaults to dl_get_project(). Must refer to an existing project initialized with dl_project_init().

env

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

Value

The updated Project object (invisibly).

Details

If the project does not exist in S3, an error is raised instructing the user to initialize it first with dl_project_init().

If a link with the same name already exists and no changes are detected, the function confirms that the project is already in sync.

Examples

if (FALSE) { # \dontrun{
dl_project_attach_link(
  url = "https://docs.google.com/spreadsheets/d/12345abcde",
  name = "field_report"
)

dl_project_attach_link(
  url = "https://notion.so/acme/proposal",
  name = "proposal",
  project = "genie"
)
} # }