google-code-export / google-bigquery

Automatically exported from code.google.com/p/google-bigquery
1 stars 0 forks source link

Provide reverse string function in Big Query. #104

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Provide a function to reverse a string in BigQuery.  for example
SELECT REVERSE(DomainName) from PassiveDNS.A limit 10

Original issue reported on code.google.com by ericavi...@ericavijay.net on 10 Jun 2014 at 8:48

GoogleCodeExporter commented 9 years ago
We have forthcoming support for JavaScript user-defined functions; I'd be happy 
to let you know when it's generally available.

Note that there is some complexity around string reversal with Unicode in 
Javascript: 
http://stackoverflow.com/questions/958908/how-do-you-reverse-a-string-in-place-i
n-javascript  However, this shouldn't be an issue as long as you're using DNS 
compatible domain names (e.g., not raw IDNs).

Original comment by thomasp...@google.com on 11 Jun 2014 at 12:26

GoogleCodeExporter commented 9 years ago
Javascript UDF would surely work for me and provide a lot of capabilities.

Original comment by ericavi...@ericavijay.net on 11 Jun 2014 at 1:30