From c99a573fdf432e72933edbed13e4e30941dfe294 Mon Sep 17 00:00:00 2001 From: Mason <33527785+masonchain@users.noreply.github.com> Date: Mon, 21 Nov 2022 14:32:08 -0600 Subject: [PATCH 1/7] JS Update entry point path Hey there Flipside gang! I was working on a little side project that uses ShroomDK and ran into some issues with importing the module. In my node modules, the index of the package is found in @flipsidecrypto/sdk/dist/src/index.js, but the base package.json has the main and type entry points as just dist/index.js. Making the change I've proposed solves the issue in my case. I'm not entirely sure if this is a common issue for people as I did not find anyone else mentioning it in #sdk-help, but figured I would raise this issue if others are indeed facing the same problem. --- js/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/package.json b/js/package.json index f357d9e..0d69b8a 100644 --- a/js/package.json +++ b/js/package.json @@ -2,8 +2,8 @@ "name": "@flipsidecrypto/sdk", "version": "1.1.1", "description": "The official Flipside Crypto SDK", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "repository": { "type": "git", "url": "https://github.com/flipsidecrypto/sdk.git" From ced4165f21f7ba1b8f1676e2fb617c9cc7ba60ac Mon Sep 17 00:00:00 2001 From: "Carlos R. Mercado" <107061601+charlieflipside@users.noreply.github.com> Date: Mon, 8 May 2023 11:07:37 -0400 Subject: [PATCH 2/7] New function for checking status --- r/shroomDK/R/get_query_status.R | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 r/shroomDK/R/get_query_status.R diff --git a/r/shroomDK/R/get_query_status.R b/r/shroomDK/R/get_query_status.R new file mode 100644 index 0000000..3938d81 --- /dev/null +++ b/r/shroomDK/R/get_query_status.R @@ -0,0 +1,51 @@ +library(jsonlite) +library(httr) + +#' Get Query ID Status +#' +#' Uses Flipside ShroomDK to access the status of a query run id from `create_query_token()` +#' @param query_run_id queryRunId from `create_query_token()`, for token stored as `x`, use `x$result$queryRequest$queryRunId` +#' @param api_key Flipside Crypto ShroomDK API Key +#' @param api_url default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user. +#' @return returns a request object, you can use $status_code to check if it is a successful 200 code. +#' @import jsonlite httr +#' @export +#' +#' @examples +#' \dontrun{ +#' query = create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10000", api_key) +#' get_query_status(query$result$queryRequest$queryRunId, api_key) +#' } +get_query_status <- function(query_run_id, api_key, + api_url = "https://api-v2.flipsidecrypto.xyz/json-rpc"){ + + headers = c( + "Content-Type" = 'application/json', + "x-api-key" = api_key + ) + + # get status of a run id + request_status_body <- as.character( + jsonlite::toJSON(pretty = TRUE, + list( + "jsonrpc" = "2.0", + "method" = "getQueryRun", + "params" = list( + list( "queryRunId" = query_run_id + ) + ), + "id" = 1 + ), + auto_unbox = TRUE + ) + ) + + return( + content( + httr::POST( + api_url, + config = httr::add_headers(.headers = headers), + body = request_status_body) + ) + ) +} From 3281021c7e9d82c477e65af7308c19390ae5ffb5 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mercado" <107061601+charlieflipside@users.noreply.github.com> Date: Mon, 8 May 2023 14:09:39 -0400 Subject: [PATCH 3/7] Updating to page_size 1000 --- r/shroomDK/R/clean_query.R | 12 ++-- r/shroomDK/R/get_query_from_token.R | 105 +++++++++++++++++----------- r/shroomDK/R/get_query_status.R | 2 +- 3 files changed, 71 insertions(+), 48 deletions(-) diff --git a/r/shroomDK/R/clean_query.R b/r/shroomDK/R/clean_query.R index 7bdb550..dd8dcd9 100644 --- a/r/shroomDK/R/clean_query.R +++ b/r/shroomDK/R/clean_query.R @@ -20,8 +20,8 @@ #' #' @examples #' \dontrun{ -#' query = create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10000", api_key) -#' request = get_query_from_token(query$token, api_key, 1, 10000) +#' query = create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 1000", api_key) +#' request = get_query_from_token(query$result$queryRequest$queryRunId, api_key) #' clean_query(request, try_simplify = FALSE) #' } clean_query <- function(request, try_simplify = TRUE){ @@ -44,13 +44,13 @@ clean_query <- function(request, try_simplify = TRUE){ # start data reformat # this is a matrix/array - data <- t(list2DF(request$results)) - colnames(data) <- request$columnLabels + data <- t(list2DF(request$result$rows)) + colnames(data) <- request$result$columnNames rownames(data) <- NULL # Protects NULL values - for(i in 1:ncol(data)){ - data[, i] <- fill_null(data[, i]) + for(j in 1:ncol(data)){ + data[, j] <- fill_null(data[, j]) } # data frame of Lists diff --git a/r/shroomDK/R/get_query_from_token.R b/r/shroomDK/R/get_query_from_token.R index c11d22a..854121e 100644 --- a/r/shroomDK/R/get_query_from_token.R +++ b/r/shroomDK/R/get_query_from_token.R @@ -8,10 +8,12 @@ library(httr) #' while . Note: To reduce payload it returns #' a list of outputs (separating column names from rows). #' -#' @param query_token token from `create_query_token()` +#' @param query_run_id queryRunId from `create_query_token()`, for token stored as `x`, use `x$result$queryRequest$queryRunId` #' @param api_key Flipside Crypto ShroomDK API Key -#' @param page_number Query tokens are cached and 100k rows max. Get up to 1M rows by going through pages. -#' @param page_size Default 100,000. Paginate via page_number. +#' @param page_number Results are cached, max 30MB of data per page. +#' @param page_size Default 1000. Paginate via page_number. May return error if page_size causes data to exceed 30MB. +#' @param result_format Default to csv. Options: csv and json. +#' @param api_url default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user. #' @return returns a request of length 8: `results`, `columnLabels`, #' `columnTypes`, `startedAt`, `endedAt`, `pageNumber`, `pageSize`, `status` #' @import jsonlite httr @@ -19,53 +21,74 @@ library(httr) #' #' @examples #' \dontrun{ -#' query = create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10000", api_key) -#' get_query_from_token(query$token, api_key, 1, 10000) +#' query = create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 1000", api_key) +#' get_query_from_token(query$result$queryRequest$queryRunId, api_key, 1, 1000) #' } -get_query_from_token <- function(query_token, api_key, page_number = 1, page_size = 100000){ +get_query_from_token <- function(query_run_id, api_key, + page_number = 1, + page_size = 1000, + result_format = "csv", + api_url = "https://api-v2.flipsidecrypto.xyz/json-rpc"){ - headers = c( - "Accept" = 'application/json', - "Content-Type" = 'application/json', - "x-api-key" = api_key - ) - url = paste0( - "https://node-api.flipsidecrypto.com/queries/", - query_token,"?", - "pageNumber=", page_number, "&", - "pageSize=", format(page_size, scientific = FALSE) # just in case user's R settings force 100,000 -> 1e+05 which breaks API. - ) + query_status <- get_query_status(query_run_id = query_run_id, api_key = api_key, api_url = api_url) + query_state <- query_status$result$queryRun$state - req <- httr::GET( - url = url, - config = httr::add_headers(.headers = headers) - ) +# implicit else for "QUERY_STATUS_SUCCESS" + if(query_state == "QUERY_STATE_FAILED"){ + stop(query_status$result$queryRun$errorMessage) + } else if(query_state == "QUERY_STATE_CANCELED"){ + stop("This query was canceled, typically by cancel_query()") + } else if(query_state != "QUERY_STATE_SUCCESS"){ + warning("Query in process, checking again in 5 seconds") + Sys.sleep(5) + # run it back + return( + get_query_from_token(query_run_id = query_run_id, + api_key = api_key, + page_number = page_number, + page_size = page_size, + result_format = result_format, + api_url = api_url + ) + ) + } else { - request <- content(req, as = 'parsed') - - if(is.null(request$status) & !is.null(request$errors)){ - stop(request$errors) } - # if running give it a few seconds - # this won't count as a re-request as long as cache intact - if(request$status == 'running'){ - Sys.sleep(5) - warning("Query is still running! Trying again shortly") - return( - get_query_from_token(query_token, api_key, page_number, page_size) + headers = c( + "Content-Type" = 'application/json', + "x-api-key" = api_key ) - } else if(request$status == 'finished') { - return(request) + request_data <- as.character( + jsonlite::toJSON(pretty = TRUE, + list( + "jsonrpc" = "2.0", + "method" = "getQueryRunResults", + "params" = list( + list( + "queryRunId" = query_run_id, + "format" = result_format, + "page" = list( + "number" = page_number, + "size" = page_size + ) + ) + ), + "id" = 1 + ), + auto_unbox = TRUE + ) + ) - } else { - return( - paste0("Request not running nor finished, see status code: ", - request$status)) - } - - return(request) + return( + content( + httr::POST( + api_url, + config = httr::add_headers(.headers = headers), + body = request_data) + ) + ) } diff --git a/r/shroomDK/R/get_query_status.R b/r/shroomDK/R/get_query_status.R index 3938d81..c6147bf 100644 --- a/r/shroomDK/R/get_query_status.R +++ b/r/shroomDK/R/get_query_status.R @@ -7,7 +7,7 @@ library(httr) #' @param query_run_id queryRunId from `create_query_token()`, for token stored as `x`, use `x$result$queryRequest$queryRunId` #' @param api_key Flipside Crypto ShroomDK API Key #' @param api_url default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user. -#' @return returns a request object, you can use $status_code to check if it is a successful 200 code. +#' @return returns request content; for content `x`, use `x$result$queryRun$state` and `x$result$queryRun$errorMessage` #' @import jsonlite httr #' @export #' From bb944b1c19311eaf972672b51b769e80999383e1 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mercado" <107061601+charlieflipside@users.noreply.github.com> Date: Mon, 8 May 2023 14:09:55 -0400 Subject: [PATCH 4/7] Known issue on 10th page for 10,000 row queries ?? --- r/shroomDK/R/auto_paginate_query.R | 72 ++++++++++++++++++------------ 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/r/shroomDK/R/auto_paginate_query.R b/r/shroomDK/R/auto_paginate_query.R index 19db064..a6e3efe 100644 --- a/r/shroomDK/R/auto_paginate_query.R +++ b/r/shroomDK/R/auto_paginate_query.R @@ -1,47 +1,65 @@ +library(jsonlite) +library(httr) #' Auto Paginate Queries #' -#' @description Grabs up to maxrows in a query by going through each page 100k rows at a time. +#' @description Grabs up to maxrows in a query by going through each page to download one at a time. #' #' @param query The SQL query to pass to ShroomDK #' @param api_key ShroomDK API key. -#' @param maxrows Max rows allowed in ShroomDK, 1M at time of writing. -#' -#' @return data frame of up to 1M rows, see ?clean_query for more details on column classes. +#' @param page_size Default 1000. May return error if page_size is tool large and data to exceed 30MB. +#' @param page_count Default 1. How many pages, of page_size rows each, to read. +#' @param api_url default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user. +#' @return data frame of up to `page_size * page_count` rows, see ?clean_query for more details on column classes. +#' @import jsonlite httr #' @export #' @examples #' \dontrun{ #' pull_data <- auto_paginate_query(" #' SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10000", -#' api_key = readLines("api_key.txt")) +#' api_key = readLines("api_key.txt"), +#' page_count = 10) #' } -auto_paginate_query <- function(query, api_key, maxrows = 1000000){ +auto_paginate_query <- function(query, api_key, page_size = 1000, + page_count = 1, + api_url = "https://api-v2.flipsidecrypto.xyz/json-rpc"){ +browser() + qtoken <- create_query_token(query = query, + api_key = api_key, + ttl = 1, + mam = 10, + api_url = api_url) - qtoken <- shroomDK::create_query_token(query = query, api_key = api_key) - res <- shroomDK::get_query_from_token(qtoken$token, api_key = api_key) - df <- shroomDK::clean_query(res) + # read the first page + res <- get_query_from_token(qtoken$result$queryRequest$queryRunId, + api_key = api_key, + page_number = 1, + page_size = page_size, + result_format = "csv", + api_url = api_url) + df <- clean_query(res) # Handle Pagination via ShroomDK - # up to 1M rows max - # get 100,000 rows at a time - # stop when the most recent page < 100,000 items. - # otherwise stop at 1M total rows. - # NOTE: in the future, if we allow > 1M rows, will need to update this. - - maxpages = ceiling(maxrows/100000) - - if(nrow(df) == 100000){ + # if you got a full page immediately, keep going + if(nrow(df) == page_size){ warning("Checking for additional pages of data...") - for(i in 2:maxpages){ - temp_page <- clean_query( - shroomDK::get_query_from_token(qtoken$token, + for(i in 2:page_count){ + temp_page <- get_query_from_token(qtoken$result$queryRequest$queryRunId, api_key = api_key, - page_number = i) - ) + page_number = i, + page_size = page_size, + result_format = "csv", + api_url = api_url) - df <- rbind.data.frame(df, temp_page) + if(length(temp_page$result$rows) > 0){ + temp_page <- clean_query(temp_page) + } else { + temp_page <- data.frame() + } - if(nrow(temp_page) < 100000 | i == maxpages){ + df <- rbind.data.frame(df, temp_page) + + if(nrow(temp_page) < page_size | i == page_count){ # done return(df) @@ -52,6 +70,4 @@ auto_paginate_query <- function(query, api_key, maxrows = 1000000){ } else { return(df) } - - - } +} From 3834df9489d6cb32a9a0e572c81fdbcbe5bceb94 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mercado" <107061601+charlieflipside@users.noreply.github.com> Date: Tue, 9 May 2023 08:08:03 -0400 Subject: [PATCH 5/7] Page 2 issue fixed - everything works ignoring test file for now --- .gitignore | 1 + r/shroomDK/NAMESPACE | 1 + r/shroomDK/R/auto_paginate_query.R | 60 +++++++++++------------------- 3 files changed, 23 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index bdf7b3b..57ae38d 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ examples/python/scratch/* r/shroomDK_0.1.0.tar.gz python-sdk-example.py r/shroomDK/api_key.txt +r/shroomDK/test_of_page2_issue.R diff --git a/r/shroomDK/NAMESPACE b/r/shroomDK/NAMESPACE index 5212eab..3238d8a 100644 --- a/r/shroomDK/NAMESPACE +++ b/r/shroomDK/NAMESPACE @@ -4,5 +4,6 @@ export(auto_paginate_query) export(clean_query) export(create_query_token) export(get_query_from_token) +export(get_query_status) import(httr) import(jsonlite) diff --git a/r/shroomDK/R/auto_paginate_query.R b/r/shroomDK/R/auto_paginate_query.R index a6e3efe..ba356a4 100644 --- a/r/shroomDK/R/auto_paginate_query.R +++ b/r/shroomDK/R/auto_paginate_query.R @@ -16,58 +16,40 @@ library(httr) #' @examples #' \dontrun{ #' pull_data <- auto_paginate_query(" -#' SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10000", +#' SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10001", #' api_key = readLines("api_key.txt"), #' page_count = 10) #' } auto_paginate_query <- function(query, api_key, page_size = 1000, page_count = 1, api_url = "https://api-v2.flipsidecrypto.xyz/json-rpc"){ -browser() + qtoken <- create_query_token(query = query, api_key = api_key, ttl = 1, mam = 10, api_url = api_url) - # read the first page - res <- get_query_from_token(qtoken$result$queryRequest$queryRunId, - api_key = api_key, - page_number = 1, - page_size = page_size, - result_format = "csv", - api_url = api_url) - df <- clean_query(res) + res <- lapply(1:page_count, function(i){ + temp_page <- get_query_from_token(qtoken$result$queryRequest$queryRunId, + api_key = api_key, + page_number = i, + page_size = page_size, + result_format = "csv", + api_url = api_url) - # Handle Pagination via ShroomDK - # if you got a full page immediately, keep going - if(nrow(df) == page_size){ - warning("Checking for additional pages of data...") - for(i in 2:page_count){ - temp_page <- get_query_from_token(qtoken$result$queryRequest$queryRunId, - api_key = api_key, - page_number = i, - page_size = page_size, - result_format = "csv", - api_url = api_url) - - if(length(temp_page$result$rows) > 0){ - temp_page <- clean_query(temp_page) - } else { - temp_page <- data.frame() + if(length(temp_page$result$rows) < 1){ + df <- data.frame() + } else { + df <- clean_query(temp_page) } - - df <- rbind.data.frame(df, temp_page) - - if(nrow(temp_page) < page_size | i == page_count){ - # done - return(df) - - } else { - # continue - } - } - } else { return(df) - } + }) + + res <- res[unlist(lapply(res, nrow)) > 0] + + df <- do.call(rbind.data.frame, res) + + return(df) + } From c2bae9f1b5e91925af97914d2dc7ca4f236ab9cf Mon Sep 17 00:00:00 2001 From: "Carlos R. Mercado" <107061601+charlieflipside@users.noreply.github.com> Date: Tue, 9 May 2023 14:37:43 -0400 Subject: [PATCH 6/7] V 0.2.0 Uploaded to CRAN --- r/shroomDK/DESCRIPTION | 6 +-- r/shroomDK/NAMESPACE | 1 + r/shroomDK/R/cancel_query.R | 60 +++++++++++++++++++++++++ r/shroomDK/R/clean_query.R | 9 ++-- r/shroomDK/R/get_query_from_token.R | 15 +++---- r/shroomDK/R/get_query_status.R | 3 +- r/shroomDK/man/auto_paginate_query.Rd | 23 +++++++--- r/shroomDK/man/cancel_query.Rd | 33 ++++++++++++++ r/shroomDK/man/clean_query.Rd | 9 ++-- r/shroomDK/man/create_query_token.Rd | 18 +++++--- r/shroomDK/man/get_query_from_token.Rd | 34 +++++++++----- r/shroomDK/man/get_query_status.Rd | 32 +++++++++++++ r/shroomDK_0.2.0.tar.gz | Bin 0 -> 7186 bytes 13 files changed, 200 insertions(+), 43 deletions(-) create mode 100644 r/shroomDK/R/cancel_query.R create mode 100644 r/shroomDK/man/cancel_query.Rd create mode 100644 r/shroomDK/man/get_query_status.Rd create mode 100644 r/shroomDK_0.2.0.tar.gz diff --git a/r/shroomDK/DESCRIPTION b/r/shroomDK/DESCRIPTION index d5e7f9c..5caa861 100644 --- a/r/shroomDK/DESCRIPTION +++ b/r/shroomDK/DESCRIPTION @@ -1,10 +1,10 @@ Package: shroomDK Type: Package -Title: Accessing the Flipside Crypto ShroomDK REST API -Version: 0.1.1 +Title: Accessing the Flipside Crypto ShroomDK API +Version: 0.2.0 Author: Carlos Mercado Maintainer: Carlos Mercado -Description: Programmatic access to Flipside Crypto data via the REST API: . As simple as auto_paginate_query() but with core functions as needed for troubleshooting. +Description: Programmatic access to Flipside Crypto data via the Compass RPC API: . As simple as auto_paginate_query() but with core functions as needed for troubleshooting. Imports: jsonlite, httr License: MIT + file LICENSE Encoding: UTF-8 diff --git a/r/shroomDK/NAMESPACE b/r/shroomDK/NAMESPACE index 3238d8a..55e8b1d 100644 --- a/r/shroomDK/NAMESPACE +++ b/r/shroomDK/NAMESPACE @@ -1,6 +1,7 @@ # Generated by roxygen2: do not edit by hand export(auto_paginate_query) +export(cancel_query) export(clean_query) export(create_query_token) export(get_query_from_token) diff --git a/r/shroomDK/R/cancel_query.R b/r/shroomDK/R/cancel_query.R new file mode 100644 index 0000000..26e714a --- /dev/null +++ b/r/shroomDK/R/cancel_query.R @@ -0,0 +1,60 @@ +library(jsonlite) +library(httr) + +#' Cancel Query +#' +#' Uses Flipside ShroomDK to CANCEL a query run id from `create_query_token()`, as the new API uses warehouse-seconds to charge users above the free tier, +#' the ability to cancel is critical for cost management. +#' @param query_run_id queryRunId from `create_query_token()`, for token stored as `x`, use `x$result$queryRequest$queryRunId` +#' @param api_key Flipside Crypto ShroomDK API Key +#' @param api_url default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user. +#' @return returns a list of the status_canceled (TRUE or FALSE) and the cancel object (which includes related details). +#' @import jsonlite httr +#' @export +#' +#' @examples +#' \dontrun{ +#' query <- create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 1000000", api_key) +#' query_status <- get_query_status(query$result$queryRequest$queryRunId, api_key) +#' canceled <- cancel_query(query$result$queryRequest$queryRunId, api_key) +#' } +cancel_query <- function(query_run_id, api_key, + api_url = "https://api-v2.flipsidecrypto.xyz/json-rpc"){ + + headers = c( + "Content-Type" = 'application/json', + "x-api-key" = api_key + ) + + # get status of a run id + request_cancel_body <- as.character( + jsonlite::toJSON(pretty = TRUE, + list( + "jsonrpc" = "2.0", + "method" = "cancelQueryRun", + "params" = list( + list( "queryRunId" = query_run_id + ) + ), + "id" = 1 + ), + auto_unbox = TRUE + ) + ) + + canceled <- content( + httr::POST( + api_url, + config = httr::add_headers(.headers = headers), + body = request_cancel_body) + ) + + statecheck = canceled$result$canceledQueryRun$state == "QUERY_STATE_CANCELED" + + return( + list( + status_canceled = statecheck, + cancellation_details = canceled + ) + ) +} diff --git a/r/shroomDK/R/clean_query.R b/r/shroomDK/R/clean_query.R index dd8dcd9..9fd6d45 100644 --- a/r/shroomDK/R/clean_query.R +++ b/r/shroomDK/R/clean_query.R @@ -9,7 +9,7 @@ #' @param try_simplify because requests can return JSON and may not have the same length #' across values, they may not be data frame compliant (all columns having the same number of rows). #' A key example would be TX_JSON in EVM FACT_TRANSACTION tables which include 50+ -#' extra details from transaction logs. But other examples like NULLs TO_ADDRESS can have similar +#' extra details from transaction logs. But other examples like NULLs in TO_ADDRESS can have similar #' issues. Default TRUE. #' #' @return A data frame. If `try_simplify` is FALSE OR if `try_simplify` TRUE fails: @@ -20,9 +20,10 @@ #' #' @examples #' \dontrun{ -#' query = create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 1000", api_key) -#' request = get_query_from_token(query$result$queryRequest$queryRunId, api_key) -#' clean_query(request, try_simplify = FALSE) +#' query <- create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 1000", api_key) +#' request <- get_query_from_token(query$result$queryRequest$queryRunId, api_key) +#' df1 <- clean_query(request, try_simplify = TRUE) # warning b/c of tx_json +#' df2 <- clean_query(request, try_simplify = FALSE) # silently returns columns of lists #' } clean_query <- function(request, try_simplify = TRUE){ diff --git a/r/shroomDK/R/get_query_from_token.R b/r/shroomDK/R/get_query_from_token.R index 854121e..dfa8477 100644 --- a/r/shroomDK/R/get_query_from_token.R +++ b/r/shroomDK/R/get_query_from_token.R @@ -3,10 +3,8 @@ library(httr) #' Get Query From Token #' -#' Uses Flipside ShroomDK to access a Query Token. Query tokens are cached up to `ttl` minutes -#' for each `query`. This function is for pagination and multiple requests -#' while . Note: To reduce payload it returns -#' a list of outputs (separating column names from rows). +#' Uses Flipside ShroomDK to access a Query Token (Run ID). This function is for pagination and multiple requests. +#' Note: To reduce payload it returns a list of outputs (separating column names from rows). Use `clean_query()` to #' #' @param query_run_id queryRunId from `create_query_token()`, for token stored as `x`, use `x$result$queryRequest$queryRunId` #' @param api_key Flipside Crypto ShroomDK API Key @@ -14,15 +12,16 @@ library(httr) #' @param page_size Default 1000. Paginate via page_number. May return error if page_size causes data to exceed 30MB. #' @param result_format Default to csv. Options: csv and json. #' @param api_url default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user. -#' @return returns a request of length 8: `results`, `columnLabels`, -#' `columnTypes`, `startedAt`, `endedAt`, `pageNumber`, `pageSize`, `status` +#' @return returns a list of jsonrpc, id, and result. Within result are: +#' columnNames, columnTypes, rows, page, sql, format, originalQueryRun, redirectedToQueryRun +#' use `clean_query()` to transform this into a data frame. #' @import jsonlite httr #' @export #' #' @examples #' \dontrun{ -#' query = create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 1000", api_key) -#' get_query_from_token(query$result$queryRequest$queryRunId, api_key, 1, 1000) +#' query <- create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 1000", api_key) +#' fact_transactions <- get_query_from_token(query$result$queryRequest$queryRunId, api_key, 1, 1000) #' } get_query_from_token <- function(query_run_id, api_key, page_number = 1, diff --git a/r/shroomDK/R/get_query_status.R b/r/shroomDK/R/get_query_status.R index c6147bf..fe0fedd 100644 --- a/r/shroomDK/R/get_query_status.R +++ b/r/shroomDK/R/get_query_status.R @@ -7,7 +7,8 @@ library(httr) #' @param query_run_id queryRunId from `create_query_token()`, for token stored as `x`, use `x$result$queryRequest$queryRunId` #' @param api_key Flipside Crypto ShroomDK API Key #' @param api_url default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user. -#' @return returns request content; for content `x`, use `x$result$queryRun$state` and `x$result$queryRun$errorMessage` +#' @return returns request content; for content `x`, use `x$result$queryRun$state` and `x$result$queryRun$errorMessage`. Expect one of +#' QUERY_STATE_READY, QUERY_STATE_RUNNING, QUERY_STATE_STREAMING_RESULTS, QUERY_STATE_SUCCESS, QUERY_STATE_FAILED, QUERY_STATE_CANCELED #' @import jsonlite httr #' @export #' diff --git a/r/shroomDK/man/auto_paginate_query.Rd b/r/shroomDK/man/auto_paginate_query.Rd index 9941b76..15b0579 100644 --- a/r/shroomDK/man/auto_paginate_query.Rd +++ b/r/shroomDK/man/auto_paginate_query.Rd @@ -4,25 +4,36 @@ \alias{auto_paginate_query} \title{Auto Paginate Queries} \usage{ -auto_paginate_query(query, api_key, maxrows = 1e+06) +auto_paginate_query( + query, + api_key, + page_size = 1000, + page_count = 1, + api_url = "https://api-v2.flipsidecrypto.xyz/json-rpc" +) } \arguments{ \item{query}{The SQL query to pass to ShroomDK} \item{api_key}{ShroomDK API key.} -\item{maxrows}{Max rows allowed in ShroomDK, 1M at time of writing.} +\item{page_size}{Default 1000. May return error if page_size is tool large and data to exceed 30MB.} + +\item{page_count}{Default 1. How many pages, of page_size rows each, to read.} + +\item{api_url}{default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user.} } \value{ -data frame of up to 1M rows, see ?clean_query for more details on column classes. +data frame of up to `page_size * page_count` rows, see ?clean_query for more details on column classes. } \description{ -Grabs up to maxrows in a query by going through each page 100k rows at a time. +Grabs up to maxrows in a query by going through each page to download one at a time. } \examples{ \dontrun{ pull_data <- auto_paginate_query(" -SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10000", -api_key = readLines("api_key.txt")) +SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10001", +api_key = readLines("api_key.txt"), +page_count = 10) } } diff --git a/r/shroomDK/man/cancel_query.Rd b/r/shroomDK/man/cancel_query.Rd new file mode 100644 index 0000000..641f2d8 --- /dev/null +++ b/r/shroomDK/man/cancel_query.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/cancel_query.R +\name{cancel_query} +\alias{cancel_query} +\title{Cancel Query} +\usage{ +cancel_query( + query_run_id, + api_key, + api_url = "https://api-v2.flipsidecrypto.xyz/json-rpc" +) +} +\arguments{ +\item{query_run_id}{queryRunId from `create_query_token()`, for token stored as `x`, use `x$result$queryRequest$queryRunId`} + +\item{api_key}{Flipside Crypto ShroomDK API Key} + +\item{api_url}{default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user.} +} +\value{ +returns a list of the status_canceled (TRUE or FALSE) and the cancel object (which includes related details). +} +\description{ +Uses Flipside ShroomDK to CANCEL a query run id from `create_query_token()`, as the new API uses warehouse-seconds to charge users above the free tier, +the ability to cancel is critical for cost management. +} +\examples{ +\dontrun{ +query <- create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 1000000", api_key) +query_status <- get_query_status(query$result$queryRequest$queryRunId, api_key) +canceled <- cancel_query(query$result$queryRequest$queryRunId, api_key) +} +} diff --git a/r/shroomDK/man/clean_query.Rd b/r/shroomDK/man/clean_query.Rd index 5fcd52a..045ecb8 100644 --- a/r/shroomDK/man/clean_query.Rd +++ b/r/shroomDK/man/clean_query.Rd @@ -12,7 +12,7 @@ clean_query(request, try_simplify = TRUE) \item{try_simplify}{because requests can return JSON and may not have the same length across values, they may not be data frame compliant (all columns having the same number of rows). A key example would be TX_JSON in EVM FACT_TRANSACTION tables which include 50+ -extra details from transaction logs. But other examples like NULLs TO_ADDRESS can have similar +extra details from transaction logs. But other examples like NULLs in TO_ADDRESS can have similar issues. Default TRUE.} } \value{ @@ -26,8 +26,9 @@ intelligently. } \examples{ \dontrun{ -query = create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10000", api_key) -request = get_query_from_token(query$token, api_key, 1, 10000) -clean_query(request, try_simplify = FALSE) +query <- create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 1000", api_key) +request <- get_query_from_token(query$result$queryRequest$queryRunId, api_key) +df1 <- clean_query(request, try_simplify = TRUE) # warning b/c of tx_json +df2 <- clean_query(request, try_simplify = FALSE) # silently returns columns of lists } } diff --git a/r/shroomDK/man/create_query_token.Rd b/r/shroomDK/man/create_query_token.Rd index 0adab84..900e331 100644 --- a/r/shroomDK/man/create_query_token.Rd +++ b/r/shroomDK/man/create_query_token.Rd @@ -4,16 +4,24 @@ \alias{create_query_token} \title{Create Query Token} \usage{ -create_query_token(query, api_key, ttl = 10, cache = TRUE) +create_query_token( + query, + api_key, + ttl = 1, + mam = 10, + api_url = "https://api-v2.flipsidecrypto.xyz/json-rpc" +) } \arguments{ \item{query}{Flipside Crypto Snowflake SQL compatible query as a string.} \item{api_key}{Flipside Crypto ShroomDK API Key} -\item{ttl}{time (in minutes) to keep query in cache.} +\item{ttl}{time-to-live (in hours) to keep query results available. Default 1 hour.} -\item{cache}{Use cached results; set as FALSE to re-execute.} +\item{mam}{max-age-minutes, lifespan of cache. set to 0 to always re-execute. Default 10 minutes.} + +\item{api_url}{default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user.} } \value{ list of `token` and `cached` use `token` in `get_query_from_token()` @@ -28,7 +36,7 @@ allowing for pagination and multiple requests before expending more daily reques create_query_token( query = "SELECT * FROM ethereum.core.fact_transactions LIMIT 1", api_key = readLines("api_key.txt"), -ttl = 15, -cache = TRUE) +ttl = 1, +mam = 5) } } diff --git a/r/shroomDK/man/get_query_from_token.Rd b/r/shroomDK/man/get_query_from_token.Rd index b2d47d1..2fff968 100644 --- a/r/shroomDK/man/get_query_from_token.Rd +++ b/r/shroomDK/man/get_query_from_token.Rd @@ -4,30 +4,40 @@ \alias{get_query_from_token} \title{Get Query From Token} \usage{ -get_query_from_token(query_token, api_key, page_number = 1, page_size = 1e+05) +get_query_from_token( + query_run_id, + api_key, + page_number = 1, + page_size = 1000, + result_format = "csv", + api_url = "https://api-v2.flipsidecrypto.xyz/json-rpc" +) } \arguments{ -\item{query_token}{token from `create_query_token()`} +\item{query_run_id}{queryRunId from `create_query_token()`, for token stored as `x`, use `x$result$queryRequest$queryRunId`} \item{api_key}{Flipside Crypto ShroomDK API Key} -\item{page_number}{Query tokens are cached and 100k rows max. Get up to 1M rows by going through pages.} +\item{page_number}{Results are cached, max 30MB of data per page.} -\item{page_size}{Default 100,000. Paginate via page_number.} +\item{page_size}{Default 1000. Paginate via page_number. May return error if page_size causes data to exceed 30MB.} + +\item{result_format}{Default to csv. Options: csv and json.} + +\item{api_url}{default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user.} } \value{ -returns a request of length 8: `results`, `columnLabels`, - `columnTypes`, `startedAt`, `endedAt`, `pageNumber`, `pageSize`, `status` +returns a list of jsonrpc, id, and result. Within result are: +columnNames, columnTypes, rows, page, sql, format, originalQueryRun, redirectedToQueryRun +use `clean_query()` to transform this into a data frame. } \description{ -Uses Flipside ShroomDK to access a Query Token. Query tokens are cached up to `ttl` minutes -for each `query`. This function is for pagination and multiple requests -while . Note: To reduce payload it returns -a list of outputs (separating column names from rows). +Uses Flipside ShroomDK to access a Query Token (Run ID). This function is for pagination and multiple requests. +Note: To reduce payload it returns a list of outputs (separating column names from rows). Use `clean_query()` to } \examples{ \dontrun{ -query = create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10000", api_key) -get_query_from_token(query$token, api_key, 1, 10000) +query <- create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 1000", api_key) +fact_transactions <- get_query_from_token(query$result$queryRequest$queryRunId, api_key, 1, 1000) } } diff --git a/r/shroomDK/man/get_query_status.Rd b/r/shroomDK/man/get_query_status.Rd new file mode 100644 index 0000000..14e87e6 --- /dev/null +++ b/r/shroomDK/man/get_query_status.Rd @@ -0,0 +1,32 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/get_query_status.R +\name{get_query_status} +\alias{get_query_status} +\title{Get Query ID Status} +\usage{ +get_query_status( + query_run_id, + api_key, + api_url = "https://api-v2.flipsidecrypto.xyz/json-rpc" +) +} +\arguments{ +\item{query_run_id}{queryRunId from `create_query_token()`, for token stored as `x`, use `x$result$queryRequest$queryRunId`} + +\item{api_key}{Flipside Crypto ShroomDK API Key} + +\item{api_url}{default to https://api-v2.flipsidecrypto.xyz/json-rpc but upgradeable for user.} +} +\value{ +returns request content; for content `x`, use `x$result$queryRun$state` and `x$result$queryRun$errorMessage`. Expect one of +QUERY_STATE_READY, QUERY_STATE_RUNNING, QUERY_STATE_STREAMING_RESULTS, QUERY_STATE_SUCCESS, QUERY_STATE_FAILED, QUERY_STATE_CANCELED +} +\description{ +Uses Flipside ShroomDK to access the status of a query run id from `create_query_token()` +} +\examples{ +\dontrun{ +query = create_query_token("SELECT * FROM ETHEREUM.CORE.FACT_TRANSACTIONS LIMIT 10000", api_key) +get_query_status(query$result$queryRequest$queryRunId, api_key) +} +} diff --git a/r/shroomDK_0.2.0.tar.gz b/r/shroomDK_0.2.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ba8b349538c4dc0f4c4a24d1af2fde3a3bec8e77 GIT binary patch literal 7186 zcmV+t9PQ&DiwFP!000002JKyYSK~&qpMO{9@E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Ot#}**|ZHMWzIo zDTMw#|4}lrMAZwrzkBpSGRBh!TNq0YwlJRj@E9ZW;20fpEbYt~V@dH5#)4? zouy=?&ry0-JfVY$EbX`%<4KO1`D0;}wEWLF0l}R zz|+eA>>YsZCzk)!Qf*ZKudddAzexF?O+XR>WW9_rz=W3q1!V0$oZx^=jy>H^FuML~ zLU2I#=9qtWKZDkJ_jil!BRo5X;VE_zj!R9AXHxR?J%m5Ae`SFUgpDWLJlJ^X#=#4~ zrYG4e+<5MN!ati4=E=7_UV*Pa5&lyBcbv?Ee9~RL3Jdun!a_d7E|kWXumk1dFz2CrqE5#bPq+Hhcx;5o3O#(; z@}Cap_PZEO%qvau$}VdI=o#|AT-_?E{hzC~GWvfi)m8k*^IWlBqPRrJU6%(<%eDhL zwxK;3>bL#C$KbstO7$#$!hdgi-KZH_7zH3$Nev^*aUt_;o9~+OTQosQ8d*t<`TaH_ zbS+w7D_y&*_Em)&kXCsIkxY4aTbyWNcRze^K7O38OKAs9%q)7ILlPG}gd+1S3TOT_ zn$b(_V2az?gg$OmOFnfNi>nZOij-aK3KzHV9p<5Pprbw(bq70jX$L>DeG?BD$p>x6 zgD#iJY2f1Y#bm?cTX{eVt$-iqwHOLr$G)B5xc~4W*KC4f-h{IFZSLd80yd?vTDiKq UR@drUU6Zc=2mc9lO#rw60Ij?ml>h($ literal 0 HcmV?d00001 From 73e52bf82507dc53e4026554802e13339d3e3505 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mercado" <107061601+charlieflipside@users.noreply.github.com> Date: Wed, 10 May 2023 15:09:00 -0400 Subject: [PATCH 7/7] Update DESCRIPTION --- r/shroomDK/DESCRIPTION | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/r/shroomDK/DESCRIPTION b/r/shroomDK/DESCRIPTION index 5caa861..54f6f32 100644 --- a/r/shroomDK/DESCRIPTION +++ b/r/shroomDK/DESCRIPTION @@ -4,9 +4,8 @@ Title: Accessing the Flipside Crypto ShroomDK API Version: 0.2.0 Author: Carlos Mercado Maintainer: Carlos Mercado -Description: Programmatic access to Flipside Crypto data via the Compass RPC API: . As simple as auto_paginate_query() but with core functions as needed for troubleshooting. +Description: Programmatic access to Flipside Crypto data via the Compass RPC API: . As simple as auto_paginate_query() but with core functions as needed for troubleshooting. Note, 0.1.1 support deprecated 2023-05-31. Imports: jsonlite, httr License: MIT + file LICENSE Encoding: UTF-8 -LazyData: false RoxygenNote: 7.2.1