feat: support read and write from hive datasource#100
Merged
Nicole00 merged 3 commits intovesoft-inc:masterfrom Aug 19, 2024
Merged
feat: support read and write from hive datasource#100Nicole00 merged 3 commits intovesoft-inc:masterfrom
Nicole00 merged 3 commits intovesoft-inc:masterfrom
Conversation
Nicole00
reviewed
Aug 16, 2024
| val autoCreateTable: Boolean = getOrElse(config,"hive.write.autoCreateTable",true) | ||
| //hive元数据地址 | ||
| val writeMetaStoreUris: String = getOrElse(config,"hive.write.metaStoreUris","") | ||
| //执行结果和表字段映射关系,比如将算法结果中的_id映射为user_id |
Contributor
There was a problem hiding this comment.
please update the comment to English~
| data.repartition(partitionNum) | ||
| } | ||
|
|
||
| data.show(3) |
| } | ||
|
|
||
| println(s"Save to hive:${config.dbTableName}, saveMode:${saveMode}") | ||
| _data.show(3) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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