티스토리 뷰
val path = "s3://data/seunggabi/orc"
val extension = path.substring(path.lastIndexOf("/") + 1)
var data = Seq(
("asdf", "asdf")
)
for(a <- 1 to 13) {
data = data ++ data
}
for(a <- 1 to 100) {
val df = spark.createDataFrame(data).toDF("a", "b")
df
.repartition(1)
.write
.format(extension)
.mode(SaveMode.Append)
.save(path)
}
https://www.tutorialspoint.com/scala/scala_for_loop.htm
Scala - for Loops
Scala for Loops - A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times. There are various forms of for loop in Scala which are described below −
www.tutorialspoint.com
https://alvinalexander.com/scala/how-to-append-prepend-items-vector-seq-in-scala/
Scala: How to append and prepend items to Vector and Seq | alvinalexander.com
Scala FAQ: How do I append or prepend one or more elements to a Vector or Seq class? Solution To append or prepend one or more elements to a Vector or Seq, use these methods: to append one item, use :+ to append multiple items, use ++ to prepend one item,
alvinalexander.com
https://stackoverflow.com/questions/27033823/how-to-overwrite-the-output-directory-in-spark
How to overwrite the output directory in spark
I have a spark streaming application which produces a dataset for every minute. I need to save/overwrite the results of the processed data. When I tried to overwrite the dataset org.apache.hadoop....
stackoverflow.com
Solved: Unable to instantiate SparkSession with Hive support because Hive classes are not found - Spark By {Examples}
While running a Spark application with Hive enabled getting the below error message? Exception in thread "main" java.lang.IllegalArgumentException: Unable
sparkbyexamples.com
'공부' 카테고리의 다른 글
- Total
- Today
- Yesterday
- 테슬라 크레딧 사용
- 테슬라
- 팔로워 수 세기
- 연애학개론
- 인스타그램
- 할인
- 테슬라 리퍼럴 코드 혜택
- 책그림
- follower
- 테슬라 추천
- 모델y
- 유투브
- 모델 Y 레퍼럴
- 개리마커스
- 레퍼럴
- COUNT
- 테슬라 레퍼럴 적용 확인
- 테슬라 리퍼럴 코드
- 메디파크 내과 전문의 의학박사 김영수
- 클루지
- Kluge
- Bot
- wlw
- 어떻게 능력을 보여줄 것인가?
- 테슬라 레퍼럴
- 김달
- 테슬라 리퍼럴 코드 생성
- 테슬라 레퍼럴 코드 확인
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |