poissonconsulting / fwapgr

An R Client for BC Freshwater Atlas Web API
https://poissonconsulting.github.io/fwapgr
Other
8 stars 1 forks source link

Unable to query collection for `fwapg.fwa_stream_networks_sp` #75

Closed joethorley closed 1 year ago

joethorley commented 1 year ago
library(fwapgr)
coll <- "fwapg.fwa_stream_networks_sp"
river <- fwapgr::fwa_query_collection(coll, filter = list(gnis_name = "Sangan River"))
#> Error in `get_request()`:
#> ! API request failed [404]: Collection not found: fwapg.fwa_stream_networks_sp
#> .

#> Backtrace:
#>     ▆
#>  1. └─fwapgr::fwa_query_collection(coll, filter = list(gnis_name = "Sangan River"))
#>  2.   └─pgfeatureserv::pgf_collection_features(...) at fwapgr/R/query-collection.R:29:2
#>  3.     └─pgfeatureserv:::get_request(url = url, user = user, verbose = verbose)
#>  4.       └─pgfeatureserv:::chk_response_status(resp)
#>  5.         └─chk::abort_chk(glue("API request failed [{cd}]: {msg}"))
#>  6.           └─chk::err(..., n = n, tidy = tidy, .subclass = "chk_error", call = call)
#>  7.             └─rlang::abort(msg, class = .subclass, !!!args[named], call = call)

Created on 2022-11-24 with reprex v2.0.2

Presumably related to https://github.com/smnorris/fwapg/issues/125

smnorris commented 1 year ago

Yes, that is the load table that should have been deleted on completion of successful load of FWA data. Because the load bailed it was still there this morning, but I deleted when fixing the other issue.

I didn't realize the load table showed up in the list of collections though! I'll have to tweak the grants some more.

smnorris commented 1 year ago

I think you want:

library(fwapgr)
coll <- "whse_basemapping.fwa_stream_networks_sp"