-
Notifications
You must be signed in to change notification settings - Fork 308
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
Sanitize table names in copy_to() #611
Comments
Good idea -- we currently sanitize column names (https://github.com/rstudio/sparklyr/blob/7b1c6d8ff864612d8f5becacbc24fcd9d131ef21/R/utils.R#L116); it might make sense to use a similar transformation for table names. |
I guess database name handling affects this problem. Is it usual thing in R world to name a table with dot? In SQL, dot is a separater syntax between database and table name. |
@chezou Dots in variable names are allowed in R, and it wasn't clear to me that they weren't allowed in Spark. If I've understood the DBI package documentation correctly, I think that |
Thanks for the explanation. To be honest, I sometimes saw variables with dots in R, but I was not sure it is usual or not. I heard Hadley is trying to decide how to handle DB identifier. r-dbi/DBI#24 It would solve this problem. In the SQL world (not only Spark world), it is very rare to use dots for a table name, and I didn't realize that problem. Not unlike usual DB, such as PostgreSQL, we usually use Spark to join with other tables. |
With dplyr 0.7.0, we now have |
Closing this issue because I don't think there is any sensible way to move forward with any of the proposed changes:
|
Dots in destination table names cause errors.
It would be nice if the table names were checked before they were sent to Spark. I'm not sure if the best behavior is to throw a helpful error or to fix the name.
The text was updated successfully, but these errors were encountered: