From 52974b9f3f5441a437b6eb8ae1603a95770eec2b Mon Sep 17 00:00:00 2001 From: Elssky <1914127671@qq.com> Date: Thu, 31 Oct 2024 11:43:54 +0800 Subject: [PATCH] feat(doc): Complete yml file description for labeled data --- cpp/thirdparty/Catch2 | 1 + docs/libraries/cpp/getting-started.md | 32 +++++++++++++++++++++++++-- encoding | 1 + synthetic | 1 + 4 files changed, 33 insertions(+), 2 deletions(-) create mode 160000 cpp/thirdparty/Catch2 create mode 160000 encoding create mode 160000 synthetic diff --git a/cpp/thirdparty/Catch2 b/cpp/thirdparty/Catch2 new file mode 160000 index 000000000..20ace5503 --- /dev/null +++ b/cpp/thirdparty/Catch2 @@ -0,0 +1 @@ +Subproject commit 20ace5503422a8511036aa9d486435041127e0cf diff --git a/docs/libraries/cpp/getting-started.md b/docs/libraries/cpp/getting-started.md index c2c433fd5..d1458dfff 100644 --- a/docs/libraries/cpp/getting-started.md +++ b/docs/libraries/cpp/getting-started.md @@ -287,10 +287,38 @@ id|:LABEL|name|url 0|company;public|Kam_Air|http://dbpedia.org/resource/Kam_Air 1|company|Balkh_Airlines|http://dbpedia.org/resource/Balkh_Airlines 2|company|Khyber_Afghan_Airlines|http://dbpedia.org/resource/Khyber_Afghan_Airlines - +... +1575|university|Paktia_University|http://dbpedia.org/resource/Paktia_University ``` +At the beginning, we need to add label information into the `yml` file of vertex. For this example, it should be as follows. + +```yml +# organisation.vertex.yml + +type: organisation +chunk_size: 4096 +prefix: vertex/organisation/ +# add the label infos +labels: + - university + - company + - public +property_groups: + - file_type: parquet + properties: + - name: name + data_type: string + is_primary: false + - name: url + data_type: string + is_primary: false + - name: id + data_type: int64 + is_primary: true +version: gar/v1 -When you have the data ready, you can read the file into `arrow::Table` by using arrow IO function. +``` +When you have the data ready, you can read the file into `arrow::Table` by using arrow I/O function. ``` cpp arrow::csv::ReadOptions read_options{}; diff --git a/encoding b/encoding new file mode 160000 index 000000000..6c1d050f0 --- /dev/null +++ b/encoding @@ -0,0 +1 @@ +Subproject commit 6c1d050f0cec6dfa9b9bc58502ef31465b27180c diff --git a/synthetic b/synthetic new file mode 160000 index 000000000..c81544753 --- /dev/null +++ b/synthetic @@ -0,0 +1 @@ +Subproject commit c815447537d387dc5418a00a0a0e4fc5f5a16755