Created
May 20, 2019 02:15
-
-
Save securetorobert/1ad26b7b717b7f36ddcef5daf22e8c2a to your computer and use it in GitHub Desktop.
Get prediction with BQML
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
#standardSQL | |
SELECT | |
* | |
FROM | |
ML.PREDICT(MODEL `bqml_tutorial.sample_model`, ( | |
SELECT | |
IFNULL(device.operatingSystem, "") AS os, | |
device.isMobile AS is_mobile, | |
IFNULL(totals.pageviews, 0) AS pageviews, | |
IFNULL(geoNetwork.country, "") AS country | |
FROM | |
`bigquery-public-data.google_analytics_sample.ga_sessions_*` | |
WHERE | |
_TABLE_SUFFIX BETWEEN '20170701' AND '20170801')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment