Register a Key Project Document
Source:R/dl_project_attach_document.R
dl_project_attach_document.RdRegisters a pointer to a key project document (e.g. the survey document, SOW,
or analysis context) in the project's documents list. Only a pointer is
stored — name, url, and drive_id — since the document's content is
accessed through the project's vector store, not the datalake.
Usage
dl_project_attach_document(
type,
url,
name = NULL,
project = dl_get_project(),
env = "prod"
)Arguments
- type
Character. The document slot, e.g.
"survey","sow","analysis_context". Any string is accepted.- url
Character. A Google Drive ID or URL for the document.
- name
Character. Optional display name. If
NULL(default), the file name is resolved from Google Drive.- project
Character. Project ID to load from S3. Defaults to
dl_get_project(). Must refer to an existing project initialized withdl_project_init().- env
Datalake environment (
"prod"or"test"). Default"prod".
Details
The document also becomes openable through the dl_link accessor, labelled
as "<Type>/<file name>" (e.g. "Survey/[SHARED] AAA Survey FINAL").
Common types ("survey", "sow", "analysis_context", "premortem") get
a friendly label; any other type is allowed and used as-is.
Examples
if (FALSE) { # \dontrun{
dl_project_attach_document("survey", "https://docs.google.com/document/d/1sZVw7.../edit")
dl_project_attach_document("sow", "1w4Uh602reWkVQdiR5754xXTh0OITjJ07uTBW6xsC8-w")
dl_project_attach_document("analysis_context", "https://drive.google.com/file/d/1abc/view",
name = "Analysis brief")
} # }