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(doc): Complete yml file description for labeled data #655

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading