Skip to content
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

slice_sample() throwing error on a MariaDB database #617

Closed
josswright opened this issue Mar 12, 2021 · 1 comment · Fixed by #673
Closed

slice_sample() throwing error on a MariaDB database #617

josswright opened this issue Mar 12, 2021 · 1 comment · Fixed by #673
Labels
reprex needs a minimal reproducible example

Comments

@josswright
Copy link

I've recently had to pull a random sample of a fairly large (>1.5M row) database that's stored in a MariaDB instance. I wrote a fairly basic dbplyr filter:

# pseudocode: <set up database connection>
# pseudocode: db_tbl <- tbl( <connection>, "tablename" )

all_articles <-   
   db_tbl %>%
   slice_sample( n=5000 ) %>%
   collect 

I receive:

Error: FUNCTION tablename.random does not exist [1305]

I assume that this may be a limitation in functions internally provided by MariaDB, but I'm also unsure from searching around whether this is something I can fix (by implementing tablename.random directly on the DB side?) or if I'm just missing something obvious.

As an aside, I'm in a lucky position here where we're about to move this whole dataset and collection across to a new system, so I have the option to move database servers. Is there a recommended database implementation that's most compatible for dbplyr?

@hadley hadley added the reprex needs a minimal reproducible example label Apr 1, 2021
@hadley
Copy link
Member

hadley commented Apr 1, 2021

Could you please work on at least a partial reprex using the advice in https://dbplyr.tidyverse.org/articles/reprex.html?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reprex needs a minimal reproducible example
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants