You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: connectors/goshippo/README.md
+83-85Lines changed: 83 additions & 85 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,9 +45,9 @@ This connector uses API token authentication to connect to the Goshippo API. The
45
45
46
46
To obtain your API token:
47
47
48
-
1. Log in to your Goshippo account.
48
+
1. Log in to your [Goshippo account](https://apps.goshippo.com/login?).
49
49
2. Go to **Settings > API**.
50
-
3. Copy your API token.
50
+
3. Copy your API token or generate a new one.
51
51
4. Add the API token to the `configuration.json` file.
52
52
53
53
## Pagination
@@ -61,7 +61,6 @@ The pagination loop continues until the API returns no `next` URL, indicating th
61
61
The connector processes shipment data and related entities as follows:
62
62
63
63
1. Main shipments - The `flatten_shipment()` function extracts and flattens shipment fields including addresses (from, to, return), carrier accounts, and metadata. Nested objects like addresses are flattened into individual columns with prefixes (`from_`, `to_`, `return_`).
64
-
65
64
2. Related data - The `process_shipment()` function coordinates upserting the main shipment record and its related data:
66
65
- Rates - The `process_rates()` function processes shipping rate options including carrier, amount, service level, and estimated delivery days.
67
66
- Parcels - The `process_parcels()` function processes parcel dimensions, weight, and metadata.
@@ -73,109 +72,108 @@ The connector uses the `op.upsert()` operation to insert or update records in th
73
72
74
73
The connector implements comprehensive error handling with retry logic (refer to the `fetch_shipments_page()`, `handle_response_status()`, and `handle_request_exception()` functions):
75
74
76
-
1. Retry logic - The connector retries requests up to 3 times (`__MAX_RETRIES`) for transient errors including:
75
+
- Retry logic - The connector retries requests up to 3 times (`__MAX_RETRIES`) for transient errors including:
77
76
- Network timeouts and connection errors
78
77
- Rate limiting (HTTP 429)
79
78
- Server errors (HTTP 500, 502, 503, 504)
80
-
81
-
2. Exponential backoff - The `calculate_retry_delay()` function implements exponential backoff with a maximum delay of 60 seconds.
82
-
83
-
3. Fail fast - The connector immediately raises exceptions for permanent errors like authentication failures (4xx errors) without retrying.
84
-
85
-
4. Specific exception handling - The connector catches specific exceptions (`RuntimeError`, `requests.RequestException`, `ValueError`, `KeyError`, `requests.Timeout`, `requests.ConnectionError`, `AttributeError`, `IndexError`, `TypeError`) rather than generic exceptions to avoid masking unexpected errors.
79
+
- Exponential backoff - The `calculate_retry_delay()` function implements exponential backoff with a maximum delay of 60 seconds.
80
+
- Fail fast - The connector immediately raises exceptions for permanent errors like authentication failures (4xx errors) without retrying.
81
+
- Specific exception handling - The connector catches specific exceptions (`RuntimeError`, `requests.RequestException`, `ValueError`, `KeyError`, `requests.Timeout`, `requests.ConnectionError`, `AttributeError`, `IndexError`, `TypeError`) rather than generic exceptions to avoid masking unexpected errors.
86
82
87
83
All errors are logged using the SDK's logging framework before being raised.
88
84
89
85
## Tables created
90
86
91
-
The connector creates the following tables in the destination (refer to the `schema()` function):
87
+
The connector creates the `SHIPMENT`, `SHIPMENT_RATES`, `SHIPMENT_PARCELS`, and `SHIPMENT_MESSAGES` tables in the destination.
88
+
89
+
Refer to the `schema()` function for more details.
92
90
93
-
### shipments
91
+
### SHIPMENTS
94
92
95
93
| Column | Type | Description |
96
94
|--------|------|-------------|
97
-
| object_id | STRING | Unique identifier for the shipment (Primary Key) |
98
-
| object_created | STRING | Timestamp when shipment was created |
99
-
| object_updated | STRING | Timestamp when shipment was last updated |
100
-
| object_owner | STRING | Owner of the shipment object |
101
-
| status | STRING | Current status of the shipment |
|`shipment_object_id`| STRING | Associated shipment ID |
173
+
|`source`| STRING | Message source |
174
+
|`code`| STRING | Message code |
175
+
|`text`| STRING | Message text |
178
176
179
177
## Additional considerations
180
178
181
-
The examples provided are intended to help you effectively use Fivetran's Connector SDK. While we've tested the code, Fivetran cannot be held responsible for any unexpected or negative consequences that may arise from using these examples. For inquiries, please reach out to our Support team.
179
+
The examples provided are intended to help you effectively use Fivetran's Connector SDK. While we've tested the code, Fivetran cannot be held responsible for any unexpected or negative consequences that may arise from using these examples. For inquiries, please reach out to our Support team.
0 commit comments