Here's what I just built that worked. I ended up retypying it to make it work. I got errors at first, too.
CALL word_cloud('fake_phrases','`Statements`' , 'y','y' );
Looking at the error - Make sure that you have run and applied the previous transform. I have missed that 8 out ot 10 times that I get an error! lol
Also check your dataset for blank values. I wouldn't think that would be a factor, but the error is weird.
Wow what a journey that was to get it working... I ensured that blank and null values were stripped in my dataflow. I then shortened my table names, in reality my table name was closer to 40 characters and my column name was 22 characters. I shortened these down to about 10 characters each through renaming/data flows. In the end I got it working and it had to be one of these things that enabled it to succeed. Thanks for the vote of confidence that it could work @DataMaven , thanks to you, I didn't give up hope!
@JasonAltenburg - I am so glad I give you hope!!! lol
Did you happen to run into cases where the same word would appear twice because it was sometimes capitalized and sometimes not?
Might I lean on your SQL lazily and ask you if you know the right place to toss in a PROPER function? I am just going to mess it up 6 times, and the query is already running an hour and a half and hasn't stopped for the real dataset I just applied it to! ugh!
@JasonAltenburg - What did you do that made your word cloud sql work? I am replicating in another environment, and it keeps failing!!!
I strongly believe it was shortening the name of the input table and the name of the column with sentences in it for step 2 of the SQL transforms down to <10 characters or so, all lowercase. I also added a magic ETL step prior to this where I stripped out null and blank values from the sentences column. (Filter for sentences_column IS NOT NULL and then does not equal Empty String)
I just made another one today and these steps seem to ensure it works.
Also be careful copy/pasting directly from the text in the help page... this code is shown and note the different single quote at the end next to the n character...
CALL word_cloud('survey_results', '`feedback`' , 'y','n’ );
I tried to retype the statement, but still getting an error "The database reported a syntax error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1"
@JasonAltenburg how big is your dataset? using SQL to create a word document matrix is a little square-peg-round-hole-ish.
I built a tutorial around a similar topic here.
the SQL is actually creating tables, but may not run as efficiently as the stored procedure, so it depends on the size of your database.
I haven't reimplemented this solution in Magic 2.0, but I suspect with a reasonable size dataset you could pull it off more efficiently than the MySQL pipeline and have a more transparent ETL. Also implementing stop words would be a matter of having a table with a list of stop words and then JOIN and filter out the matches.
if you have python / r scripting, it'll be SO MUCH FASTER (i think).