Skip to content

Instantly share code, notes, and snippets.

@suewoon
Created July 15, 2021 01:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suewoon/5bb97eb95a970345a06e687dc7aafd9d to your computer and use it in GitHub Desktop.
Save suewoon/5bb97eb95a970345a06e687dc7aafd9d to your computer and use it in GitHub Desktop.
DataForest Zeppelin 노트북 import를 위한 .json 파일
{"paragraphs":[{"text":"%md\n## Database 확인\n","user":"example","dateUpdated":"2021-07-13T16:37:23+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1626161831868_-129503561","id":"20210713-163711_1572403387","dateCreated":"2021-07-13T16:37:11+0900","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:40638","dateFinished":"2021-07-13T16:37:23+0900","dateStarted":"2021-07-13T16:37:23+0900","results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2>Database 확인</h2>\n</div>"}]}},{"text":"%jdbc(hive)\nshow databases;","user":"example","dateUpdated":"2021-07-13T16:01:53+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{"0":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"database_name":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}},"1":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"database_name":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}}},"editorSetting":{"language":"sql","editOnDblClick":false,"completionSupport":true},"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TABLE","data":"database_name\nexample__db_foo\n"}]},"apps":[],"jobName":"paragraph_1626143197338_-1581966492","id":"20210713-112637_546591027","dateCreated":"2021-07-13T11:26:37+0900","dateStarted":"2021-07-13T16:01:53+0900","dateFinished":"2021-07-13T16:01:54+0900","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:34558"},{"text":"%md\n## External Database 생성","user":"example","dateUpdated":"2021-07-13T16:37:04+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1626161812310_-1717914672","id":"20210713-163652_2009986341","dateCreated":"2021-07-13T16:36:52+0900","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:40535","dateFinished":"2021-07-13T16:37:07+0900","dateStarted":"2021-07-13T16:37:04+0900","results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2>External Database 생성</h2>\n</div>"}]}},{"text":"%jdbc(hive)\nCREATE DATABASE example__db_movie_rating\nCOMMENT 'MovieLens 20M Dataset'\nLOCATION '/user/example/warehouse/example__db_movie_rating'\nWITH DBPROPERTIES ('creater'='suewoon', 'date'='2021-07-01');\n\nSHOW DATABASES LIKE 'example__db_movie.*';\n\nDESCRIBE DATABASE example__db_movie_rating;","user":"example","dateUpdated":"2021-07-13T16:15:39+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{"1":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"database_name":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}},"2":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"db_name":"string","comment":"string","location":"string","owner_name":"string","owner_type":"string","parameters":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}}},"editorSetting":{"language":"sql","editOnDblClick":false,"completionSupport":true},"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"Query executed successfully. Affected rows : -1"},{"type":"TABLE","data":"database_name\nexample__db_movie_rating\n"},{"type":"TABLE","data":"db_name\tcomment\tlocation\towner_name\towner_type\tparameters\nexample__db_movie_rating\tMovieLens 20M Dataset\thdfs://koya/user/example/warehouse/example__db_movie_rating\texample\tUSER\t\n"}]},"apps":[],"jobName":"paragraph_1626150261064_26704997","id":"20210713-132421_1291877849","dateCreated":"2021-07-13T13:24:21+0900","dateStarted":"2021-07-13T16:02:30+0900","dateFinished":"2021-07-13T16:02:30+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:34559"},{"text":"%md\n## Parquet 파일로 부터 테이블 생성 ","user":"example","dateUpdated":"2021-07-13T16:37:58+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1626161851887_1527957647","id":"20210713-163731_1867181770","dateCreated":"2021-07-13T16:37:31+0900","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:40732","dateFinished":"2021-07-13T16:37:58+0900","dateStarted":"2021-07-13T16:37:58+0900","results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2>Parquet 파일로 부터 테이블 생성</h2>\n</div>"}]}},{"text":"%jdbc(hive)\nUSE example__db_movie_rating;\nDROP TABLE movie_rating;\nCREATE EXTERNAL TABLE movie_rating (movieId int, title string, genre string, releasedYear int, userId int, rating double)\npartitioned by (year int, month int) stored as parquet \nlocation '/user/example/movie_rating';\n","user":"example","dateUpdated":"2021-07-13T16:10:53+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"sql","editOnDblClick":false,"completionSupport":true},"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"Query executed successfully. Affected rows : -1"},{"type":"TEXT","data":"Query executed successfully. Affected rows : -1"},{"type":"TEXT","data":"Query executed successfully. Affected rows : -1"}]},"apps":[],"jobName":"paragraph_1626153653148_-193959","id":"20210713-142053_1209639713","dateCreated":"2021-07-13T14:20:53+0900","dateStarted":"2021-07-13T16:10:53+0900","dateFinished":"2021-07-13T16:10:54+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:34560"},{"text":"%md\n## 파티션 추가 및 메타데이터 업데이트","user":"example","dateUpdated":"2021-07-13T16:39:02+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1626161877611_-553287152","id":"20210713-163757_585128543","dateCreated":"2021-07-13T16:37:57+0900","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:40807","dateFinished":"2021-07-13T16:39:02+0900","dateStarted":"2021-07-13T16:39:02+0900","results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2>파티션 추가 및 메타데이터 업데이트</h2>\n</div>"}]}},{"text":"%jdbc(hive)\nMSCK REPAIR TABLE movie_rating;\n\nSHOW TABLES;\n\nDESCRIBE movie_rating;\n\nSELECT * FROM movie_rating limit 3;","user":"example","dateUpdated":"2021-07-13T16:37:57+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{"0":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"tab_name":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}},"1":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"tab_name":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}},"2":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{"columns":[{"name":"movie_rating.movieid","visible":true,"width":"*","sort":{},"filters":[{}],"pinned":""},{"name":"movie_rating.title","visible":true,"width":"*","sort":{"priority":0,"direction":"asc"},"filters":[{}],"pinned":""},{"name":"movie_rating.genre","visible":true,"width":"*","sort":{},"filters":[{}],"pinned":""},{"name":"movie_rating.rating","visible":true,"width":"*","sort":{},"filters":[{}],"pinned":""},{"name":"movie_rating.year","visible":true,"width":"*","sort":{},"filters":[{}],"pinned":""},{"name":"movie_rating.month","visible":true,"width":"*","sort":{},"filters":[{}],"pinned":""}],"scrollFocus":{},"selection":[],"grouping":{"grouping":[],"aggregations":[],"rowExpandedStates":{}},"treeView":{},"pagination":{"paginationCurrentPage":1,"paginationPageSize":250}},"tableColumnTypeState":{"names":{"col_name":"string","data_type":"string","comment":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}},"3":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"movie_rating.movieid":"string","movie_rating.title":"string","movie_rating.genre":"string","movie_rating.releasedyear":"string","movie_rating.userid":"string","movie_rating.rating":"string","movie_rating.year":"string","movie_rating.month":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}}},"editorSetting":{"language":"sql","editOnDblClick":false,"completionSupport":true},"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"Query executed successfully. Affected rows : -1"},{"type":"TABLE","data":"tab_name\nmovie_rating\n"},{"type":"TABLE","data":"col_name\tdata_type\tcomment\nmovieid\tint\t\ntitle\tstring\t\ngenre\tstring\t\nreleasedyear\tint\t\nuserid\tint\t\nrating\tdouble\t\nyear\tint\t\nmonth\tint\t\n\tnull\tnull\n# Partition Information\tnull\tnull\n# col_name\tdata_type\tcomment\nyear\tint\t\nmonth\tint\t\n"},{"type":"TABLE","data":"movie_rating.movieid\tmovie_rating.title\tmovie_rating.genre\tmovie_rating.releasedyear\tmovie_rating.userid\tmovie_rating.rating\tmovie_rating.year\tmovie_rating.month\n1176\tDouble Life of Veronique, The (Double Vie de Véronique, La) (1991)\tRomance\t1991\t28507\t4.0\t1995\t1\n1176\tDouble Life of Veronique, The (Double Vie de Véronique, La) (1991)\tFantasy\t1991\t28507\t4.0\t1995\t1\n1176\tDouble Life of Veronique, The (Double Vie de Véronique, La) (1991)\tDrama\t1991\t28507\t4.0\t1995\t1\n"}]},"apps":[],"jobName":"paragraph_1626153866568_2033206907","id":"20210713-142426_1353649116","dateCreated":"2021-07-13T14:24:26+0900","dateStarted":"2021-07-13T16:10:57+0900","dateFinished":"2021-07-13T16:11:00+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:34561"},{"text":"%jdbc(hive)\nSHOW PARTITIONS movie_rating;","user":"example","dateUpdated":"2021-07-13T14:50:20+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{"0":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"partition":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}}},"editorSetting":{"language":"sql","editOnDblClick":false,"completionSupport":true},"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TABLE","data":"partition\nyear=1995/month=1\nyear=1996/month=1\nyear=1996/month=10\nyear=1996/month=11\nyear=1996/month=12\nyear=1996/month=2\nyear=1996/month=3\nyear=1996/month=4\nyear=1996/month=5\nyear=1996/month=6\nyear=1996/month=7\nyear=1996/month=8\nyear=1996/month=9\nyear=1997/month=1\nyear=1997/month=10\nyear=1997/month=11\nyear=1997/month=12\nyear=1997/month=2\nyear=1997/month=3\nyear=1997/month=4\nyear=1997/month=5\nyear=1997/month=6\nyear=1997/month=7\nyear=1997/month=9\nyear=1998/month=1\nyear=1998/month=10\nyear=1998/month=11\nyear=1998/month=12\nyear=1998/month=2\nyear=1998/month=3\nyear=1998/month=4\nyear=1998/month=5\nyear=1998/month=6\nyear=1998/month=7\nyear=1998/month=8\nyear=1998/month=9\nyear=1999/month=1\nyear=1999/month=10\nyear=1999/month=11\nyear=1999/month=12\nyear=1999/month=2\nyear=1999/month=3\nyear=1999/month=4\nyear=1999/month=5\nyear=1999/month=6\nyear=1999/month=7\nyear=1999/month=8\nyear=1999/month=9\nyear=2000/month=1\nyear=2000/month=10\nyear=2000/month=11\nyear=2000/month=12\nyear=2000/month=2\nyear=2000/month=3\nyear=2000/month=4\nyear=2000/month=5\nyear=2000/month=6\nyear=2000/month=7\nyear=2000/month=8\nyear=2000/month=9\nyear=2001/month=1\nyear=2001/month=10\nyear=2001/month=11\nyear=2001/month=12\nyear=2001/month=2\nyear=2001/month=3\nyear=2001/month=4\nyear=2001/month=5\nyear=2001/month=6\nyear=2001/month=7\nyear=2001/month=8\nyear=2001/month=9\nyear=2002/month=1\nyear=2002/month=10\nyear=2002/month=11\nyear=2002/month=12\nyear=2002/month=2\nyear=2002/month=3\nyear=2002/month=4\nyear=2002/month=5\nyear=2002/month=6\nyear=2002/month=7\nyear=2002/month=8\nyear=2002/month=9\nyear=2003/month=1\nyear=2003/month=10\nyear=2003/month=11\nyear=2003/month=12\nyear=2003/month=2\nyear=2003/month=3\nyear=2003/month=4\nyear=2003/month=5\nyear=2003/month=6\nyear=2003/month=7\nyear=2003/month=8\nyear=2003/month=9\nyear=2004/month=1\nyear=2004/month=10\nyear=2004/month=11\nyear=2004/month=12\nyear=2004/month=2\nyear=2004/month=3\nyear=2004/month=4\nyear=2004/month=5\nyear=2004/month=6\nyear=2004/month=7\nyear=2004/month=8\nyear=2004/month=9\nyear=2005/month=1\nyear=2005/month=10\nyear=2005/month=11\nyear=2005/month=12\nyear=2005/month=2\nyear=2005/month=3\nyear=2005/month=4\nyear=2005/month=5\nyear=2005/month=6\nyear=2005/month=7\nyear=2005/month=8\nyear=2005/month=9\nyear=2006/month=1\nyear=2006/month=10\nyear=2006/month=11\nyear=2006/month=12\nyear=2006/month=2\nyear=2006/month=3\nyear=2006/month=4\nyear=2006/month=5\nyear=2006/month=6\nyear=2006/month=7\nyear=2006/month=8\nyear=2006/month=9\nyear=2007/month=1\nyear=2007/month=10\nyear=2007/month=11\nyear=2007/month=12\nyear=2007/month=2\nyear=2007/month=3\nyear=2007/month=4\nyear=2007/month=5\nyear=2007/month=6\nyear=2007/month=7\nyear=2007/month=8\nyear=2007/month=9\nyear=2008/month=1\nyear=2008/month=10\nyear=2008/month=11\nyear=2008/month=12\nyear=2008/month=2\nyear=2008/month=3\nyear=2008/month=4\nyear=2008/month=5\nyear=2008/month=6\nyear=2008/month=7\nyear=2008/month=8\nyear=2008/month=9\nyear=2009/month=1\nyear=2009/month=10\nyear=2009/month=11\nyear=2009/month=12\nyear=2009/month=2\nyear=2009/month=3\nyear=2009/month=4\nyear=2009/month=5\nyear=2009/month=6\nyear=2009/month=7\nyear=2009/month=8\nyear=2009/month=9\nyear=2010/month=1\nyear=2010/month=10\nyear=2010/month=11\nyear=2010/month=12\nyear=2010/month=2\nyear=2010/month=3\nyear=2010/month=4\nyear=2010/month=5\nyear=2010/month=6\nyear=2010/month=7\nyear=2010/month=8\nyear=2010/month=9\nyear=2011/month=1\nyear=2011/month=10\nyear=2011/month=11\nyear=2011/month=12\nyear=2011/month=2\nyear=2011/month=3\nyear=2011/month=4\nyear=2011/month=5\nyear=2011/month=6\nyear=2011/month=7\nyear=2011/month=8\nyear=2011/month=9\nyear=2012/month=1\nyear=2012/month=10\nyear=2012/month=11\nyear=2012/month=12\nyear=2012/month=2\nyear=2012/month=3\nyear=2012/month=4\nyear=2012/month=5\nyear=2012/month=6\nyear=2012/month=7\nyear=2012/month=8\nyear=2012/month=9\nyear=2013/month=1\nyear=2013/month=10\nyear=2013/month=11\nyear=2013/month=12\nyear=2013/month=2\nyear=2013/month=3\nyear=2013/month=4\nyear=2013/month=5\nyear=2013/month=6\nyear=2013/month=7\nyear=2013/month=8\nyear=2013/month=9\nyear=2014/month=1\nyear=2014/month=10\nyear=2014/month=11\nyear=2014/month=12\nyear=2014/month=2\nyear=2014/month=3\nyear=2014/month=4\nyear=2014/month=5\nyear=2014/month=6\nyear=2014/month=7\nyear=2014/month=8\nyear=2014/month=9\nyear=2015/month=1\nyear=2015/month=2\nyear=2015/month=3\n"}]},"apps":[],"jobName":"paragraph_1626153864389_2126192357","id":"20210713-142424_404260267","dateCreated":"2021-07-13T14:24:24+0900","dateStarted":"2021-07-13T14:50:20+0900","dateFinished":"2021-07-13T14:50:20+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:34562"},{"text":"%md\n## 쿼리 예제 1\n### 각 년도에 개봉한 영화 중에서 평점 Top3 \n","user":"example","dateUpdated":"2021-07-13T16:39:44+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1626161951559_1808638133","id":"20210713-163911_481875892","dateCreated":"2021-07-13T16:39:11+0900","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:41057","dateFinished":"2021-07-13T16:39:44+0900","dateStarted":"2021-07-13T16:39:44+0900","results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2>쿼리 예제 1</h2>\n<h3>각 년도에 개봉한 영화 중에서 평점 Top3</h3>\n</div>"}]}},{"text":"%jdbc(hive)\nSELECT releasedYear, title, avgRating, row_num \nFROM (SELECT releasedYear, title, avg(rating) as avgRating , rank() over (partition by releasedYear order by avg(rating) desc) as row_num \nFROM movie_rating \nGROUP BY releasedYear, title\n) T\nWHERE row_num <= 3\nORDER BY releasedYear, row_num;","user":"example","dateUpdated":"2021-07-13T16:26:15+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{"0":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{"columns":[{"name":"releasedyear","visible":true,"width":"*","sort":{"priority":0,"direction":"desc"},"filters":[{}],"pinned":""},{"name":"title","visible":true,"width":334,"sort":{},"filters":[{}],"pinned":""},{"name":"avgrating","visible":true,"width":"*","sort":{},"filters":[{}],"pinned":""},{"name":"row_num","visible":true,"width":"*","sort":{},"filters":[{}],"pinned":""}],"scrollFocus":{},"selection":[],"grouping":{"grouping":[],"aggregations":[],"rowExpandedStates":{}},"treeView":{},"pagination":{"paginationCurrentPage":1,"paginationPageSize":250}},"tableColumnTypeState":{"names":{"releasedyear":"string","title":"string","avgrating":"string","row_num":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false},"multiBarChart":{"rotate":{"degree":"-45"},"xLabelStatus":"default"},"stackedAreaChart":{"rotate":{"degree":"-45"},"xLabelStatus":"default"}},"commonSetting":{},"keys":[{"name":"releasedyear","index":0,"aggr":"sum"}],"groups":[],"values":[{"name":"title","index":1,"aggr":"sum"}]},"helium":{}}},"editorSetting":{"language":"sql","editOnDblClick":false,"completionSupport":true},"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TABLE","data":"releasedyear\ttitle\tavgrating\trow_num\nnull\tFawlty Towers (1975-1979)\t4.128260869565217\t1\nnull\tBabylon 5\t3.8660714285714284\t2\nnull\tBig Bang Theory, The (2007-)\t3.4216867469879517\t3\n1896\tArrival of a Train, The (1896)\t3.4375\t1\n1902\tTrip to the Moon, A (Voyage dans la lune, Le) (1902)\t3.7381889763779528\t1\n1903\tGreat Train Robbery, The (1903)\t3.340909090909091\t1\n1910\tFrankenstein (1910)\t3.466666666666667\t1\n1912\tCameraman's Revenge, The (Mest kinematograficheskogo operatora) (1912)\t3.892857142857143\t1\n1914\tTillie's Punctured Romance (1914)\t3.076923076923077\t1\n1914\tAlways Tell Your Wife (1914)\t1.8846153846153846\t2\n1915\tVampires, Les (1915)\t3.433333333333333\t1\n1915\tBirth of a Nation, The (1915)\t3.228650137741047\t2\n1916\tIntolerance: Love's Struggle Throughout the Ages (1916)\t3.7192513368983957\t1\n1916\tSnow White (1916)\t3.317073170731707\t2\n1916\t20,000 Leagues Under the Sea (1916)\t3.257142857142857\t3\n1917\tImmigrant, The (1917)\t3.7\t1\n1917\tEasy Street (1917)\t3.25\t2\n1918\tDog's Life, A (1918)\t3.608974358974359\t1\n1918\tShoulder Arms (1918)\t3.235294117647059\t2\n1919\tBroken Blossoms or The Yellow Man and the Girl (1919)\t3.5952380952380953\t1\n1919\tDaddy Long Legs (1919)\t3.433774834437086\t2\n1919\tMale and Female (1919)\t2.9285714285714284\t3\n1920\tCabinet of Dr. Caligari, The (Cabinet des Dr. Caligari., Das) (1920)\t3.9123188405797102\t1\n1920\tOne Week (1920)\t3.8043478260869565\t2\n1920\tWay Down East (1920)\t3.641304347826087\t3\n1921\tKid, The (1921)\t3.9176470588235293\t1\n1921\tGoat, The (1921)\t3.823529411764706\t2\n1921\tPhantom Carriage, The (Körkarlen) (1921)\t3.7804878048780486\t3\n1922\tNosferatu (Nosferatu, eine Symphonie des Grauens) (1922)\t3.8980219192729217\t1\n1922\tCops (1922)\t3.82\t2\n1922\tNanook of the North (1922)\t3.7333333333333334\t3\n1923\tSafety Last! (1923)\t3.9357366771159876\t1\n1923\tOur Hospitality (1923)\t3.8118811881188117\t2\n1923\tTen Commandments, The (1923)\t3.78125\t3\n1924\tNibelungen: Siegfried, Die (1924)\t3.9761904761904763\t1\n1924\tSherlock Jr. (1924)\t3.9393564356435644\t2\n1924\tLast Laugh, The (Letzte Mann, Der) (1924)\t3.898076923076923\t3\n1925\tGold Rush, The (1925)\t4.088090551181103\t1\n1925\tSeven Chances (1925)\t3.915151515151515\t2\n1925\tBattleship Potemkin (1925)\t3.8960286817429672\t3\n1926\tGeneral, The (1926)\t4.162769784172662\t1\n1926\tFaust (1926)\t3.801498127340824\t2\n1926\tAdventures of Prince Achmed, The (Abenteuer des Prinzen Achmed, Die) (1926)\t3.6447368421052633\t3\n1927\tSunrise: A Song of Two Humans (1927)\t4.039045553145336\t1\n1927\tMetropolis (1927)\t3.990895714548464\t2\n1927\tWings (1927)\t3.721362229102167\t3\n1928\tPassion of Joan of Arc, The (Passion de Jeanne d'Arc, La) (1928)\t4.03652058432935\t1\n1928\tCircus, The (1928)\t3.9110169491525424\t2\n1928\tSteamboat Bill, Jr. (1928)\t3.890625\t3\n1929\tMan with the Movie Camera, The (Chelovek s kino-apparatom) (1929)\t3.9644495412844036\t1\n1929\tPandora's Box (Büchse der Pandora, Die) (1929)\t3.8850574712643677\t2\n1929\tAndalusian Dog, An (Chien andalou, Un) (1929)\t3.853125\t3\n1930\tAll Quiet on the Western Front (1930)\t3.954230769230769\t1\n1930\tAnimal Crackers (1930)\t3.9343817787418653\t2\n1930\tBlue Angel, The (Blaue Engel, Der) (1930)\t3.8930936613055818\t3\n1931\tM (1931)\t4.193171077504726\t1\n1931\tCity Lights (1931)\t4.174122637871192\t2\n1931\tMaltese Falcon, The (a.k.a. Dangerous Female) (1931)\t4.058135072908672\t3\n1932\tTrouble in Paradise (1932)\t3.972938144329897\t1\n1932\tHorse Feathers (1932)\t3.9611048478015785\t2\n1932\tI Am a Fugitive from a Chain Gang (1932)\t3.8538732394366195\t3\n1933\tDuck Soup (1933)\t4.129646256060334\t1\n1933\tTestament of Dr. Mabuse, The (Das Testament des Dr. Mabuse) (1933)\t3.89917695473251\t2\n1933\tLand Without Bread (Hurdes, tierra sin pan, Las) (1933)\t3.7222222222222223\t3\n1934\tThin Man, The (1934)\t4.184187016081\t1\n1934\tIt Happened One Night (1934)\t4.170052581261951\t2\n1934\tGay Divorcee, The (1934)\t3.930400890868597\t3\n1935\tTop Hat (1935)\t4.058018867924528\t1\n1935\tNight at the Opera, A (1935)\t4.047279792746114\t2\n1935\t39 Steps, The (1935)\t4.003311258278146\t3\n1936\tModern Times (1936)\t4.143086816720257\t1\n1936\tMy Man Godfrey (1936)\t4.068142610695802\t2\n1936\tDay in the Country, A (Partie de campagne) (1936)\t4.0\t3\n1937\tGrand Illusion (La grande illusion) (1937)\t4.150878293601004\t1\n1937\tShall We Dance (1937)\t3.988339222614841\t2\n1937\tDay at the Races, A (1937)\t3.943871706758305\t3\n1938\tLady Vanishes, The (1938)\t4.086520947176685\t1\n1938\tBringing Up Baby (1938)\t4.061102326632031\t2\n1938\tHoliday (1938)\t3.9544392523364484\t3\n1939\tRules of the Game, The (La règle du jeu) (1939)\t4.058\t1\n1939\tMr. Smith Goes to Washington (1939)\t4.03265056022409\t2\n1939\tNinotchka (1939)\t4.010283687943263\t3\n1940\tPhiladelphia Story, The (1940)\t4.171426401336777\t1\n1940\tHis Girl Friday (1940)\t4.1529984623270115\t2\n1940\tRebecca (1940)\t4.1159716251074805\t3\n1941\tMaltese Falcon, The (1941)\t4.187211791831357\t1\n1941\tCitizen Kane (1941)\t4.1304433442106445\t2\n1941\tLady Eve, The (1941)\t4.130185979971388\t3\n1942\tCasablanca (1942)\t4.258326830670664\t1\n1942\tPalm Beach Story, The (1942)\t4.0875995449374285\t2\n1942\tNow, Voyager (1942)\t3.9830148619957537\t3\n1943\tShadow of a Doubt (1943)\t4.1596180081855385\t1\n1943\tLife and Death of Colonel Blimp, The (1943)\t3.9786184210526314\t2\n1943\tOx-Bow Incident, The (1943)\t3.9141304347826087\t3\n1944\tDouble Indemnity (1944)\t4.224281931146873\t1\n1944\tLaura (1944)\t4.111321469140477\t2\n1944\tArsenic and Old Lace (1944)\t4.053597331012474\t3\n1945\tChildren of Paradise (Les enfants du paradis) (1945)\t4.11736641221374\t1\n1945\tRome, Open City (a.k.a. Open City) (Roma, città aperta) (1945)\t3.997907949790795\t2\n1945\tMildred Pierce (1945)\t3.951949229374433\t3\n1946\tBig Sleep, The (1946)\t4.207361186471333\t1\n1946\tNotorious (1946)\t4.1977899432279\t2\n1946\tBest Years of Our Lives, The (1946)\t4.114776444929117\t3\n1947\tOut of the Past (1947)\t4.118761552680222\t1\n1947\tPossessed (1947)\t3.9285714285714284\t2\n1947\tBlack Narcissus (1947)\t3.837431693989071\t3\n1948\tTreasure of the Sierra Madre, The (1948)\t4.161396702230844\t1\n1948\tBicycle Thieves (a.k.a. The Bicycle Thief) (a.k.a. The Bicycle Thieves) (Ladri di biciclette) (1948)\t4.143596986817326\t2\n1948\tKey Largo (1948)\t4.012602058927937\t3\n1949\tThird Man, The (1949)\t4.246001523229246\t1\n1949\tKind Hearts and Coronets (1949)\t4.067738231917336\t2\n1949\tWhite Heat (1949)\t4.007075471698113\t3\n1950\tSunset Blvd. (a.k.a. Sunset Boulevard) (1950)\t4.256934865900383\t1\n1950\tAll About Eve (1950)\t4.2041027766266055\t2\n1950\tRashomon (Rashômon) (1950)\t4.176724137931035\t3\n1951\tStrangers on a Train (1951)\t4.158614668218859\t1\n1951\tAfrican Queen, The (1951)\t4.101558046741403\t2\n1951\tStreetcar Named Desire, A (1951)\t4.008160703075958\t3\n1952\tIkiru (1952)\t4.124329159212881\t1\n1952\tSingin' in the Rain (1952)\t4.0808787552598105\t2\n1952\tHigh Noon (1952)\t4.075288403157256\t3\n1953\tStalag 17 (1953)\t4.105514316012726\t1\n1953\tWages of Fear, The (Salaire de la peur, Le) (1953)\t4.082865168539326\t2\n1953\tRoman Holiday (1953)\t4.081865458815635\t3\n1954\tSeven Samurai (Shichinin no samurai) (1954)\t4.2741796572216\t1\n1954\tRear Window (1954)\t4.271333600779414\t2\n1954\tOn the Waterfront (1954)\t4.163536498936924\t3\n1955\tSong of the Little Road (Pather Panchali) (1955)\t4.139947437582129\t1\n1955\tRififi (Du rififi chez les hommes) (1955)\t4.08311345646438\t2\n1955\tNight of the Hunter, The (1955)\t4.066315789473684\t3\n1956\tKilling, The (1956)\t4.0964285714285715\t1\n1956\tMan Escaped, A (Un condamné à mort s'est échappé ou Le vent souffle où il veut) (1956)\t3.9948979591836733\t2\n1956\tSearchers, The (1956)\t3.992951127819549\t3\n1957\tPaths of Glory (1957)\t4.2326233183856505\t1\n1957\t12 Angry Men (1957)\t4.224137931034483\t2\n1957\tWitness for the Prosecution (1957)\t4.146604938271605\t3\n1958\tTouch of Evil (1958)\t4.183022467147096\t1\n1958\tVertigo (1958)\t4.148006243791684\t2\n1958\tMusic Room, The (Jalsaghar) (1958)\t3.98\t3\n1959\tNorth by Northwest (1959)\t4.233538107122288\t1\n1959\t400 Blows, The (Les quatre cents coups) (1959)\t4.136267976148719\t2\n1959\tWorld of Apu, The (Apur Sansar) (1959)\t4.124836601307189\t3\n1960\tInherit the Wind (1960)\t4.090041279669762\t1\n1960\tPsycho (1960)\t4.076899587765281\t2\n1960\tApartment, The (1960)\t4.046146341463414\t3\n1961\tYojimbo (1961)\t4.211716774374825\t1\n1961\tHustler, The (1961)\t4.1246523388116305\t2\n1961\tThrough a Glass Darkly (Såsom i en spegel) (1961)\t4.0\t3\n1962\tTo Kill a Mockingbird (1962)\t4.188943056401923\t1\n1962\tLawrence of Arabia (1962)\t4.162102116658588\t2\n1962\tManchurian Candidate, The (1962)\t4.128504672897196\t3\n1963\tGreat Escape, The (1963)\t4.137655906089509\t1\n1963\tHigh and Low (Tengoku to jigoku) (1963)\t4.099833610648918\t2\n1963\tCharade (1963)\t4.069916297390448\t3\n1964\tDr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb (1964)\t4.247286821705426\t1\n1964\tLonely Wife, The (Charulata) (1964)\t4.038461538461538\t2\n1964\tSeven Days in May (1964)\t4.0206703910614525\t3\n1965\tRed Beard (Akahige) (1965)\t4.04932735426009\t1\n1965\tFor a Few Dollars More (Per qualche dollaro in più) (1965)\t3.9730487278999567\t2\n1965\tShop on Main Street, The (Obchod na korze) (1965)\t3.9679144385026737\t3\n1966\tMan for All Seasons, A (1966)\t4.13259538389072\t1\n1966\tGood, the Bad and the Ugly, The (Buono, il brutto, il cattivo, Il) (1966)\t4.123240894039735\t2\n1966\tPersona (1966)\t4.110200364298725\t3\n1967\tCool Hand Luke (1967)\t4.109838809125342\t1\n1967\tGraduate, The (1967)\t4.073889312753096\t2\n1967\tIn the Heat of the Night (1967)\t4.073789504204117\t3\n1968\tOnce Upon a Time in the West (C'era una volta il West) (1968)\t4.128545495802133\t1\n1968\tHigh School (1968)\t4.088235294117647\t2\n1968\tLion in Winter, The (1968)\t4.050214329454991\t3\n1969\tAndrei Rublev (Andrey Rublyov) (1969)\t4.075993091537133\t1\n1969\tButch Cassidy and the Sundance Kid (1969)\t4.0536379997428975\t2\n1969\tSorrow and the Pity, The (Le chagrin et la pitié) (1969)\t4.038461538461538\t3\n1970\tConformist, The (Conformista, Il) (1970)\t4.054037267080745\t1\n1970\tPatton (1970)\t4.0442564668382985\t2\n1970\tLittle Big Man (1970)\t3.980287627076618\t3\n1971\tHarold and Maude (1971)\t3.999814034217704\t1\n1971\tClockwork Orange, A (1971)\t3.995302502632218\t2\n1971\tLast Picture Show, The (1971)\t3.9950585651537334\t3\n1972\tGodfather, The (1972)\t4.364732196832306\t1\n1972\tPhone Box, The (Cabina, La) (1972)\t4.131578947368421\t2\n1972\tWinter Soldier (1972)\t4.045454545454546\t3\n1973\tSting, The (1973)\t4.173556210639153\t1\n1973\tScenes From a Marriage (Scener ur ett äktenskap) (1973)\t4.083501006036217\t2\n1973\tBadlands (1973)\t4.044859813084112\t3\n1974\tGodfather: Part II, The (1974)\t4.275640557704942\t1\n1974\tChinatown (1974)\t4.199673416067929\t2\n1974\tConversation, The (1974)\t4.089211618257261\t3\n1975\tOne Flew Over the Cuckoo's Nest (1975)\t4.24807897901911\t1\n1975\tMonty Python and the Holy Grail (1975)\t4.174146075581396\t2\n1975\tDersu Uzala (1975)\t4.075851393188855\t3\n1976\tTaxi Driver (1976)\t4.110575548384461\t1\n1976\tAll the President's Men (1976)\t4.0390660592255125\t2\n1976\tNetwork (1976)\t4.022281982328083\t3\n1977\tStar Wars: Episode IV - A New Hope (1977)\t4.190671901948552\t1\n1977\tAnnie Hall (1977)\t4.081258532145875\t2\n1977\tThat Obscure Object of Desire (Cet obscur objet du désir) (1977)\t4.003125\t3\n1978\tDon (1978)\t4.105263157894737\t1\n1978\tLast Waltz, The (1978)\t3.9956942949407965\t2\n1978\tDeer Hunter, The (1978)\t3.9866628830874005\t3\n1979\tApocalypse Now (1979)\t4.108899956691208\t1\n1979\tManhattan (1979)\t4.071038928837094\t2\n1979\tAlien (1979)\t4.041783855429476\t3\n1980\tCosmos (1980)\t4.2206196581196584\t1\n1980\tStar Wars: Episode V - The Empire Strikes Back (1980)\t4.188202061218635\t2\n1980\tRaging Bull (1980)\t4.083410565338276\t3\n1981\tRaiders of the Lost Ark (Indiana Jones and the Raiders of the Lost Ark) (1981)\t4.219009123455364\t1\n1981\tBoot, Das (Boat, The) (1981)\t4.139729650308551\t2\n1981\tProfessional, The (Le professionnel) (1981)\t4.101890989988877\t3\n1982\tBlade Runner (1982)\t4.133705693507174\t1\n1982\tGandhi (1982)\t3.993667730355006\t2\n1982\tFanny and Alexander (Fanny och Alexander) (1982)\t3.9653762268266086\t3\n1983\tChristmas Story, A (1983)\t4.030887583114272\t1\n1983\tStar Wars: Episode VI - Return of the Jedi (1983)\t4.004622216528961\t2\n1983\tSunless (Sans Soleil) (1983)\t3.9682926829268292\t3\n1984\tStop Making Sense (1984)\t4.1288777372262775\t1\n1984\tNausicaä of the Valley of the Wind (Kaze no tani no Naushika) (1984)\t4.092081583683263\t2\n1984\tKilling Fields, The (1984)\t4.09006993006993\t3\n1985\tGuest from the Future (Gostya iz buduschego) (1985)\t4.2\t1\n1985\tRan (1985)\t4.173611111111111\t2\n1985\tTampopo (1985)\t4.082474226804123\t3\n1986\tJean de Florette (1986)\t4.139051432091161\t1\n1986\tManon of the Spring (Manon des sources) (1986)\t4.082516339869281\t2\n1986\tLaputa: Castle in the Sky (Tenkû no shiro Rapyuta) (1986)\t4.061916878710772\t3\n1987\tPrincess Bride, The (1987)\t4.1767323390413065\t1\n1987\tMatewan (1987)\t4.06781914893617\t2\n1987\tFull Metal Jacket (1987)\t4.033179786554775\t3\n1988\tMy Neighbor Totoro (Tonari no Totoro) (1988)\t4.1494807797413005\t1\n1988\tThin Blue Line, The (1988)\t4.128888888888889\t2\n1988\tGrave of the Fireflies (Hotaru no haka) (1988)\t4.089743589743589\t3\n1989\tDecalogue, The (Dekalog) (1989)\t4.174129353233831\t1\n1989\tCinema Paradiso (Nuovo cinema Paradiso) (1989)\t4.154010989010989\t2\n1989\tHenry V (1989)\t4.120811855670103\t3\n1990\tGoodfellas (1990)\t4.183632507763387\t1\n1990\tStrangers in Good Company (1990)\t4.153846153846154\t2\n1990\tCivil War, The (1990)\t4.11328125\t3\n1991\tSilence of the Lambs, The (1991)\t4.17705650958151\t1\n1991\tRaise the Red Lantern (Da hong deng long gao gao gua) (1991)\t4.144328312327083\t2\n1991\tPrime Suspect (1991)\t4.1125\t3\n1992\tReservoir Dogs (1992)\t4.089361317170255\t1\n1992\tBaraka (1992)\t4.051041666666666\t2\n1992\tUnforgiven (1992)\t3.9883400466398133\t3\n1993\tSchindler's List (1993)\t4.310175010988133\t1\n1993\tWallace & Gromit: The Wrong Trousers (1993)\t4.181067767274664\t2\n1993\tSome Folks Call It a Sling Blade (1993)\t4.093388121031005\t3\n1994\tShawshank Redemption, The (1994)\t4.446990499637029\t1\n1994\tPulp Fiction (1994)\t4.174231169217055\t2\n1994\tThree Colors: Red (Trois couleurs: Rouge) (1994)\t4.089561500275786\t3\n1995\tUsual Suspects, The (1995)\t4.334372207803259\t1\n1995\tWallace & Gromit: A Close Shave (1995)\t4.167315497390872\t2\n1995\tPersonal Journey with Martin Scorsese Through American Movies, A (1995)\t4.1\t3\n1996\tWhen We Were Kings (1996)\t4.158415841584159\t1\n1996\tFargo (1996)\t4.112359031244223\t2\n1996\tWallace & Gromit: The Best of Aardman Animation (1996)\t4.109472524782769\t3\n1997\tLife Is Beautiful (La Vita è bella) (1997)\t4.175837188808107\t1\n1997\tPrincess Mononoke (Mononoke-hime) (1997)\t4.096298619824341\t2\n1997\tL.A. Confidential (1997)\t4.083376807273812\t3\n1998\tAmerican History X (1998)\t4.151207688017504\t1\n1998\tCelebration, The (Festen) (1998)\t4.12325479930192\t2\n1998\tCentral Station (Central do Brasil) (1998)\t4.102301255230126\t3\n1999\tFight Club (1999)\t4.227123123722136\t1\n1999\tMatrix, The (1999)\t4.187185880702848\t2\n1999\tAmerican Beauty (1999)\t4.155933936470536\t3\n2000\tO Auto da Compadecida (Dog's Will, A) (2000)\t4.269230769230769\t1\n2000\tMemento (2000)\t4.1785467923660615\t2\n2000\tYou Can Count on Me (2000)\t4.054770926627627\t3\n2001\tBand of Brothers (2001)\t4.263182346109176\t1\n2001\tSpirited Away (Sen to Chihiro no kamikakushi) (2001)\t4.203809594534383\t2\n2001\tAmelie (Fabuleux destin d'Amélie Poulain, Le) (2001)\t4.19707174832642\t3\n2002\tCity of God (Cidade de Deus) (2002)\t4.235410064157069\t1\n2002\tLord of the Rings: The Two Towers, The (2002)\t4.107520546734616\t2\n2002\tPianist, The (2002)\t4.053922967189729\t3\n2003\tLord of the Rings: The Return of the King, The (2003)\t4.14238211356367\t1\n2003\tFog of War: Eleven Lessons from the Life of Robert S. McNamara, The (2003)\t4.1035148706064115\t2\n2003\tOld Boy (2003)\t4.091026260673433\t3\n2004\tDeath on the Staircase (Soupçons) (2004)\t4.285714285714286\t1\n2004\tEternal Sunshine of the Spotless Mind (2004)\t4.105628131710809\t2\n2004\tHowl's Moving Castle (Hauru no ugoku shiro) (2004)\t4.066078116639915\t3\n2005\tBleak House (2005)\t4.111111111111111\t1\n2005\tHouse of Sand (Casa de Areia) (2005)\t4.027777777777778\t2\n2005\tOn Probation (Tiempo de Valientes) (2005)\t4.0\t3\n2006\tLives of Others, The (Das leben der Anderen) (2006)\t4.2347902097902095\t1\n2006\tDeparted, The (2006)\t4.109930812775176\t2\n2006\tPrestige, The (2006)\t4.042195403318839\t3\n2007\tThe War (2007)\t4.25\t1\n2007\tLouis C.K.: Shameless (2007)\t4.08361391694725\t2\n2007\tHeima (2007)\t4.037383177570093\t3\n2008\tDark Knight, The (2008)\t4.220129171151776\t1\n2008\tLouis C.K.: Chewed Up (2008)\t4.08117816091954\t2\n2008\tDr. Horrible's Sing-Along Blog (2008)\t4.068371943371943\t3\n2009\tSecret in Their Eyes, The (El secreto de sus ojos) (2009)\t4.0465994962216625\t1\n2009\tUp (2009)\t4.038266407599309\t2\n2009\tGifted Hands: The Ben Carson Story (2009)\t4.029411764705882\t3\n2010\tInception (2010)\t4.156172003137702\t1\n2010\tLouis C.K.: Hilarious (2010)\t4.071817192600653\t2\n2010\tSenna (2010)\t4.023643949930459\t3\n2011\tTT3D: Closer to the Edge (2011)\t4.233333333333333\t1\n2011\tFrozen Planet (2011)\t4.209677419354839\t2\n2011\tBlack Mirror (2011)\t4.18298969072165\t3\n2012\tHunt, The (Jagten) (2012)\t4.054936305732484\t1\n2012\tDjango Unchained (2012)\t4.0378927911275415\t2\n2012\tDark Knight Rises, The (2012)\t4.00020964360587\t3\n2013\tLouis C.K.: Oh My God (2013)\t4.040492957746479\t1\n2013\tTracks (2013)\t4.0\t2\n2013\tGideon's Army (2013)\t3.9583333333333335\t3\n2013\tTom at the Farm (Tom à la ferme) (2013)\t3.9583333333333335\t3\n2014\tZero Motivation (Efes beyahasei enosh) (2014)\t4.5\t1\n2014\tWhiplash (2014)\t4.074750830564784\t2\n2014\tInterstellar (2014)\t4.023864289821737\t3\n2015\tLouis C.K.: Live at The Comedy Store (2015)\t3.8\t1\n2015\tKingsman: The Secret Service (2015)\t3.6320754716981134\t2\n2015\tThe Second Best Exotic Marigold Hotel (2015)\t3.5714285714285716\t3\n"}]},"apps":[],"jobName":"paragraph_1626154210279_1428852649","id":"20210713-143010_1958473748","dateCreated":"2021-07-13T14:30:10+0900","dateStarted":"2021-07-13T16:25:50+0900","dateFinished":"2021-07-13T16:26:01+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:34563"},{"text":"%md\n## 쿼리 예제 2\n### 각 년도 별로 사용자에게 가장 인기 많았던 영화 ","user":"example","dateUpdated":"2021-07-13T16:40:28+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1626161990685_-2022482010","id":"20210713-163950_2091285871","dateCreated":"2021-07-13T16:39:50+0900","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:41251","dateFinished":"2021-07-13T16:40:28+0900","dateStarted":"2021-07-13T16:40:28+0900","results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2>쿼리 예제 2</h2>\n<h3>각 년도 별로 사용자에게 가장 인기 많았던 영화</h3>\n</div>"}]}},{"text":"%jdbc(hive)\nSELECT year, title, popularity, row_num FROM\n(SELECT year, title, count(distinct userId) as popularity, rank() over (partition by year order by count(distinct userId) desc) as row_num \nFROM movie_rating GROUP BY year, title) T\nWHERE row_num = 1\nORDER BY year, popularity desc;","user":"example","dateUpdated":"2021-07-13T16:34:18+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{"0":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"year":"string","title":"string","popularity":"string","row_num":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}}},"editorSetting":{"language":"sql","editOnDblClick":false,"completionSupport":true},"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TABLE","data":"year\ttitle\tpopularity\trow_num\n1995\tFish Called Wanda, A (1988)\t1\t1\n1995\tDouble Life of Veronique, The (Double Vie de Véronique, La) (1991)\t1\t1\n1995\tGet Shorty (1995)\t1\t1\n1995\tSeven (a.k.a. Se7en) (1995)\t1\t1\n1996\tBatman (1989)\t20605\t1\n1997\tIndependence Day (a.k.a. ID4) (1996)\t8076\t1\n1998\tTitanic (1997)\t1569\t1\n1999\tStar Wars: Episode V - The Empire Strikes Back (1980)\t4403\t1\n2000\tAmerican Beauty (1999)\t6500\t1\n2001\tCrouching Tiger, Hidden Dragon (Wo hu cang long) (2000)\t4182\t1\n2002\tLord of the Rings: The Fellowship of the Ring, The (2001)\t3368\t1\n2003\tLord of the Rings: The Two Towers, The (2002)\t3588\t1\n2004\tLord of the Rings: The Return of the King, The (2003)\t3650\t1\n2005\tLord of the Rings: The Two Towers, The (2002)\t5452\t1\n2006\tLord of the Rings: The Return of the King, The (2003)\t3508\t1\n2007\tMatrix, The (1999)\t3392\t1\n2008\tMatrix, The (1999)\t4193\t1\n2009\tDark Knight, The (2008)\t3613\t1\n2010\tAvatar (2009)\t3728\t1\n2011\tInception (2010)\t3235\t1\n2012\tInception (2010)\t2411\t1\n2013\tShawshank Redemption, The (1994)\t2549\t1\n2014\tShawshank Redemption, The (1994)\t2405\t1\n2015\tMatrix, The (1999)\t1207\t1\n"}]},"apps":[],"jobName":"paragraph_1626155463724_-81584427","id":"20210713-145103_2017762407","dateCreated":"2021-07-13T14:51:03+0900","dateStarted":"2021-07-13T16:33:52+0900","dateFinished":"2021-07-13T16:34:18+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:34564"},{"text":"%jdbc\n","user":"example","dateUpdated":"2021-07-13T16:27:46+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"sql","editOnDblClick":false,"completionSupport":true},"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1626161266029_70795417","id":"20210713-162746_1586760624","dateCreated":"2021-07-13T16:27:46+0900","status":"READY","progressUpdateIntervalMs":500,"$$hashKey":"object:34565"}],"name":"MovieLens Example Hive","id":"2GCB36B8M","noteParams":{},"noteForms":{},"angularObjects":{"md:shared_process":[],"sh:shared_process":[],"jdbc:shared_process":[],"spark:shared_process":[]},"config":{"isZeppelinNotebookCronEnable":false,"looknfeel":"default","personalizedMode":"false"},"info":{}}
{"paragraphs":[{"text":"%md \n## 샘플 데이터 \n`movie.csv`\n```\n\"movieId\",\"title\",\"genres\"\n1,\"Toy Story (1995)\",\"Adventure|Animation|Children|Comedy|Fantasy\"\n```\n\n`rating.csv` \n```\n\"userId\",\"movieId\",\"rating\",\"timestamp\"\n1,2,3.5,2005-04-02 23:53:47\n```","user":"example","dateUpdated":"2021-07-13T13:22:56+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionKey":"TAB","completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2>샘플 데이터</h2>\n<p><code>movie.csv</code></p>\n<pre><code>&quot;movieId&quot;,&quot;title&quot;,&quot;genres&quot;\n1,&quot;Toy Story (1995)&quot;,&quot;Adventure|Animation|Children|Comedy|Fantasy&quot;\n</code></pre>\n<p><code>rating.csv</code> </p>\n<pre><code>&quot;userId&quot;,&quot;movieId&quot;,&quot;rating&quot;,&quot;timestamp&quot;\n1,2,3.5,2005-04-02 23:53:47\n</code></pre>\n</div>"}]},"apps":[],"jobName":"paragraph_1626073025694_-187075593","id":"20210712-155705_1496580628","dateCreated":"2021-07-12T15:57:05+0900","dateStarted":"2021-07-13T13:22:56+0900","dateFinished":"2021-07-13T13:22:56+0900","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:32244"},{"text":"\n%sh\n# 샘플 데이터 있는지 확인\nhadoop fs -ls /user/example | grep csv","user":"example","dateUpdated":"2021-07-13T13:23:32+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"sh","editOnDblClick":false,"completionKey":"TAB","completionSupport":false},"editorMode":"ace/mode/sh","editorHide":false,"tableHide":false},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"Picked up _JAVA_OPTIONS: -Dnetworkaddress.cache.ttl=0 -Dnetworkaddress.cache.negative.ttl=0\n-rw------- 3 example services 1493648 2021-07-12 15:25 /user/example/movie.csv\n-rw-r--r-- 3 example services 690353377 2021-07-09 18:11 /user/example/rating.csv\n"}]},"apps":[],"jobName":"paragraph_1626140963314_-2104807511","id":"20210713-104923_1774406622","dateCreated":"2021-07-13T10:49:23+0900","dateStarted":"2021-07-13T13:23:32+0900","dateFinished":"2021-07-13T13:23:34+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32245"},{"text":"%md\n## `movie.csv`로 부터 dataframe 생성","user":"example","dateUpdated":"2021-07-13T13:19:34+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionKey":"TAB","completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2><code>movie.csv</code>로 부터 dataframe 생성</h2>\n</div>"}]},"apps":[],"jobName":"paragraph_1626149922145_1543159089","id":"20210713-131842_1864203851","dateCreated":"2021-07-13T13:18:42+0900","dateStarted":"2021-07-13T13:19:34+0900","dateFinished":"2021-07-13T13:19:34+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32246"},{"text":"%spark\nimport spark.implicits._\nimport org.apache.spark.sql.types.StructType\nimport org.apache.spark.sql.catalyst.ScalaReflection\n\ncase class Movie(movieId: Int,title: String, genres: String)\nval movie_schema = ScalaReflection.schemaFor[Movie].dataType.asInstanceOf[StructType] // Create a schema from case class\n\nval movie_df_temp = spark.read\n .option(\"header\", \"true\")\n .schema(movie_schema)\n .csv(\"hdfs://koya/user/example/movie.csv\") // This is where we put our sample data. You should change the path. \n\nimport org.apache.spark.sql.functions._\nimport org.apache.spark.sql.types.IntegerType\n\nval movie_df = movie_df_temp\n .select($\"movieId\", $\"title\", explode(split($\"genres\", \"\\\\|\")).as(\"genre\")) // Explode the column genre as it contains multiple values\n .withColumn(\"releasedYear\", regexp_extract($\"title\",\"\\\\((\\\\d{4})\\\\)\", 1)) // Extract released date (year) from title column\n .withColumn(\"releasedYear\", $\"releasedYear\".cast(IntegerType)) // Cast string type to integer\n\nmovie_df.createOrReplaceTempView(\"movie\") // Create dataframe temp view \nspark.sql(\"select * from movie limit 3\").show()","user":"example","dateUpdated":"2021-07-13T16:08:22+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"scala","editOnDblClick":false,"completionKey":"TAB","completionSupport":true},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"+-------+----------------+---------+------------+\n|movieId| title| genre|releasedYear|\n+-------+----------------+---------+------------+\n| 1|Toy Story (1995)|Adventure| 1995|\n| 1|Toy Story (1995)|Animation| 1995|\n| 1|Toy Story (1995)| Children| 1995|\n+-------+----------------+---------+------------+\n\nimport spark.implicits._\nimport org.apache.spark.sql.types.StructType\nimport org.apache.spark.sql.catalyst.ScalaReflection\ndefined class Movie\nmovie_schema: org.apache.spark.sql.types.StructType = StructType(StructField(movieId,IntegerType,false), StructField(title,StringType,true), StructField(genres,StringType,true))\nmovie_df_temp: org.apache.spark.sql.DataFrame = [movieId: int, title: string ... 1 more field]\nimport org.apache.spark.sql.functions._\nimport org.apache.spark.sql.types.IntegerType\nmovie_df: org.apache.spark.sql.DataFrame = [movieId: int, title: string ... 2 more fields]\n"}]},"runtimeInfos":{"jobUrl":{"propertyName":"jobUrl","label":"SPARK JOB","tooltip":"View in Spark web UI","group":"spark","values":["http://198.19.21.194:4040/jobs/job?id=18"],"interpreterSettingId":"spark"}},"apps":[],"jobName":"paragraph_1626071102332_-1799987112","id":"20210712-152502_196484848","dateCreated":"2021-07-12T15:25:02+0900","dateStarted":"2021-07-13T16:05:32+0900","dateFinished":"2021-07-13T16:05:33+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32247"},{"text":"%md\n## `rating.csv`로 부터 dataframe 생성","user":"example","dateUpdated":"2021-07-13T13:19:26+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionKey":"TAB","completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2><code>rating.csv</code>로 부터 dataframe 생성</h2>\n</div>"}]},"apps":[],"jobName":"paragraph_1626149951610_1250958555","id":"20210713-131911_166672191","dateCreated":"2021-07-13T13:19:11+0900","dateStarted":"2021-07-13T13:19:26+0900","dateFinished":"2021-07-13T13:19:26+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32248"},{"text":"%spark\n\nimport spark.implicits._\nimport org.apache.spark.sql.types.StructType\nimport org.apache.spark.sql.catalyst.ScalaReflection\n\nimport java.sql.Timestamp\n\ncase class Rating(userId: Int, movieId: Int, rating: Double, timestamp: Timestamp)\nval rating_schema = ScalaReflection.schemaFor[Rating].dataType.asInstanceOf[StructType]\nval rating_df_temp = spark.read\n .option(\"header\", \"true\")\n .schema(rating_schema)\n .csv(\"hdfs://koya/user/example/rating.csv\") \n \n \nimport org.apache.spark.sql.functions._\n\nval rating_df_filtered = rating_df_temp.groupBy($\"movieId\")\n .agg(count(\"*\").as(\"count\")).filter($\"count\" > 10) // Filter out records where only few people rate the movie. \nval rating_df = rating_df_temp.join(rating_df_filtered, rating_df_temp(\"movieId\") === rating_df_filtered(\"movieId\")) \n .select($\"userId\", rating_df_temp(\"movieId\"), $\"rating\", year($\"timestamp\").as(\"year\"), month($\"timestamp\").as(\"month\")) // We will use year, month as a partiion key later \n\nrating_df.createOrReplaceTempView(\"rating\")\nspark.sql(\"select * from rating limit 3\").show()\n","user":"example","dateUpdated":"2021-07-13T16:05:51+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"scala","editOnDblClick":false,"completionKey":"TAB","completionSupport":true},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"+------+-------+------+----+-----+\n|userId|movieId|rating|year|month|\n+------+-------+------+----+-----+\n|108238| 587| 5.0|2009| 11|\n|108244| 587| 5.0|1996| 11|\n|108248| 587| 3.0|2003| 2|\n+------+-------+------+----+-----+\n\nimport spark.implicits._\nimport org.apache.spark.sql.types.StructType\nimport org.apache.spark.sql.catalyst.ScalaReflection\nimport java.sql.Timestamp\ndefined class Rating\nrating_schema: org.apache.spark.sql.types.StructType = StructType(StructField(userId,IntegerType,false), StructField(movieId,IntegerType,false), StructField(rating,DoubleType,false), StructField(timestamp,TimestampType,true))\nrating_df_temp: org.apache.spark.sql.DataFrame = [userId: int, movieId: int ... 2 more fields]\nimport org.apache.spark.sql.functions._\nrating_df_filtered: org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] = [movieId: int, count: bigint]\nrating_df: org.apache.spark.sql.DataFrame = [userId: int, movieId: int ... 3 more fields]\n"}]},"runtimeInfos":{"jobUrl":{"propertyName":"jobUrl","label":"SPARK JOB","tooltip":"View in Spark web UI","group":"spark","values":["http://198.19.21.194:4040/jobs/job?id=19"],"interpreterSettingId":"spark"}},"apps":[],"jobName":"paragraph_1626072565312_-135242717","id":"20210712-154925_1156903039","dateCreated":"2021-07-12T15:49:25+0900","dateStarted":"2021-07-13T16:05:51+0900","dateFinished":"2021-07-13T16:06:32+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32249"},{"text":"%md\n## 생성한 view에 spark-sql 실행 ","user":"example","dateUpdated":"2021-07-13T13:22:41+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionKey":"TAB","completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2>생성한 view에 spark-sql 실행</h2>\n</div>"}]},"apps":[],"jobName":"paragraph_1626149985909_1035956184","id":"20210713-131945_343720878","dateCreated":"2021-07-13T13:19:45+0900","dateStarted":"2021-07-13T13:22:41+0900","dateFinished":"2021-07-13T13:22:41+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32250"},{"text":"%spark\n// Find out top rated movies \nspark.sql(\"select movieId, avg(rating) as avgRating from rating group by movieId order by avgRating desc limit 5\").show()","user":"example","dateUpdated":"2021-07-13T15:25:27+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"scala","editOnDblClick":false,"completionKey":"TAB","completionSupport":true},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"+-------+-----------------+\n|movieId| avgRating|\n+-------+-----------------+\n| 113315| 4.5|\n| 318|4.446990499637029|\n| 858|4.364732196832306|\n| 50|4.334372207803259|\n| 527|4.310175010988133|\n+-------+-----------------+\n\n"}]},"runtimeInfos":{"jobUrl":{"propertyName":"jobUrl","label":"SPARK JOB","tooltip":"View in Spark web UI","group":"spark","values":["http://198.19.21.194:4040/jobs/job?id=5"],"interpreterSettingId":"spark"}},"apps":[],"jobName":"paragraph_1626072804818_1152474563","id":"20210712-155324_853236260","dateCreated":"2021-07-12T15:53:24+0900","dateStarted":"2021-07-13T15:25:27+0900","dateFinished":"2021-07-13T15:25:42+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32251"},{"text":"%spark\n// Find out top rated genres \nspark.sql(\"select m.genre, avg(r.rating) as avgRating from movie m join rating r on m.movieId = r.movieId group by m.genre order by avgRating desc limit 5\").show()","user":"example","dateUpdated":"2021-07-13T15:25:47+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"scala","editOnDblClick":false,"completionKey":"TAB","completionSupport":true},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"+------------------+------------------+\n| genre| avgRating|\n+------------------+------------------+\n| Film-Noir|3.9675141046824307|\n| War| 3.810533213860618|\n|(no genres listed)| 3.783333333333333|\n| Documentary| 3.747184640080052|\n| Drama| 3.675430316820671|\n+------------------+------------------+\n\n"}]},"runtimeInfos":{"jobUrl":{"propertyName":"jobUrl","label":"SPARK JOB","tooltip":"View in Spark web UI","group":"spark","values":["http://198.19.21.194:4040/jobs/job?id=6","http://198.19.21.194:4040/jobs/job?id=7"],"interpreterSettingId":"spark"}},"apps":[],"jobName":"paragraph_1626074042946_-1103581707","id":"20210712-161402_297059524","dateCreated":"2021-07-12T16:14:02+0900","dateStarted":"2021-07-13T15:25:47+0900","dateFinished":"2021-07-13T15:26:03+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32252"},{"text":"%md\n## 두개의 dataframe을 join해서 새로운 dataframe 생성","user":"example","dateUpdated":"2021-07-13T13:21:07+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionKey":"TAB","completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2>두개의 dataframe을 join해서 새로운 dataframe 생성</h2>\n</div>"}]},"apps":[],"jobName":"paragraph_1626150023879_415786126","id":"20210713-132023_1261286368","dateCreated":"2021-07-13T13:20:23+0900","dateStarted":"2021-07-13T13:21:07+0900","dateFinished":"2021-07-13T13:21:07+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32253"},{"text":"%spark\n// Create a new dataframe by joining \n// Use Seq in order to avoid having duplicated column\nval movie_rating_df = movie_df.join(rating_df, Seq(\"movieId\"), \"inner\")\nmovie_rating_df.show()\n","user":"example","dateUpdated":"2021-07-13T16:06:56+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"scala","editOnDblClick":false,"completionKey":"TAB","completionSupport":true},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"+-------+--------------------+-----+------------+------+------+----+-----+\n|movieId| title|genre|releasedYear|userId|rating|year|month|\n+-------+--------------------+-----+------------+------+------+----+-----+\n| 148|Awfully Big Adven...|Drama| 1995|125753| 2.0|1996| 7|\n| 148|Awfully Big Adven...|Drama| 1995|125969| 3.0|1999| 10|\n| 148|Awfully Big Adven...|Drama| 1995|126018| 3.0|1999| 11|\n| 148|Awfully Big Adven...|Drama| 1995|126066| 3.0|1996| 6|\n| 148|Awfully Big Adven...|Drama| 1995|126260| 3.0|1996| 9|\n| 148|Awfully Big Adven...|Drama| 1995|126388| 3.0|1996| 7|\n| 148|Awfully Big Adven...|Drama| 1995|127245| 1.0|1996| 3|\n| 148|Awfully Big Adven...|Drama| 1995|127911| 1.0|1999| 8|\n| 148|Awfully Big Adven...|Drama| 1995|128653| 2.0|1997| 2|\n| 148|Awfully Big Adven...|Drama| 1995|129522| 5.0|1996| 4|\n| 148|Awfully Big Adven...|Drama| 1995|130122| 3.0|1996| 7|\n| 148|Awfully Big Adven...|Drama| 1995|130456| 1.0|2003| 6|\n| 148|Awfully Big Adven...|Drama| 1995|130531| 1.0|1996| 5|\n| 148|Awfully Big Adven...|Drama| 1995|130986| 3.0|1996| 7|\n| 148|Awfully Big Adven...|Drama| 1995|132093| 2.0|2000| 11|\n| 148|Awfully Big Adven...|Drama| 1995|132268| 2.0|1999| 1|\n| 148|Awfully Big Adven...|Drama| 1995|132466| 3.0|1999| 12|\n| 148|Awfully Big Adven...|Drama| 1995|132550| 4.0|1997| 4|\n| 148|Awfully Big Adven...|Drama| 1995|133330| 4.0|1996| 5|\n| 148|Awfully Big Adven...|Drama| 1995|133722| 4.0|1996| 3|\n+-------+--------------------+-----+------------+------+------+----+-----+\nonly showing top 20 rows\n\nmovie_rating_df: org.apache.spark.sql.DataFrame = [movieId: int, title: string ... 6 more fields]\n"}]},"runtimeInfos":{"jobUrl":{"propertyName":"jobUrl","label":"SPARK JOB","tooltip":"View in Spark web UI","group":"spark","values":["http://198.19.21.194:4040/jobs/job?id=20","http://198.19.21.194:4040/jobs/job?id=21"],"interpreterSettingId":"spark"}},"apps":[],"jobName":"paragraph_1626077832569_1843584317","id":"20210712-171712_282351033","dateCreated":"2021-07-12T17:17:12+0900","dateStarted":"2021-07-13T16:06:56+0900","dateFinished":"2021-07-13T16:07:19+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32254"},{"text":"%md\n## 새로운 dataframe을 parquet으로 저장","user":"example","dateUpdated":"2021-07-13T13:21:44+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"markdown","editOnDblClick":true,"completionKey":"TAB","completionSupport":false},"editorMode":"ace/mode/markdown","editorHide":true,"tableHide":false},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"HTML","data":"<div class=\"markdown-body\">\n<h2>새로운 dataframe을 parquet으로 저장</h2>\n</div>"}]},"apps":[],"jobName":"paragraph_1626150082895_-895240150","id":"20210713-132122_1130156435","dateCreated":"2021-07-13T13:21:22+0900","dateStarted":"2021-07-13T13:21:44+0900","dateFinished":"2021-07-13T13:21:44+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32255"},{"text":"%spark\nimport org.apache.spark.sql.SaveMode\nmovie_rating_df.repartition($\"year\", $\"month\")\n.write.partitionBy(\"year\", \"month\")\n.mode(SaveMode.Append)\n.parquet(\"/user/example/movie_rating\")\n","user":"example","dateUpdated":"2021-07-13T16:07:37+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"scala","editOnDblClick":false,"completionKey":"TAB","completionSupport":true},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"import org.apache.spark.sql.SaveMode\n"}]},"runtimeInfos":{"jobUrl":{"propertyName":"jobUrl","label":"SPARK JOB","tooltip":"View in Spark web UI","group":"spark","values":["http://198.19.21.194:4040/jobs/job?id=22","http://198.19.21.194:4040/jobs/job?id=23"],"interpreterSettingId":"spark"}},"apps":[],"jobName":"paragraph_1626078527503_1519218830","id":"20210712-172847_1785164477","dateCreated":"2021-07-12T17:28:47+0900","dateStarted":"2021-07-13T16:07:37+0900","dateFinished":"2021-07-13T16:10:16+0900","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:32256"},{"text":"%spark\n","user":"example","dateUpdated":"2021-07-13T15:33:17+0900","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{},"editorSetting":{"language":"scala","editOnDblClick":false,"completionKey":"TAB","completionSupport":true},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1626157997651_-187166839","id":"20210713-153317_837000188","dateCreated":"2021-07-13T15:33:17+0900","status":"READY","progressUpdateIntervalMs":500,"$$hashKey":"object:32257"}],"name":"MovieLens Example Spark","id":"2GAUG2D99","noteParams":{},"noteForms":{},"angularObjects":{"md:shared_process":[],"sh:shared_process":[],"jdbc:shared_process":[],"spark:shared_process":[]},"config":{"isZeppelinNotebookCronEnable":false,"looknfeel":"default","personalizedMode":"false"},"info":{}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment