Skip to content

Commit

Permalink
Move comment to Python tab
Browse files Browse the repository at this point in the history
  • Loading branch information
g-despot committed Jan 28, 2025
1 parent bf8d004 commit 5f952b8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions _includes/code/quickstart/local.quickstart.import_objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import JavaCode from '!!raw-loader!/_includes/code/howto/java/src/test/java/io/w
title="quickstart_import.py"
/>

During a batch import, any failed objects can be obtained through `batch.failed_objects`. Additionally, a running count of failed objects is maintained and can be accessed through `batch.number_errors` within the context manager. This counter can be used to stop the import process in order to investigate the failed objects or references. Find out more about error handling on the Python client [reference page](/developers/weaviate/client-libraries/python#error-handling).

</TabItem>

<TabItem value="js" label="JS/TS">
Expand Down
3 changes: 3 additions & 0 deletions _includes/code/quickstart/quickstart.import_objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import JavaCode from '!!raw-loader!/_includes/code/howto/java/src/test/java/io/w
title="quickstart_import.py"
/>


During a batch import, any failed objects can be obtained through `batch.failed_objects`. Additionally, a running count of failed objects is maintained and can be accessed through `batch.number_errors` within the context manager. This counter can be used to stop the import process in order to investigate the failed objects or references. Find out more about error handling on the Python client [reference page](/developers/weaviate/client-libraries/python#error-handling).

</TabItem>

<TabItem value="js" label="JS/TS">
Expand Down
17 changes: 9 additions & 8 deletions developers/weaviate/manage-data/import.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ The following example adds objects to the `MyCollection` collection.
endMarker="# END BasicBatchImportExample"
language="py"
/>

### Error handling

During a batch import, any failed objects or references will be stored and can be obtained through `batch.failed_objects` and `batch.failed_references`.
Additionally, a running count of failed objects and references is maintained and can be accessed through `batch.number_errors` within the context manager.
This counter can be used to stop the import process in order to investigate the failed objects or references.

Find out more about error handling on the Python client [reference page](/developers/weaviate/client-libraries/python#error-handling).

</TabItem>

<TabItem value="py3" label="Python Client v3">
Expand Down Expand Up @@ -90,14 +99,6 @@ The following example adds objects to the `MyCollection` collection.
</TabItem>
</Tabs>

### Error handling

During a batch import, any failed objects or references will be stored and can be obtained through `batch.failed_objects` and `batch.failed_references`.
Additionally, a running count of failed objects and references is maintained and can be accessed through `batch.number_errors` within the context manager.
This counter can be used to stop the import process in order to investigate the failed objects or references.

Find out more about error handling on the Python client [reference page](/developers/weaviate/client-libraries/python#error-handling).

## Use the gRPC API

:::info Added in `v1.23`.
Expand Down
2 changes: 0 additions & 2 deletions developers/weaviate/quickstart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,6 @@ import ImportObjects from '/_includes/code/quickstart/quickstart.import_objects.

Run this code to add the demo data.

During a batch import, any failed objects can be obtained through `batch.failed_objects`. Additionally, a running count of failed objects is maintained and can be accessed through `batch.number_errors` within the context manager. This counter can be used to stop the import process in order to investigate the failed objects or references. Find out more about error handling on the Python client [reference page](/developers/weaviate/client-libraries/python#error-handling).

:::info Cohere API key in the header
Note that this code includes an additional header for the Cohere API key. Weaviate uses this key to generate vector embeddings for the data objects as they are being added.
:::
Expand Down
2 changes: 0 additions & 2 deletions developers/weaviate/quickstart/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ import ImportObjects from '/_includes/code/quickstart/local.quickstart.import_ob

Run this code to add the demo data.

During a batch import, any failed objects can be obtained through `batch.failed_objects`. Additionally, a running count of failed objects is maintained and can be accessed through `batch.number_errors` within the context manager. This counter can be used to stop the import process in order to investigate the failed objects or references. Find out more about error handling on the Python client [reference page](/developers/weaviate/client-libraries/python#error-handling).

<hr/>

## Step 3: Queries
Expand Down

0 comments on commit 5f952b8

Please sign in to comment.