Hadoop平臺(tái)可視化展示SuperSet使用手冊(cè)_第1頁(yè)
Hadoop平臺(tái)可視化展示SuperSet使用手冊(cè)_第2頁(yè)
Hadoop平臺(tái)可視化展示SuperSet使用手冊(cè)_第3頁(yè)
Hadoop平臺(tái)可視化展示SuperSet使用手冊(cè)_第4頁(yè)
Hadoop平臺(tái)可視化展示SuperSet使用手冊(cè)_第5頁(yè)
已閱讀5頁(yè),還剩9頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、Hadoop 平臺(tái)可視化展示工具SupersetApache Superset (in cubati ng)Apache Superset (in cubat ing) is a moder n, en terprise-ready bus in ess in tellige nee web applicati onOverviewFeatures? A rich set of data visualizati ons? An easy-to-use in terface for explori ng and visualizi ng data? Create and share dashbo

2、ards? Enterprise-ready authentication with integration with major authentication providers (database, Ope nID, LDAP, OAuth & REMOTE_USER through Flask AppBuilder)? An exte nsible, high-gra nu larity security/permissio n model allowi ng in tricate rules on who can access in dividual features and

3、the dataset? A simple semantic layer, allowing users to control how data sources are displayed in the UI by defining which fields should show up in which drop-down and which aggregation and function metrics are made available to the user? In tegrati on with most SQL-speaki ng RDBMS through SQLAlchem

4、y? Deep in tegrati on with Druid.ioTutorial for Superset Admi nistratorsThis tutorial targets a Superset adm ini strator: some one con figuri ng Superset for an orga ni zati onon behalf of users. We ' ll show you how to connect Superset to a new database and con figure atable in that database fo

5、r analysis. You' ll also explore the data you' ve exposed and visualizati on to a dashboard so that you get a feel for the en d-to-e nd user experie nee.Conn ect ing to a new databaseWe assume you already have a database con figured and can connect to it from the in sta nee on which you '

6、; re running Superset. If you' re just testing Superset and want to explore sample data,you can load some sample PostgreSQL datasets into a fresh DB, or con figure the example weather data we use here.Under the Sources menu, select the Databases option:§ Sources v M SlicesDatabases醫(yī) TablesO

7、n the result ing page, click on the gree n plus sig n, n ear the top left:List DatabaseSearch vYou can con figure a nu mber of adva need opti ons on this page, but for this walkthrough, you only need to do two things :1. Name your database connection:DatabaseWeather Data2. Provide the SQLAlchemy Con

8、nection URI and test the connection:SOLAIchemyURIpostgresql /username passwordlocahost:5432/wealh?rRefer to the SqlAlchemy docs for more information on how to structure your UW.Test ConnectionThis example shows the conn ecti on stri ng for our test weather database. As no ted in the textbelow the UR

9、I, you should refer to the SQLAIchemy docume ntati on oncreati ng new connectionURIs for your target database.Click the Test Connectionbutt on to confirm things work end to end. Once Superset cansuccessfully connect and authe nticate, you should see a popup like this:127,0.0J:8088 says:Seems OKIPrev

10、ent this page from creating additional dialogs.Moreover, you should also see the list of tables Superset can read from the schema you conn ected to, at the bottom of the page:Tables:weather_data_denormalized wea(her_daia staiton.metadata weather.typesIf the conn ecti on looks good, save the con figu

11、rati on by clicki ng the Save butt on at the bottom of the page:Addi ng a new tableNow that you ' ve con figured a database, you' II n eed to add specific tables to Superset that youlike to query.Under the Sources menu, select the Tables option:On the result ing page, click on the gree n plu

12、s sig n, n ear the top left:List Sqla TobleYou only need a few pieces of information to add a new table to Superset:? The n ame of the tableTable Nameweather_d atadenorm al izedName of the table that exists in the source database? The target database from the Database drop-down menu (i.e. the one yo

13、u just added above)? Opti on ally, the database schema. If the table exists in the“ default ” schema (e.g.the public schema in PostgreSQL or Redshift), you can leave the schema field blank.Click on the Save butt on to save the con figurati on:Save®Whe n redirected back to the list of tables, yo

14、u should see a message in dicati ng that your table was created:The toble was creaEed As part of Mii, two phase ccnfiguirBlign process you shpuld now click the edit burton by th# new table io conTigure it.This message also directs you to edit the table configuration. We' ll edit a limited portio

15、n oconfiguration now - just to get you started - and leave the rest for a more advaneed tutorial.Click on the edit butt on n ext to the table you' ve created:Edit recordTableweat he r_d at a_den orma( izedmuldformaLtime_seri esOn the resulting page, click on the List Table Column tab. Here, you

16、' ll define the way you can use specific columns of your table when exploring your data. We' ll run through these options todescribe their purpose:? If you want users to group metrics by a specific field, mark it as Groupable .? If you need to filter on a specific field, mark it as Filterabl

17、e .? Is this field something you' d like to get the distinet count of? ChecCthunt Distinetbox.? Is this a metric you want to sum, or get basic summary statistics for? The Sum, Min ,and Max columns will help.? The is temporal field should be checked for any date or time fields. We' ll cover h

18、ow tlmani fests itself in an alyses in a mome nt.Here ' s how we ' ve con figured fields for the weather data. Eve n for measures like the weather measurements (precipitation, snowfall, etc.), it' s ideal to group and filter by these values:Clunm1 Fihw細(xì)* I Count DUlirtl 【3mi Hi I Min 1Mb

19、H. 1 It1SS6 SSSSQ9 口 oSBa口口pliasns aaaQni|sanpi.SQSDQAs with the con figurati ons above, click the Save butt on to save these setti ngs.Explori ng your dataTo start explori ng your data, simply click on the table n ame you just created in the list of available tables:weather.dat a_denormalizedBy def

20、ault, you ' ll be presented with a Table View:Oatmource ithsrt Type7vVea"nar Da:a.|wea1her data d&TjrTTia” 1/Let ' s walk through a basic query to get the count of all records in our table. First, wechange the Since filter to capture the range of our data. You can use simple phrases

21、 to applythese filters, like3 years agoSince ®7 days ago3 years agoThe upper limit for time, theUn til filter, defaults to“ now” , which may or may not be what youwan t.Look for the Metrics section under the GROUP BY header, and start typing“ Count ” - you ' llist of metrics match ing what

22、you type:Metrics®CnunCOUNTScount disljnci ineasurement dat&Select the COUNT(*) metric, the n click the gree nQuery butt on n ear the top of the explore:* QueryQ Save asYou' II see your results in the table:COHJHt26.507J12Let ' s group this by theweather_description field to get the

23、count of records by the type of weather recorded by adding it to the Group by section:Group by ©a waWer_descriptionand run the query:rna'sHibLG£|b|ffJHXICCHnuiLet ' s find a more useful data point: the top 10 times and places that recorded the highesttemperature in 2015.We replace

24、weather_description with latitude , Iongitude and measurement_date in the Group by secti on:Group by x latitude x longitude x measuremem_dateAnd replace COUNT(*) with max_measurement_flagMetrics®X max _ measuremenThe max_measurement_flag metric was created when we checked the box under Max and

25、next to the measureme nt_flag field, in dicat ing that this field was nu meric and that we wan ted to find its maximum value whe n grouped by specific fields.In our case, measurement_flag is the value of the measurement taken, which clearly depends on the type of measurement (the researchers recorde

26、d different values for precipitation and temperature). Therefore, we must filter our query only on records where the weather_descripti on is equal to “ Maximum temperature ” , which we do inFtihers sect ion at the bottom of the explore:Filters w©ather_dAscriptionMaximurr temperatureFin ally, si

27、nce we only care about the top 10 measureme nts, we limit our results to 10 recordsusing the Row limit option under the Options header:Row limit10We click Query and get the following results:liUiudt*11 5> 42Ml2體的11 $421 2幢KM1旳昭730JHQUShHTQDHIQDW6Q.3i和QtKTWCnQQW47.MH115 9-7M1 W施TWMQQl他3 2171?aiiSr

28、D44$ir»acao:600*0ll«4-lSTJO.M.Oa600-S3J:1 TH2Q1IM4-21T3DJM.0CI60035.0A3fi201 M414T30.Ml.ai右00In this dataset, the maximum temperature is recorded in ten ths of a degree Celsius. The top value of 1370, measured in the middle of Nevada, is equal to 137 C, or roughly 278 degrees F. Itunlikely

29、 this value was correctly recorded. We' ve already been able to investigate some outlierswith Superset, but this just scratches the surface of what we can do.You may want to do a couple more thi ngs with this measure:? The default formatting shows values like 1.37k, which may be difficult for so

30、me users to read.It ' s likely you may want to see the full, comma-separated value. You can change the formatting of any measure by editing its config ( Edit Table Config > List Sql Metric > Edit Metric > D3Format)? Moreover, you may want to see the temperature measureme nts in plain de

31、grees C, not ten ths of a degree. Or you may want to con vert the temperature to degrees Fahre nheit. You can change the SQL that gets executed agains the database, baking the logic into the measure itself (Edit Table Config > List Sql Metric > Edit Metric > SQL Expression )For now, though,

32、 let ' s create a better visualization of these data and add it to a dashboard.We change the Chart Type to“ Distribution - Bar Chart” :Datasource & Chart TypeVVteather Data.weather_data_denormalized* GTDistribution - Bar Chart*Our filter on Maximum temperature measureme nts was reta in ed, b

33、ut the query and formatti ng options are dependent on the chart type, so you' ll have to set the values again:Chart OptionsSeries®x latitudem lonQitiidek measurement_dateBreakdowns Metrics m msx measurement flagRow limitII want to aYou should note the extensive formatting options for this c

34、hart: the ability to set axis labels, margi ns, ticks, etc. To make the data prese ntable to a broad audie nee, youof these to slices that end up in dashboards. For now, though, we run our query and get the followi ng chart:Creati ng a slice and dashboardThis view might be in terest ing to researche

35、rs, so let a Slice .s save it. In Superset, a saved query isTo create a slice, click the Save as butt on n ear the top-left of the explore:O Save asA popup should appear, asking you to name the slice, and optionally add it to a dashboard. Since we haven ' t yet created any dashboards, we can create one and immediately add our slice to it. Let ' s do it:Save a Sliceas Tap 10 Cates nd PlaceDo net add to a dashboardAdd slice to existing dashbordOdd to nev/ dashboard leather DataSaveCancelClick Save, which will direct you bac

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論