I have a dataframe containing a column named COL which is structured in this way:
VALUE1###VALUE2
The following code is working
library(sparklyr)
library(tidyr)
library(dplyr)
mParams<- collect(filter(input_DF, TYPE == ('MIN')))
mParams<- separate(mParams, COL, c('col1','col2'), '\###', remove=FALSE)
If I remove the collect
, I get this error:
Error in UseMethod("separate_") :
no applicable method for 'separate_' applied to an object of class "c('tbl_spark', 'tbl_sql', 'tbl_lazy', 'tbl')"
Is there any alternative to achieve what I want, but without collecting everything on my spark driver?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…