Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

'WriteYXDBStreaming' Error using R node

ckestler
8 - Asteroid

Has anyone ever seen this error before when trying to query to a database using an R node? 

 

My code runs in R, but not in Alteryx..and I get this 'WriteYXDBStreaming Error.

 

Also, my first call to the DB works, but not the rest. (first is: s_o <- sqlQuery(mxctl,s_o_query) ...see bottom of R code)

 

When I check the data types of the output, they are all of class data.frame.

 

I have attached my workflow. Thanks in advance!

12 REPLIES 12
JohnJPS
15 - Aurora

Hi @ries9112,

Could you try adding the square brackets as shown here:

prediction[] = lapply(prediction, as.character)

Hope that helps!

John

ries9112
7 - Meteor

Hey @JohnJPS, sorry I should have specified that I tried that as well and did not work. 

 

With this code:

ries9112_1-1574262233881.png

Still getting this result:

ries9112_0-1574262019903.png

 

It doesn't really matter at the end of the day because I just changed the R code to write csv files that are then picked up once the code finishes using a block until done tool, and that works totally fine and as expected, just a bit weird that the solution did not work for me when picking up the csv outputs works 100% fine, so thought I would share.

 

Thanks anyways!
Ricky

Tam
9 - Comet

Thanks for @JohnJPS explanation note.