티스토리 뷰
[spark] sql repartition (by query hint) `SELECT /*+ COALESCE(1) */` is better than `SELECT /*+ REPARTITION(1) */`
승가비 2022. 9. 22. 22:08fun insertOverwrite(target: String, db: DB, table: Table, partition: String, columns: List<String>) {
execute(
"""
INSERT OVERWRITE TABLE ${db.name}.${table.name}
PARTITION ($partition)
SELECT /*+ REPARTITION(1) */ ${columns.concat(ConstUtil.COMMA)}
FROM $target
""".trimIndent()
)
}
How to consolidate results of a spark SQL query to avoid lots of small files / avoid empty files
Context: In our data pipeline, we use spark SQL to run lots of queries that are supplied from our end users as text files that we then parameterise. Situation: Our queries look like: INSERT OVE...
stackoverflow.com
https://kontext.tech/article/1155/use-spark-sql-partitioning-hints
Use Spark SQL Partitioning Hints
In Spark or PySpark, we can use coalesce and repartition functions to change the partitions of a DataFrame. In article Spark repartition vs. coalesce , I summarized the key differences between these two. If we are using Spark SQL directly, how do we repa
kontext.tech
GitHub - dhkdn9192/data_engineer_should_know: 데이터 엔지니어가 알아야 하는 것들
데이터 엔지니어가 알아야 하는 것들. Contribute to dhkdn9192/data_engineer_should_know development by creating an account on GitHub.
github.com
'공부' 카테고리의 다른 글
[Hive] `Tez` vs `MR` (0) | 2022.09.24 |
---|---|
[kotlin] collection.forEachIndexed { index, element -> (0) | 2022.09.24 |
[kotlin] camelToSnake (0) | 2022.09.21 |
[Algorithm] Binary Search Tree Check (2) | 2022.09.19 |
Deprecating the "X-" Prefix and Similar Constructs in Application Protocols (1) | 2022.09.17 |
- Total
- Today
- Yesterday
- 테슬라 리퍼럴 코드 생성
- 테슬라 리퍼럴 코드 혜택
- Bot
- 테슬라
- Kluge
- 책그림
- 어떻게 능력을 보여줄 것인가?
- 테슬라 리퍼럴 코드
- wlw
- follower
- 모델y
- 메디파크 내과 전문의 의학박사 김영수
- COUNT
- 모델 Y 레퍼럴
- 테슬라 레퍼럴 적용 확인
- 유투브
- 개리마커스
- 연애학개론
- 팔로워 수 세기
- 테슬라 레퍼럴 코드 확인
- 테슬라 크레딧 사용
- 김달
- 클루지
- 테슬라 추천
- 레퍼럴
- 할인
- 테슬라 레퍼럴
- 인스타그램
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |