Created
October 11, 2018 21:27
-
-
Save davideanastasia/af47fb93cab579dc718a735f96eaf998 to your computer and use it in GitHub Desktop.
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
| CREATE TABLE `kaggle-adfraud.kaggle_talkingdata_adtracking.dataset_test_with_prediction_logreg_0001` | |
| AS | |
| SELECT * FROM ML.PREDICT(MODEL `kaggle-adfraud.kaggle_talkingdata_adtracking.talkingdata_logreg_0001`, | |
| (SELECT | |
| click_id, | |
| CAST(ip AS STRING) as ip, | |
| CAST(app AS STRING) as app, | |
| CAST(device AS STRING) as device, | |
| CAST(os AS STRING) as os, | |
| CAST(channel AS STRING) as channel, | |
| CAST(EXTRACT(hour from click_time) AS STRING) as hod, | |
| CONCAT('app_', CAST(app AS STRING), '_device_', CAST(device AS STRING)) app_x_device, | |
| CONCAT('os_', CAST(os AS STRING), '_channel_', CAST(channel AS STRING)) os_x_channel, | |
| click_time | |
| FROM `kaggle_talkingdata_adtracking.dataset_test`)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment