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

in_schema does not work inside compute #275

Open
willshen99 opened this issue Nov 8, 2024 · 4 comments · May be fixed by #276
Open

in_schema does not work inside compute #275

willshen99 opened this issue Nov 8, 2024 · 4 comments · May be fixed by #276

Comments

@willshen99
Copy link

willshen99 commented Nov 8, 2024

I'm using dbplyr 2.4.0 with RPresto 1.4.6.

dplyr::copy_to(
    con, 
    some_table,
    name = in_schema('schema_name', 'table_name')
)

It throws me an error:

Error in `as_table_ident()`:
! `table` must be a character vector, not `NULL`.

Looked into the stack, the issue occurred in function.compute_tbl_presto. It did an unname for table name, and make in_schema() into NULL.NULL. (See codes here)

@willshen99
Copy link
Author

Everything works fine after skipping unname if class is dbplyr_schema

@willshen99 willshen99 changed the title in_schema does not work inside copy_to in_schema does not work inside compute Nov 8, 2024
@willshen99 willshen99 linked a pull request Nov 9, 2024 that will close this issue
@jarodmeng
Copy link
Contributor

This should now be fixed by #280 .

@willshen99
Copy link
Author

Still same error when compute with remote table.

Error in `as_table_ident()`:
! `table` must be a character vector, not `NULL`.
Run `rlang::last_trace()` to see where the error occurred.

A Reprex:

dplyr::copy_to(
  conn,
  tbl(conn, 'person'),
  name = in_schema('schema_test', 'table1')
)

@jarodmeng
Copy link
Contributor

What's your "dbplyr" and "DBI" version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants