Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying custom precision #29

Open
deepuak opened this issue Aug 30, 2023 · 0 comments
Open

Specifying custom precision #29

deepuak opened this issue Aug 30, 2023 · 0 comments

Comments

@deepuak
Copy link

deepuak commented Aug 30, 2023

Hi,

I am not able to specify custom precision with below code and it errors out. Can some one please let me know the right way to pass custom precision? Please note i am using databricks for spark runtime.

import com.swoop.alchemy.spark.expressions.hll.functions._
val df1 = spark.table("hive_metastore.rwd_databricks.table_test")
df1.select("PATIENT_ID","CLAIM_ID","CODE").withColumn("patient_id_hll", hll_init("PATIENT_ID",0.02))  .select(hll_merge("patient_id_hll",0.02).as("patient_id_hll_m")).write.mode("overwrite").format("delta").saveAsTable("patient_id_hll_merge")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant