With the addition of distinct() in version 2.2.0, it has been possible to do nearly all of the steps in the query construction pipeline natively from galah_call(). The only thing that is missing is the ability to check what fields exist. In SQL, this ability is provided by describe(), which gives a table of all available columns and their properties (i.e. functionality currently given by show_all(fields)). Confusingly, the SQL version is synonymous with desc(), which dplyr uses as a contraction of descending; but I digress.
Adding describe() to galah would allow users to build queries without using metadata APIs in the first instance, though they would remain useful for advanced users. More importantly, this function is critical for implementing event-core downloads (issue #226), which uses different fields from those stored in the biocache.
It looks like an implementation appears in the explore package (see here), so we could look at extending that.
With the addition of
distinct()in version 2.2.0, it has been possible to do nearly all of the steps in the query construction pipeline natively fromgalah_call(). The only thing that is missing is the ability to check what fields exist. In SQL, this ability is provided bydescribe(), which gives a table of all available columns and their properties (i.e. functionality currently given byshow_all(fields)). Confusingly, the SQL version is synonymous withdesc(), whichdplyruses as a contraction ofdescending; but I digress.Adding
describe()togalahwould allow users to build queries without usingmetadataAPIs in the first instance, though they would remain useful for advanced users. More importantly, this function is critical for implementing event-core downloads (issue #226), which uses different fields from those stored in the biocache.It looks like an implementation appears in the
explorepackage (see here), so we could look at extending that.