Skip to content

Commit d5af7c3

Browse files
authored
IBM watsonx.data destination connector: add max connection retries, increase retry defaults and limits (#600)
1 parent c0c8774 commit d5af7c3

File tree

7 files changed

+14
-5
lines changed

7 files changed

+14
-5
lines changed

snippets/destination_connectors/ibm_watsonxdata.sh.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ unstructured-ingest \
2323
--catalog $IBM_ICEBERG_CATALOG \
2424
--namespace $IBM_ICEBERG_SCHEMA \
2525
--table $IBM_ICEBERG_TABLE \
26-
--max-retries 5 \
26+
--max-retries 50 \
27+
--max-retries-connection 10 \
2728
--record-id-key $IBM_ICEBERG_TABLE_UNIQUE_RECORD_COLUMN
2829
```

snippets/destination_connectors/ibm_watsonxdata.v2.py.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ if __name__ == "__main__":
5656
uploader_config=IbmWatsonxUploaderConfig(
5757
namespace=os.getenv("IBM_ICEBERG_SCHEMA"),
5858
table=os.getenv("IBM_ICEBERG_TABLE"),
59-
max_retries=5,
59+
max_retries=50,
60+
max_retries_connection=10,
6061
record_id_key=os.getenv("IBM_ICEBERG_TABLE_UNIQUE_RECORD_COLUMN")
6162
)
6263
).run()

snippets/destination_connectors/ibm_watsonxdata_rest_create.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ curl --request 'POST' --location \
1919
"namespace": "<namespace>",
2020
"table": "<table>",
2121
"max_retries": <max-retries>,
22+
"max_retries_connection": <max-retries-connection>,
2223
"record_id_key": "<record-id-key>"
2324
}
2425
}'

snippets/destination_connectors/ibm_watsonxdata_sdk.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ with UnstructuredClient(api_key_auth=os.getenv("UNSTRUCTURED_API_KEY")) as clien
2626
namespace="<namespace>",
2727
table="<table>",
2828
max_retries=<max-retries>,
29+
max_retries_connection=<max-retries-connection>,
2930
record_id_key="<record-id-key>"
3031
)
3132
)

snippets/general-shared-text/ibm-watsonxdata-api-placeholders.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
- `<catalog>` (_required_): The name of the target Apache Iceberg-based catalog within the IBM watsonx.data data store instance.
99
- `<namespace>` (_required_): The name of the target namespace (also known as a schema) within the catalog.
1010
- `<table>` (_required_): The name of the target table within the namespace (schema).
11-
- `<max-retries>`: The maximum number of retries for the upload process. The default is `5`.
11+
- `<max-retries>`: The maximum number of retries for the upload process. The default is `50`. If specified, it must be a number between `2` and `500`, inclusive.
12+
- `<max-retries-connection>`: The maximum number of retries when connecting to the catalog. The default is `10`. If specified, it must be a number between `2` and `100`, inclusive.
1213
- `<record-id-key>`: The name of the column that uniquely identifies each record in the target table. The default is `record_id`.

snippets/general-shared-text/ibm-watsonxdata-cli-api.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@ The following environment variables:
2121
- `IBM_ICEBERG_TABLE` - The name of the target table in the target schema, represented by `--table` (CLI) or `table` (Python).
2222
- `IBM_ICEBERG_TABLE_UNIQUE_RECORD_COLUMN` - The name of the column that uniquely identifies each record in the target table, represented by `--record-id-key` (CLI) or `record_id_key` (Python). The default is `record_id`.
2323

24-
Additionally, `--max-retries` (CLI) or `max_retries` (Python) is an optional parameter that specifies the number of times to retry uploading data. The default is `5`. If specified, it must be a number between `2` and `10`, inclusive.
24+
Additionally:
25+
26+
- `--max-retries-connection` (CLI) or `max_retries_connection` (Python) is an optional parameter that specifies the maximum number of retries when connecting to the catalog. The default is `10`. If specified, it must be a number between `2` and `100`, inclusive.
27+
- `--max-retries` (CLI) or `max_retries` (Python) is an optional parameter that specifies the number of times to retry uploading data. The default is `50`. If specified, it must be a number between `2` and `500`, inclusive.

snippets/general-shared-text/ibm-watsonxdata-platform.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ Fill in the following fields:
1010
- **Catalog** (_required_): The name of the target Apache Iceberg-based catalog within the IBM watsonx.data data store instance.
1111
- **Namespace** (_required_): The name of the target namespace (also known as a schema) within the catalog.
1212
- **Table** (_required_): The name of the target table within the namespace (schema).
13-
- **Max Retries**: The maximum number of retries for the upload process. The default is `5`.
13+
- **Max Connection Retries**: The maximum number of retries when connecting to the catalog. The default is `10`. If specified, it must be a number between `2` and `100`, inclusive.
14+
- **Max Retries**: The maximum number of retries when uploading data. The default is `50`. If specified, it must be a number between `2` and `500`, inclusive.
1415
- **Record ID Key**: The name of the column that uniquely identifies each record in the target table. The default is `record_id`.

0 commit comments

Comments
 (0)