You are on page 1of 5
GCP Fundamentals: Getting Started with BigQuery & Overview Ini ib, you load a web server log int a igen abe After nang the dats Yeu query it using the BigQuery web user interlace anche BigQuety CL Bioavery helps you perform interactive analysis of petabyte-scal databases and t ‘onabls nearroa ime analysis of massive dataset. offers a fami SOL 2017 ‘quer language an functions ata stored in BigQueryis highly date. Google stores your data in replicated ‘manner defaut and ato aédtional charge for replicas, With igQuery. you pay only forthe resources you use. Data storage in BigQuer is inexpensive, Queries incur charges based on the amount of data they process: when you submit query, Yeu pay fr the compute nodes nl forthe duration ofthat query. You dont have to ay 1 heep 2 compute duster up and runing Using BigQuery nvlie imeracin wth a number of Google Cio Platform resoarees, ncludng project covered elzenhere thie course, detects, ables, dbs. Tia ab introduce youto some f these resources and thi ie Inroduction summits thei oan aerating with Bigdusy Datasets: dataset grouping mechanism that holds 2e0 or more tables. A datantia the lowest lov unt of access contol. Dataset are onned by GCP Drolet. Each dataet canbe shared wth indvial users “Tables tble is atow-colu structue that contsine actus dat, Each table hs seems tha deserve atongly typed calumne of vals, Each abe beonga toa datos, Objectives Inti eb, you lar how to perfor the following tasks: + Load data fom Clout Storage int BigQven. + Perform a query on the data in Blgauery. Task 1: Sign in to the Google Cloud Platform (GCP) Console For eee a, youget anew GOP project and set of resoutes for afd time at no 1. Make su you signed into Oils using an Incognito window. 2.Notethe labs socess time forexamele, Q2-Q000 snd make sue you can finish nthe tine bloc ‘Theses no pause feature. You can estat If needed but youhaveto start the beaining. 3.Whenready, cick [EES 4. Note your ab cadens. Youll use them t sign ino Cloud Platform Console Open Google Console Caution: When you are inthe console do not deviate from the lab instructions. Doing so may cause your ‘account 1o be blacked. Leatn more. google2876526_studentoqikiabs.o "Now to labs? View our introductory video! 5. Click Open Google Console, 6-Click Use another account ard copy/paste credential fr thiab rt the prompts ‘yu use other rede you get error or incur charges. 7. Accept the ees and skip the recover resource page ‘Doo ick End Lab unless you are frched with the abo want 10 et ‘Thi lara yourwark and removes the preeet Make note of whether you ssigned region i ose tothe United Sates orto Europe Task 2: Load data from Cloud Storage into BigQuery "inte Console onthe Navigation menu ( — ) lick Bigguery hen cick Done, 2-cieate anew dtaset within your poet by selecting your poet inthe Resources ‘section then liking on CREATE DATASET onthe ight 3. Inthe Crete Dataset slog, fo Dataset D, ype logata 4. For Data location. selec the continent closest othe reion your prject was created in. cick create dataset, 5. reat ana table inthe logdata to store tho dat from tho CSV ilo 6. clekon Create Table. On the Crest Table pape, ote Source section + For Create table from, choose slat Googe Cloud Storage ann te el, ype ¢://eloud-training/gopfot/sccess1op.c2¥ + Vetty File fem ost 10 C8V. Note: When youhate created 2 table previous he Create fom Previous Job option allows youto quickly use your stings to create sia tables. 7 nthe Destination section + For Dataset name, eave logdata selected + For Table name, type accessiog + For Table type Native table shouldbe selected 8. Under Schema section for Auto detet chock the Schema andinpt Parameters 9. Accept the remining default vales and ick reat Table bigduery erates loeb to crest the table and upload eatin the table hie ray take a fee seconds) 10. (Optional) To rackob progress, ick Job History. 11, When the oobi complete, click logdata > accesso, 12on the table detail page, click Dealt view th table proper and thn lek Preview tovew the table data, ach ow nthe table loge hit ona eb server. Theft eld eting fli the IP adress ofthe clint The fourth through ninth feds log the day. mon yer hour minute, and second at which the hit occured. n this act you wile about the dalypatem of oad on this webserver. Clk check my progress to vey the object Load data fom Cloud Storage into BigQuery Task 3: Perform a query on the data using the BigQuery web UI Intis sxcton ofthe la, you use the BigQuery web Ul to query the acesslog able Yeu created previously 1. Inthe Query editor windows. type (or opr and past) te folowing query 2 Because youre igavery ta automatically dlacover the echema when you loadthe dat, the hour ofthe day during whieh each ee it avd isin a fl aed Inne, Notice thatthe Query Valatr tl you thatthe quety yt vali (dicated by the oeen check mar) and neat how much date the query wil process. The ‘amount of data procesed alone yuo determine the pric ofthe avery usig the Clu Platform Pricing Caleator. 3-Click Rum and examine the feu. At what tine of day ithe website busiest” When Isiteast ber Task 4: Perform a query on the data using the bq command In this section ofthe lab, you use the bq commans in Cloud Shell to query the aecesslog tale you created pravicush. 1. onthe Google Cloud Platform Console cok Activate Cloud Sheil & lick Continue 2.Atthe Cou! shell rem. entrhis command ‘The fret tine you use he by command caches your Googie Cloud atform creemile,end hen asks yout chocce your deft project Choose the project that Owikbs assigned you's. name willeok ke quklabe-aep-followedy 2 hexadecimal numb ‘The by command then performs the ston requested on ts command ne What [URL offered by his web server was mostpopular Which was leas popular Congratulations! Inti bs. you lace date etre in Cu Storage into table hosted by Goals SBigquey You then queied he data to discover patterns End your lab When youhave completed yours, cick End Lab Qiklbs removes the resources you've used and clean the account for you. ‘You willbe von an epporurity trate the lb experienc, Select the aplicable numberof stars tpe@ comment. an then lick Submit “The number of star indicates the following stars Very diated + Zeta Dissatisies You ean close the dalog box i you dont want to provide feedback For feedback suggestion or cerectons, paste use the Support ab. Copyright 2019 Google LLC Alright reserved. Google andthe Google lage are tradematks ef Goose LLC All other company and product names maybe Ladematks ofthe respective companies with which they ate associated

You might also like