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

[Feat] Improve APIs of the Spark library to be more concise for easily importing/exporting/transforming data at the graph level #88

Closed
acezen opened this issue Feb 7, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@acezen
Copy link
Contributor

acezen commented Feb 7, 2023

Is your feature request related to a problem? Please describe.
as title

Describe the solution you'd like
Proposal TBF

@acezen acezen added the enhancement New feature or request label Feb 7, 2023
@acezen acezen changed the title [Feat] Concise [Feat] Concise API for Feb 7, 2023
@acezen acezen changed the title [Feat] Concise API for [Feat] Improve API of Spark library more concise for users easy to import/export data from/to or transform at graph level Feb 7, 2023
@acezen acezen moved this to Todo in alibaba/GraphAr Feb 7, 2023
@lixueclaire lixueclaire changed the title [Feat] Improve API of Spark library more concise for users easy to import/export data from/to or transform at graph level [Feat] Improve APIs of the Spark library to be more concise for easily importing/exporting/transforming data at the graph level Feb 15, 2023
@acezen acezen moved this from Todo to In Progress in alibaba/GraphAr Feb 16, 2023
@acezen
Copy link
Contributor Author

acezen commented Feb 21, 2023

Read GAR file to DataFrames

object GraphReader {
     /*
      * Input:  graph yaml path
      * Output: vertex DataFrames and edge DataFrames
      * /
     def read(graph_yaml_path): Pair[Map[String, DataFrame], Map[String, Map[String, DataFrame]]]

     /*
      * Input:  graph info
      * Output: vertex DataFrames and edge DataFrames
      * /
     def read(graph_info): Pair[Map[String, DataFrame], Map[String, Map[adj_list_type, DataFrame]]]
}

Write a set of DataFrames to GAR files

object GraphWriter {
     /*
      * Input:  graph yaml path and a set of DataFrames
      * Status:  success or fail
      * /
     def write(graph_yaml_path,  vertexDataFrames: Map[String, DataFrame], edgeDataFrame: Map[String, DataFrame]): Status 
     
     /*
      * Input:  graph info and a set of DataFrames
      * Status:  success or fail
      * /
     def write(graph_info, vertexDataFrames: Map[String, DataFrame], edgeDataFrame: Map[String, DataFrame]): Status 
}

Transform graph from one type of GAR to another type of GAR

object GraphTransFormer {
     /*
      * Input:  source and dest graph yaml path
      * Status:  success or fail
      * /
     def transform(source_graph_yaml_path, dest_graph_yaml_path): Status
     
     /*
      * Input:  source and dest graph info
      * Status:  success or fail
      * /
     def transform(source_graph_info, dest_graph_info): Status 
}

@acezen
Copy link
Contributor Author

acezen commented Mar 1, 2023

Solved by pull requests #113 #114

@acezen acezen closed this as completed Mar 1, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in alibaba/GraphAr Mar 1, 2023
@acezen acezen self-assigned this Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant