question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bigquery udf: len is undefined

See original GitHub issue

workaround is to use javascript notation in the udf

len = lambda x: x.length

which will transpile to

let len = ((x) => x.length)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cpcloudcommented, Jun 4, 2018

enumerate yields index, element you probably want to write that as lambda x: x.map(lambda e, i: (i, e))

0reactions
tsdlovellcommented, Jun 4, 2018

I might be able to start from visit_ListComp

Read more comments on GitHub >

github_iconTop Results From Across the Web

BigQuery fails to save view that uses functions - Stack Overflow
If you try to save a view with a query that uses the function inline - you get the following error: Failed to...
Read more >
User-defined functions | BigQuery - Google Cloud
A user-defined function (UDF) lets you create a function by using a SQL expression or JavaScript code. A UDF accepts columns of input,...
Read more >
User-Defined Functions - BigQuery ETL
udf.array_drop_first_and_append. Drop the first element of an array, and append the given element. Result is an array with the same length as the...
Read more >
BigQuery UDF for protobuf - gists · GitHub
defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"! ... toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0 ...
Read more >
airflow.providers.google.cloud.operators.bigquery
This operator is used to create new dataset for your Project in BigQuery. ... udf_config (list | None) – The User Defined Function...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found