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

🚧 [WIP]: Add new structure and docs for tutorials #359

Closed
wants to merge 30 commits into from

Conversation

prrao87
Copy link
Member

@prrao87 prrao87 commented Feb 5, 2025

This PR is a WIP that will provide a more comprehensive tutorial in each client language that Kùzu supports. More tutorials will be added by members of the team over time.

acquamarin and others added 29 commits January 20, 2025 09:51
* Create delta.mdx

* Update delta.mdx

* Update index.mdx

* Update delta.mdx

* Update delta.mdx

* Fixes

---------

Co-authored-by: Prashanth Rao <[email protected]>
Co-authored-by: prrao87 <[email protected]>
* add ice_berg docu

* Update src/content/docs/extensions/iceberg.mdx

Co-authored-by: Guodong Jin <[email protected]>

* Update src/content/docs/extensions/iceberg.mdx

Co-authored-by: Guodong Jin <[email protected]>

* restructure

* restructure

* restructure

* update table

* update table

* Apply suggestions from code review

* update table

* Fixes

---------

Co-authored-by: Guodong Jin <[email protected]>
Co-authored-by: Prashanth Rao <[email protected]>
Co-authored-by: prrao87 <[email protected]>
Update wasm.mdx

Update docs (#331)

Fix demo script

Starting merge for 0.8.0
* Add doc for `show_indexes`, `show_official_extensions` and `show_loaded_extensions`

* Apply suggestions from code review

* Update src/content/docs/cypher/query-clauses/call.md

---------

Co-authored-by: Prashanth Rao <[email protected]>
* Create full-text-search.md

* Update full-text-search.md

* Update FTS docs

---------

Co-authored-by: prrao87 <[email protected]>
* Add doc for file-format

* Update index.mdx

* Apply suggestions from code review

---------

Co-authored-by: ziyi chen <[email protected]>
* Add doc for yield clause

* Apply suggestions from code review

---------

Co-authored-by: Prashanth Rao <[email protected]>
* skip/limit doc

* Update limit.md

* Update limit.md

* Update skip.md
* Add docs on query result getNext() behaviour

* Add manual frees in C API example

* Apply suggestions from code review

---------

Co-authored-by: Prashanth Rao <[email protected]>
* Add doc for duckdb's type conversion

* Update rdbms.mdx

* Update rdbms.mdx

* Update rdbms.mdx

* Update rdbms.mdx

* Update src/content/docs/extensions/attach/rdbms.mdx

Co-authored-by: Guodong Jin <[email protected]>

* Update src/content/docs/extensions/attach/rdbms.mdx

Co-authored-by: Guodong Jin <[email protected]>

* Update src/content/docs/extensions/attach/rdbms.mdx

Co-authored-by: Guodong Jin <[email protected]>

* Update src/content/docs/extensions/attach/rdbms.mdx

Co-authored-by: Guodong Jin <[email protected]>

* Update rdbms.mdx

---------

Co-authored-by: Guodong Jin <[email protected]>
* rel-table-group

* Polish rel group

* Update src/content/docs/cypher/data-definition/create-table.md

Co-authored-by: Guodong Jin <[email protected]>

* Update src/content/docs/cypher/data-definition/create-table.md

Co-authored-by: Guodong Jin <[email protected]>

* Update src/content/docs/cypher/data-definition/create-table.md

---------

Co-authored-by: xiyang <[email protected]>
Co-authored-by: Prashanth Rao <[email protected]>
Co-authored-by: Guodong Jin <[email protected]>
@prrao87 prrao87 linked an issue Feb 5, 2025 that may be closed by this pull request
@prrao87 prrao87 changed the title Add new structure and docs for tutorials 🚧 [WIP]: Add new structure and docs for tutorials Feb 5, 2025
@prrao87
Copy link
Member Author

prrao87 commented Feb 5, 2025

@WWW0030 You can start with this structure, and begin adding the tutorials for each language as subheaders. I've created a blank template for Rust to get started.

Copy link
Member Author

@prrao87 prrao87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some fixes needed, but once they're in there, I'll run the full code end to end. Thanks!

For more information, please refer to our docs on [Create your first graph](../../get-started/index.mdx)

## Creating Tables
We first need to create the tables to store within the database. In this case, we need to create 5 different tables, one for each of the two Node entity types, and one for each fo the three Relation types. We create the tables using the following queries:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We first need to create the tables to store within the database. In this case, we need to create 5 different tables, one for each of the two Node entity types, and one for each fo the three Relation types. We create the tables using the following queries:
The first step in building any Kùzu graph is schema definition. We will define the node and relationships tables as per our desired schema as follows:

""", u1, u2, u3, u3);
conn.query(query)?;
```

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we link to a single main.rs file that the user can just copy paste entirely? So that when they read through to this point, they can just see the entire file and copy-paste the entire code in one go.

MATCH (u1:User)-[f1:FOLLOWS]->(u2:User)-[f2:Follows]->(u3:User)-[f3:FOLLOWS]->(u4:User)
RETURN count(u4);
""")?;
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should always show the results of every query. Exactly as it would appear in the terminal. So that the user knows what to expect.

@prrao87 prrao87 deleted the branch dev February 7, 2025 18:19
@prrao87 prrao87 closed this Feb 7, 2025
@WWW0030 WWW0030 mentioned this pull request Feb 8, 2025
@prrao87 prrao87 deleted the tutorial-update branch March 7, 2025 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve tutorial documentation
8 participants