-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dplyr interface of ds_search_sql
#48
Comments
Possibly. Since we don't use I don't yet see how it would work. Can you give an example? with pseudocode |
Sure. |
thanks |
Oops, I guess I need to push after finishing the prototype. Sorry! |
Dear @sckott , master...wush978:dev/dplyr shows my idea of implementing interface of dplyr. There are two files: This is not a complete implementation, so only the following script works. library(ckanr)
url <- 'http://demo.ckan.org/'
sql <- 'SELECT * from "f4129802-22aa-4437-b9f9-8a8f3b7b2a53" LIMIT 2'
src <- src_ckan(url)
tb <- tbl(src, sql(sql))
# Then we could do something like this:
# dplyr::filter(tb, ...) %>% compute If you think this approach is OK, then I will keep implementing the complete interface of dplyr. |
@wush978 Sorry, just got back from vacation. Looks good.
What is the rest of the interface? |
I only implement a minimal example to demonstrate my idea of using DBI to link
And some verbs of joining... |
@wush978 what I'm wondering about is if you have to write versions of |
We use these verbs directly, but we need to guide dplyr how to use the |
Okay, sounds great! |
Any progress on this @wush978 |
Thanks for reminding me. I did forget this issue. I'll try to do some progress during Chinese New Year. |
thanks! |
Hi @sckott , Today I added some unit tests (12cb680). The basic verbs: By the way, the non-ascii column name will make the server return http 500, so I only test these features with ascii encoded tables. And I temporarily make ckanr depend on |
hmm, that commit links gives a 404, where should that point to? on |
Oops, the link should be: wush978@12cb680 |
@wush978 I had a look, looks very nice. what is the CKAN instance you used for testing? |
I am using http://demo.ckan.org to test |
thanks |
@wush978 what versions of |
e.g,. tb <- tbl(src, name = name_list[3])
#> Error in mget(plabels[hasSubclass], env) : invalid first argument |
Here it is:
|
@sckott , The unit tests for basic verbs are updated and I also tried Hope they work in your computer. |
Okay, looks good. I had a dev version of Do you think the implementation is nearly complete now? |
Yes, it is nearly complete. We just need a stable testing environment. Could you give me any suggestion? And maybe we need a short example to demonstrate this feature. Do you have any idea of where to put the examples? |
There's many CKAN instances. Not sure which is best, but I imagine there's many that have good up time, and don't have transient datasets in them. See
You could create a man file with an appropriate name and include examples in that. e..g., like #' foo bar foo bar
#' ....... more text .....
#' @name dplyr-interface
NULL |
Thanks. I'll implement them on the weekend and send a PR. |
@sckott , Sorry that I cannot find time to write some code on the last weekend. Do you have any schedule of this issue? Please let me know if we need to be hurry or I'll try to find sometimes on the next weekend to do this. |
No rush on this. And thanks for all your work on it |
You're welcome. I'm glad to have a chance to contribute. |
@wush978 and @sckott - your work has saved my Department a ton of headache! We have moved behind a Microsoft single-sign-on authentication wall, and although we can make the CKAN API accessible to our intranet (SSO exempt), the resource URLs can't be easily made SSO exempt. This means that we cannot access our data on CKAN via read.table("ckan resource url")!
All we need is for our data to be a clean CSV that uploads into the datastore. |
nice! |
Dear @sckott ,
I think it is possible to implement a subset of dplyr interface for ckanr. I guess we need to use the engine in dplyr to generate the SQL statement and submit the statement to ckan server via
ds_search_sql
. Does this feature fit this package?The text was updated successfully, but these errors were encountered: