Remove words with a length of maximum 2. Spark

106 views Asked by At

I want to remove (or replace with a non-blank value) all words of a length less than 2 in sparklyr.

My attempt is below, but doesn't work:

Tab8b <- tab8 %>% Ft_sql_transformer(
              sql="select * , 
              Regexp_replace(VAR, '\b[a-z_]{1,2}\b',' ') as VAR2
              from __THIS__ ")
0

There are 0 answers