Skip to content

Commit b917253

Browse files
committed
Update spark-hbase-demo1.md
1 parent f7ef44e commit b917253

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/spark-hbase-demo1.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Create and query SparkSQL table map to HBase (support multiple columns mapping to hbase rowkey)
22
(1)TableName :
3-
spark : spark_teacher_3key
4-
hbase : hbase_ teacher_3key
3+
spark : teacher1k
4+
hbase : hbase1k
55

66
(2)Fields :
77
[grade,int]
@@ -12,12 +12,12 @@
1212

1313
keyCols : grade,class,subject
1414

15-
(3)Create table:
15+
(3) Create table:
1616
```
1717
CREATE TABLE teacher1k(grade int, class int, subject string, teacher_name string, teacher_age int, PRIMARY KEY (grade, class, subject)) MAPPED BY (hbase1k, COLS=[teacher_name=teacher.name, teacher_age=teacher.age]);
1818
```
1919

20-
(4)Load data :
20+
(4) Load data :
2121
```
2222
LOAD DATA INPATH './examples/teacher1k.csv' INTO TABLE teacher1k FIELDS TERMINATED BY "," ;
2323
```

0 commit comments

Comments
 (0)