Describe the bug
Parsing error when using atlas_counts() or atlas_occurrences() with piping from galah_filter() or galah_group_by() for the dataResourceName field when resources involve ampersands.
galah version 1.5.3 (but also present in 1.5.1-1.5.2)
To Reproduce
We note that there are a handful of values in the dataResourceName field that include ampersands (&). These can be found by
> search_fields("dataResourceName") |> show_values() |> filter(str_detect(category, "&"))
! Search returned 2 matched fields.
• Showing values for 'dataResourceName'.
# A tibble: 5 × 2
field category
<chr> <chr>
1 dataResourceName Port Adelaide Enfield Flora & Fauna Monitoring
2 dataResourceName NSW South Coast & ACT plants
3 dataResourceName Manning & Great Lakes - NSW Waterwatch
4 dataResourceName Pinao'ula: Dragonflies & damselflies of Hawai'i
5 dataResourceName Wetlands & Wildlife Creations Group
When trying to filter or group_by these records, a parsing error occurs which does not present itself for any other data records.
Thanks for flagging this issue. Just tested these queries in the dev version for galah 2.0 and they run correctly, so this issue should be fixed in the next release 😃
Describe the bug Parsing error when using
atlas_counts()
oratlas_occurrences()
with piping fromgalah_filter()
orgalah_group_by()
for thedataResourceName
field when resources involve ampersands.galah version 1.5.3 (but also present in 1.5.1-1.5.2)
To Reproduce We note that there are a handful of values in the
dataResourceName
field that include ampersands (&). These can be found byWhen trying to filter or group_by these records, a parsing error occurs which does not present itself for any other data records.
This behaviour also presents itself when using
galah_group_by()
:Expected behaviour We would expect the functions to behave as shown above when filtering for
dataResourceName == "SA Fauna"
We suspect this may be due to how the queries are being translated.