commit_mart_row | R Documentation |
commit_mart_row(
table_name,
key,
row = list(),
refresh_data = FALSE,
credentials
)
table_name |
The name of the data mart table to write an observation to without the 'chlub_tables_mart' prefix. |
key |
A character string containing the unique primary key of this observation in the table. Data integrity of the CLESSN data model is maintained by having a unique key per observation in each table. |
row |
A named list containing the observation to write to the datamart table. The names of the list are the columns of the table. |
refresh_data |
Logical. |
credentials |
The hublot credentials obtained from the hublot::get_credentials function |
returns a dataframe containing the data warehouse table with a JSON attribute as well as a document.id and creation & update time stamps
## Not run:
# connect to hublot
credentials <- hublot::get_credentials(
Sys.getenv("HUB3_URL"),
Sys.getenv("HUB3_USERNAME"),
Sys.getenv("HUB3_PASSWORD")
)
clessnverse::commit_mart_row(
table_name = "political_parties_press_releases_freq",
key = "QS212022",
row = list(week_num=21, count=6, political_party="QS"),
mode = "refresh",
credentials = credentials)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.