Load a Arrow property graph using a list of vertex/edge specifications. .. deprecated:: version 0.3 Use :class:`graphscope.Graph()` instead. - Use Dict of tuples to setup a graph. We can use a dict to set vertex and edge configurations, which can be used to build gra
(
edges: Union[
Mapping[str, Union[LoaderVariants, Sequence, Mapping]], LoaderVariants, Sequence
],
vertices: Union[
Mapping[str, Union[LoaderVariants, Sequence, Mapping]],
LoaderVariants,
Sequence,
None,
] = None,
directed=True,
oid_type="int64_t",
vid_type="uint64_t",
generate_eid=True,
retain_oid=True,
vformat=None,
eformat=None,
vertex_map="global",
compact_edges=False,
use_perfect_hash=False,
)
| 41 | |
| 42 | |
| 43 | def load_from( |
| 44 | edges: Union[ |
| 45 | Mapping[str, Union[LoaderVariants, Sequence, Mapping]], LoaderVariants, Sequence |
| 46 | ], |
| 47 | vertices: Union[ |
| 48 | Mapping[str, Union[LoaderVariants, Sequence, Mapping]], |
| 49 | LoaderVariants, |
| 50 | Sequence, |
| 51 | None, |
| 52 | ] = None, |
| 53 | directed=True, |
| 54 | oid_type="int64_t", |
| 55 | vid_type="uint64_t", |
| 56 | generate_eid=True, |
| 57 | retain_oid=True, |
| 58 | vformat=None, |
| 59 | eformat=None, |
| 60 | vertex_map="global", |
| 61 | compact_edges=False, |
| 62 | use_perfect_hash=False, |
| 63 | ) -> Graph: |
| 64 | """Load a Arrow property graph using a list of vertex/edge specifications. |
| 65 | |
| 66 | .. deprecated:: version 0.3 |
| 67 | Use :class:`graphscope.Graph()` instead. |
| 68 | |
| 69 | - Use Dict of tuples to setup a graph. |
| 70 | We can use a dict to set vertex and edge configurations, |
| 71 | which can be used to build graphs. |
| 72 | |
| 73 | Examples: |
| 74 | |
| 75 | .. code:: ipython |
| 76 | |
| 77 | g = graphscope_session.load_from( |
| 78 | edges={ |
| 79 | "group": [ |
| 80 | ( |
| 81 | "file:///home/admin/group.e", |
| 82 | ["group_id", "member_size"], |
| 83 | ("leader_student_id", "student"), |
| 84 | ("member_student_id", "student"), |
| 85 | ), |
| 86 | ( |
| 87 | "file:///home/admin/group_for_teacher_student.e", |
| 88 | ["group_id", "group_name", "establish_date"], |
| 89 | ("teacher_in_charge_id", "teacher"), |
| 90 | ("member_student_id", "student"), |
| 91 | ), |
| 92 | ] |
| 93 | }, |
| 94 | vertices={ |
| 95 | "student": ( |
| 96 | "file:///home/admin/student.v", |
| 97 | ["name", "lesson_nums", "avg_score"], |
| 98 | "student_id", |
| 99 | ), |
| 100 | "teacher": ( |
nothing calls this directly
no test coverage detected