get_mart_table | R Documentation |
get_mart_table allows the programmer to retrieve a data table from a CLESSN data mart.
get_mart_table(table_name, credentials, data_filter = list(), nbrows = 0)
table_name |
The name of the table to retrieve from the warehouse without the 'chlub_tables_mart' prefix |
credentials |
The hublot credentials obtained from the hublot:: |
data_filter |
a filter on the data to be selected in the query |
nbrows |
Optional argument If nbrows is greater than 0, the dataframe returned will be limited to nbrows observations. This is particularly useful when trying to see if there are records in a table and what how structured they are. If nbrows is omitted, then all rows of the table are returned |
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")
)
# gets the entire datamart political_parties_press_releases_freq
datamart <- clessnverse::get_mart_table(
table_name = 'political_parties_press_releases_freq',
data_filter = list(),
credentials = credentials)
# gets the first 10 rows of the warehouse table 'political_parties_press_releases_freq'
datamart <- clessnverse::get_mart_table(
table_name = 'political_parties_press_releases_freq',
data_filter = list(),
credentials = credentials,
nbrows=10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.