Hello.
DataShield is running into a problem when analyzing data with whites pace in it.
I have a data server that I populated with tables by uploading some sample .csv files to Projects I created on it. I generated the .csv files automatically, edited them in Excel to correct some formatting issues, then uploaded them to the server using DataShield in RStuido.
Some of those tables have entries with white space in them. For example, a “patient” table has a COUNTY column, where county names are listed in full (e.g. “Suffolk County”).
When I use DataShield on the client side with RStudio, I can assign a table from the server and analyze entries with no white space as expected. For example,
> DSI::datashield.assign.table(conns = connections, symbol = "Patients", table = c("Project_1.patients", "Project_2.patients"))
> ds.table("Patients$GENDER")
works fine.
However, if I try
> ds.table("Patients$COUNTY")
I get an error. datashield.errors()
outputs the following:
$server_1
[1] "[Client error: (400) Bad Request] Lexical error at line 2, column 73. Encountered: \" \" (32), after : \"\\\"Barnstable\""
$server_2
[1] "[Client error: (400) Bad Request] Lexical error at line 2, column 73. Encountered: \" \" (32), after : \"\\\"Barnstable\""
“Barnstable County” is one of the possible entries in the COUNTY column.
I know that DataShield must be able to handle whitespace in table values. Does anyone have any ideas about what might have happened to cause this error?