다음을 통해 공유


h3_tochildren

입력 H3 셀 ID의 자식 H3 셀 ID를 지정된 해상도에서 반환합니다. Spark Connect를 지원합니다.

해당 Databricks SQL 함수에 대해 알아보려면 h3_tochildren 함수를 참조하세요.

문법

from pyspark.databricks.sql import functions as dbf

dbf.h3_tochildren(col1=<col1>, col2=<col2>)

매개 변수

매개 변수 유형 Description
col1 pyspark.sql.Column 또는 str H3 셀 ID(BIGINT 또는 문자열로 표시됨)입니다.
col2 pyspark.sql.Column, str 또는 int 반환할 자식 H3 셀 ID의 해상도입니다. 첫 번째 인수의 해상도보다 크거나 같아야 하며 16보다 작아야 합니다.

예시

from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(599686042433355775, 6,)], ['h3l', 'res'])
df.select(dbf.h3_tochildren('h3l', 'res').alias('result')).collect()
[Row(result=[604189641121202175, 604189641255419903, 604189641389637631, 604189641523855359,     604189641658073087, 604189641792290815, 604189641926508543])]
df.select(dbf.h3_tochildren('h3l', 6).alias('result')).collect()
[Row(result=[604189641121202175, 604189641255419903, 604189641389637631, 604189641523855359,     604189641658073087, 604189641792290815, 604189641926508543])]