Sparklyr: process_tbl_name

Created on 27 Nov 2020  路  4Comments  路  Source: sparklyr/sparklyr

Hi.
I've installed sparklyr over a amazon linux using devtools::install_github("sparklyr/sparklyr") But I get this code in process_tbl_name

> sparklyr:::process_tbl_name
function (x) 
{
    components <- strsplit(x, "\\\\.")
    num_components <- length(components)
    if (identical(num_components, 1L)) {
        x
    }
    else if (identical(num_components, 2L)) {
        dbplyr::in_schema(components[[1]], components[[2]])
    }
    else {
        stop("expected input to be <table name> or <schema name>.<table name>")
    }
}
<environment: namespace:sparklyr>

the problem is with components <- strsplit(x, "\\\\.") using 4 \ instead 2. And I get a error to read spark table . Any workaround?
Thanks

bug

Most helpful comment

@joscani Thanks! It has been corrected now. You can re-run remotes::install_github("sparklyr/sparklyr") to see the schema name and table name being parsed correctly.

All 4 comments

It's strange, installin in ubuntu it looks fine.

Oops I think there is a bug in that code path : / (but splitting by "\\." was not part of the bug)

@joscani Thanks! It has been corrected now. You can re-run remotes::install_github("sparklyr/sparklyr") to see the schema name and table name being parsed correctly.

Thanks. It works now. It looks this in aamzon linux.

> sparklyr:::process_tbl_name
function (x) 
{
    components <- strsplit(x, "\\\\.")[[1]]
    num_components <- length(components)
    if (identical(num_components, 1L)) {
        x
    }
    else if (identical(num_components, 2L)) {
        dbplyr::in_schema(components[[1]], components[[2]])
    }
    else {
        stop("expected input to be <table name> or <schema name>.<table name>")
    }
}
<environment: namespace:sparklyr>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

saraswatmks picture saraswatmks  路  3Comments

javierluraschi picture javierluraschi  路  4Comments

admoseremic picture admoseremic  路  4Comments

GIS
javierluraschi picture javierluraschi  路  4Comments

Scotturbina picture Scotturbina  路  3Comments