Reputation: 454
I am running below simple UDF and I am getting "Error: 3.3 - 14.6: Javascript TVFs are disabled.". Does anyone have a clue about this?
Query:
select * from
js(
(publicdata:samples.shakespeare),
word, word_count,
"[{name: 'word', type:'string'},
{name: 'add5', type:'integer'}]",
"function(r, emit) {
var new_cnt = r.word_count+5;
emit({word: r.word,
add5: new_cnt});
}")
Upvotes: 2
Views: 2068
Reputation: 59165
"function(r, emit) {
var new_cnt = r.word_count+5;
emit({word: r.word,
add5: new_cnt});
}"
This function
is a new way to write Javascript inside BigQuery SQL statements. Unfortunately this feature is still in development (today being January 2015), and not widely available.
Upvotes: 1