加载表格时从凤凰过滤 [英] Filtering from phoenix when loading a table
本文介绍了加载表格时从凤凰过滤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道它是如何工作的,
I would like to know how this exactly works,
df = sqlContext.read \
.format("org.apache.phoenix.spark") \
.option("table", "TABLE") \
.option("zkUrl", "10.0.0.11:2181:/hbase-unsecure") \
.load()
如果这正在加载整个表,否则将延迟加载以了解是否将应用过滤.
if this is loading the whole table or it will delay the loading to know if a filtering will be applied.
在第一种情况下,如何告诉phoenix在装入spark数据帧之前过滤表?
In the first case, how is the way to tell phoenix to filter the table before loading in the spark dataframe?
谢谢
推荐答案
在执行需要执行的操作之前,不会加载数据.所有过滤器都应用在中间:
Data is not loaded until you execute an action which requires it. All filter applied in the middle:
df.where($"foo" === "bar").count
如果可能的话,
将被Spark压低.您可以通过运行 explain()
这篇关于加载表格时从凤凰过滤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文