Skip to content

Commit

Permalink
feat(doc): Complete yml file description for labeled data
Browse files Browse the repository at this point in the history
  • Loading branch information
Elssky committed Oct 31, 2024
1 parent 02d2a3f commit 52974b9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
1 change: 1 addition & 0 deletions cpp/thirdparty/Catch2
Submodule Catch2 added at 20ace5
32 changes: 30 additions & 2 deletions docs/libraries/cpp/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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{};
Expand Down
1 change: 1 addition & 0 deletions encoding
Submodule encoding added at 6c1d05
1 change: 1 addition & 0 deletions synthetic
Submodule synthetic added at c81544

0 comments on commit 52974b9

Please sign in to comment.