-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzeppelin.zpln
More file actions
66 lines (66 loc) · 2.33 KB
/
zeppelin.zpln
File metadata and controls
66 lines (66 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
"paragraphs": [
{
"user": "anonymous",
"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_1563110258183_1613653816",
"id": "20190714-161738_1950435706",
"dateCreated": "2019-07-14T16:17:38+0300",
"status": "READY",
"progressUpdateIntervalMs": 500,
"focus": true,
"$$hashKey": "object:394",
"text": "\nval df = spark.table(\"aa\")\n\nz.show(df)\n"
},
{
"settings": {
"params": {},
"forms": {}
},
"apps": [],
"status": "READY",
"text": "// 호출된 DataSet리스트 보기\n$intp.definedTerms.map(t => (t.toTermName.toString, $intp.typeOfTerm(t.toTermName.toString())))\n .filter(_._2.toString() == \"()org.apache.spark.sql.Dataset\")",
"id": "",
"config": {}
},
{
"settings": {
"params": {},
"forms": {}
},
"apps": [],
"status": "READY",
"text": "// config에 그냥 set하면 적용 안되는 것 같고, spark를 다시 생성하면 적용됨.\n// \nval spark = SparkSession.builder.appName(name)\n .enableHiveSupport()\n .config(\"\", \"\")\n .getOrCreate()\n\n\n\ndef get_spark(name=\"acs_features\", configs={}) -> SparkSession:\n builder = SparkSession.builder.appName(name) \\\n .enableHiveSupport()\\\n .config(\"hive.metastore.client.factory.class\", \"com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory\")\\\n .config(\"spark.sql.broadcastTimeout\", 3000000) \\\n .config(\"spark.sql.caseSensitive\", True)\\\n .config(\"spark.sql.legacy.parquet.datetimeRebaseModeInWrite\", \"CORRECTED\")\\\n .config(\"spark.sql.execution.arrow.pyspark.enabled\", True)\n\n for key, value in configs.items():\n builder = builder.config(key, value)\n\n spark = builder.getOrCreate()\n return spark\n",
"id": "",
"config": {}
}
],
"name": "Zeppelin Notebook",
"id": "",
"noteParams": {},
"noteForms": {},
"angularObjects": {},
"config": {
"isZeppelinNotebookCronEnable": false,
"looknfeel": "default",
"personalizedMode": "false"
},
"info": {}
}