Last active
January 22, 2017 15:42
-
-
Save ikuwow/7d9b32b77843720aa307537136bec540 to your computer and use it in GitHub Desktop.
CloudLoggingからBigQueryに流したログ(tsv in json)をみる ref: http://qiita.com/ikuwow/items/28369c4dc31a832a6ca1
This file contains hidden or 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
-- use regacy sqlはoff | |
SELECT | |
REGEXP_EXTRACT(textPayload,r'^(?:[^\t]*\t){0}([^\t]*).*') AS field1, | |
REGEXP_EXTRACT(textPayload,r'^(?:[^\t]*\t){1}([^\t]*).*') AS field2, | |
REGEXP_EXTRACT(textPayload,r'^(?:[^\t]*\t){2}([^\t]*).*') AS field3, | |
... | |
FROM | |
`projectname.datasetname.somelogs_*` | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment