Created
April 12, 2018 18:50
-
-
Save campoy/33719f6bec6b506fb3a821096920c076 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function identity(row, emit) { | |
emit({ y: row.x }); | |
} | |
bigquery.defineFunction( | |
'identity', | |
['x'], | |
[{ 'name': 'y', 'type': 'float' }], | |
identity | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT y FROM identity( | |
SELECT 21 as x | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment