-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: support read and write from hive datasource #100
Conversation
val autoCreateTable: Boolean = getOrElse(config,"hive.write.autoCreateTable",true) | ||
//hive元数据地址 | ||
val writeMetaStoreUris: String = getOrElse(config,"hive.write.metaStoreUris","") | ||
//执行结果和表字段映射关系,比如将算法结果中的_id映射为user_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update the comment to English~
data.repartition(partitionNum) | ||
} | ||
|
||
data.show(3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to show.
} | ||
|
||
println(s"Save to hive:${config.dbTableName}, saveMode:${saveMode}") | ||
_data.show(3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
Description:
Add hive datasource to read and write
How do you solve it?
hive: {
# algo's data source from hive
read: {
#[Optional] spark and hive require configuration on different clusters
metaStoreUris: "thrift://hive-metastore-server-01:9083"
#spark sql
sql: "select column_1,column_2,column_3 from database_01.table_01 "
#[Optional] graph source vid mapping with column of sql result.
srcId: "column_1"
#[Optional] graph dest vid mapping with column of sql result
dstId: "column_2"
#[Optional] graph weight mapping with column of sql result
weight: "column_3"
}
Special notes for your reviewer, ex. impact of this fix, design document, etc:
Spark and hive have no environment validation on different clusters. All other cases have been verified