1

I'm pulling in data from a api and keep getting the following error.

I put together the sql query and am connecting to the instance for pulling the data. However, when I run collect, it given me an error.

soql_query = paste("SELECT Id, subject FROM Table")

myDF2 <- read.df(sqlContext, source="...", username=sf_username, password=sf_password, version=apiVersion, soql=soql_query)

temp2 <- SparkR::collect(myDF2)

Error in rawToChar(string) : 
  embedded nul in string: 'VOID: \xe5,nq\b\x92ƹ\xc8Y\x8b\n\nAdd a new comment by Asako:\0\xb3\xe1\xf3Ȓ\xfd\xa0\bE\xe4\t06/29 09:23'
In addition: Warning message:
closing unused connection 6 (col) 

I've gone through and identified what column it is. It contains a lot of string data and sentences, so the error partially makes sense.

I was wondering if there was any way to get around this issue.

ATMA
  • 1,450
  • 4
  • 23
  • 33
  • 1
    R uses 8 bit character storage. Nulls are terminators for the underlying C code. – IRTFM Jul 20 '17 at 01:37
  • Perhaps you can pipe them through sed? https://stackoverflow.com/questions/22643372/embedded-nul-in-string-error-when-importing-csv-with-fread – IRTFM Jul 20 '17 at 01:41

0 Answers0