Created
October 1, 2020 06:10
-
-
Save welly87/08bf38934df8c2e385f6b4fa8f751b0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
? |
Author
welly87
commented
Oct 1, 2020
table = "transactions_1k"
kudu_master = "178.128.112.105:7051,178.128.112.105:7151,178.128.112.105:7251"
sfmta_kudu = spark.read.option("kudu.master", kudu_master).option("kudu.table", table).option("kudu.scanLocality", "leader_only").format("kudu").load()
sfmta_kudu.createOrReplaceTempView(table)
sdf = spark.sql("SELECT count(*) FROM " + table)
pdf = sdf.select("*").toPandas()
pdf.head()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment