Add support to specify custom table schema#138
Open
Anupkumar Ghogare (anupkg1985) wants to merge 4 commits intolangchain-ai:mainfrom
Open
Add support to specify custom table schema#138Anupkumar Ghogare (anupkg1985) wants to merge 4 commits intolangchain-ai:mainfrom
Anupkumar Ghogare (anupkg1985) wants to merge 4 commits intolangchain-ai:mainfrom
Conversation
|
Will this get merged? Im in need of setting up pg vector tables per environment which I am isolating by the schema |
|
I would also like this feature |
|
Not having the ability to select a schema in a way that's idiomatic to langchain is problematic. Can this be merged? |
|
Do you need to link reviewers to get this reviewed and merged? |
Author
Yes, could you please provide the link? |
|
Table schema can already be specified using schema_translate_map from sqlalchemy: engine_args={
"execution_options": {
"schema_translate_map": {
None: "target_schema_name",
},
},
}I think more useful will be to allow table names to be changed (like in #106). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current
LangChain-Postgresframework, the database table name is hardcoded and defaults to thepublicschema due to the absence of a specified schema name. This limitation affects the flexibility of thePGVectorconnector, restricting its ability to dynamically configure during runtime. This poses significant challenges in multi-tenant architectures, where it's essential for different clients or projects to operate within separate schemas to ensure data isolation and management efficiency. Addressing this issue would involve enabling schema specification, thereby enhancing the connector's versatility and making it more suitable for diverse deployment scenarios.Proposed solution -
table_schemato `PGVector' classpublicschemaDiscussions related to issue -
https://github.com/langchain-ai/langchain/discussions/20877
https://github.com/langchain-ai/langchain/discussions/18883
Example usage -
Default
publicschema -Specify custom table-schema -