Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BugReports: https://github.com/The-Strategy-Unit/nhp_outputs/issues
Depends:
R (>= 4.1.0)
Imports:
azkit,
azkit (>= 0.3.0),
Comment thread
tomjemmett marked this conversation as resolved.
AzureStor,
bs4Dash,
cachem,
Expand Down
20 changes: 5 additions & 15 deletions R/fct_get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,12 @@ get_params <- function(r) {
}

get_model_run_from_ats <- function(dataset, model_run_id) {
token <- azkit::get_auth_token()

table_endpoint <- Sys.getenv("AZ_TABLE_EP")
table_name <- glue::glue(
"{Sys.getenv('AZ_TABLE_NAME')}(PartitionKey='{dataset}',RowKey='{model_run_id}')"
azkit::read_azure_table_single_entity(
Sys.getenv("AZ_TABLE_NAME"),
dataset,
model_run_id,
Sys.getenv("AZ_TABLE_EP"),
Comment thread
tomjemmett marked this conversation as resolved.
Outdated
)

httr2::request(table_endpoint) |>
httr2::req_url_path(table_name) |>
httr2::req_auth_bearer_token(token$credentials$access_token) |>
httr2::req_headers(
Accept = "application/json;odata=nometadata",
`x-ms-version` = "2019-02-02"
) |>
httr2::req_perform() |>
httr2::resp_body_json()
}
Comment thread
tomjemmett marked this conversation as resolved.

get_results_from_azure <- function(filename) {
Expand Down
Loading