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

fix: tugraph create schema error #2073

Closed
wants to merge 1 commit into from
Closed

fix: tugraph create schema error #2073

wants to merge 1 commit into from

Conversation

vritser
Copy link
Contributor

@vritser vritser commented Oct 16, 2024

Description

TuGraph create label syntax error

How Has This Been Tested?

Just create a knowledge base of KnowledgeGraph type and upload files

Snapshots:

Checklist:

  • My code follows the style guidelines of this project
  • I have already rebased the commits and make the commit message conform to the project standard.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules

@github-actions github-actions bot added the fix Bug fixes label Oct 16, 2024
@Appointat
Copy link
Contributor

@vritser Thanks so much for your PR.

Issue: when GraphRAG builds the DB schema, different versions of TuGraph handle the types STRING and "STRING" differently (one version supports STRING; while the other version supports "STRING"). It is caused by the TuGraph version update.

We fixed it in another PR (document structure search in GraphRAG), and will release it in the next released version of DB-GPT.

Solutions: We used statements createVertexLabelByJson and createEdgeLabelByJson to be compatible with the new and old versions of feat. (note: createVertexLabelByJson and createEdgeLabelByJson have not yet been updated in the official documentation of TuGraph)

            gql_data = json.dumps({
                "label": graph_elem_type.value,
                "type": "EDGE",
                "constraints": edge_direction(graph_elem_type),
                "properties": graph_properties,
            })
            gql = f"""CALL db.createEdgeLabelByJson('{data}')"""

@vritser
Copy link
Contributor Author

vritser commented Oct 18, 2024

OK, thanks

@vritser vritser closed this by deleting the head repository Oct 18, 2024
@csunny
Copy link
Collaborator

csunny commented Oct 18, 2024

@yihong0618 Please add @vritser to co-author about #2033

@Appointat
Copy link
Contributor

Appointat commented Oct 18, 2024

@vritser could you provide me your email?, so that I can add you to the contributors of pr #2033 (reply to me today if possible). :)

@vritser
Copy link
Contributor Author

vritser commented Oct 18, 2024

@vritser could you provide me your email?, so that I can add you to the contributors of pr #2033 (reply to me today if possible). :)

vritser@gmail.com

@Appointat
Copy link
Contributor

Appointat commented Oct 18, 2024

@vritser could you provide me your email?, so that I can add you to the contributors of pr #2033 (reply to me today if possible). :)

vritser@gmail.com

Done. And the pr was merged #2033. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants