Skip to content

Add create_or_replace_document_objects method to weaviate provider#36177

Merged
utkarsharma2 merged 36 commits into
apache:mainfrom
astronomer:WeaviateIngest
Dec 23, 2023
Merged

Add create_or_replace_document_objects method to weaviate provider#36177
utkarsharma2 merged 36 commits into
apache:mainfrom
astronomer:WeaviateIngest

Conversation

@utkarsharma2

Copy link
Copy Markdown
Contributor

When inserting the data into weaviate database, it's common to override the existing data, if users go about doing that themselves, there are lots of cases and API failures that need to be handled. This PR aims to provide a helper function that can handle all cases.

@mpgreg mpgreg left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks great. Still need to address upsert needs and also error handling. See comments.

Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread tests/providers/weaviate/hooks/test_weaviate.py
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated

@sunank200 sunank200 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In the ineFor ingesting data, it should determine objects to insert, objects to delete and objects that remain unchanged for each chunk. This would simplify the logic.

Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py
@utkarsharma2 utkarsharma2 changed the title Add create_or_replace_objects method to weaviate provider Add create_or_replace_document_objects method to weaviate provider Dec 20, 2023
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py
Comment thread airflow/providers/weaviate/hooks/weaviate.py
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py Outdated
Comment thread airflow/providers/weaviate/hooks/weaviate.py
utkarsharma2 and others added 4 commits December 22, 2023 00:35
Co-authored-by: Josh Fell <48934154+josh-fell@users.noreply.github.com>
Co-authored-by: Josh Fell <48934154+josh-fell@users.noreply.github.com>

@sunank200 sunank200 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants