Skip to content

Commit

Permalink
Fixes open-metadata#18816 - Airbyte api endpoint (open-metadata#19207)
Browse files Browse the repository at this point in the history
* Fix Airbyte api endpoint

* Fix Airbyte api endpoint
  • Loading branch information
SumanMaharana authored Jan 7, 2025
1 parent f40369f commit 5b77c14
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from metadata.ingestion.ometa.client import REST, APIError, ClientConfig
from metadata.utils.constants import AUTHORIZATION_HEADER, NO_ACCESS_TOKEN
from metadata.utils.credentials import generate_http_basic_token
from metadata.utils.helpers import clean_uri


class AirbyteClient:
Expand All @@ -30,8 +31,8 @@ class AirbyteClient:
def __init__(self, config: AirbyteConnection):
self.config = config
client_config: ClientConfig = ClientConfig(
base_url=str(self.config.hostPort),
api_version="api/v1",
base_url=clean_uri(self.config.hostPort),
api_version=self.config.apiVersion,
auth_header=AUTHORIZATION_HEADER,
auth_token=lambda: (NO_ACCESS_TOKEN, 0),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ Configure and schedule Airbyte metadata and profiler workflows from the OpenMeta

- **Host and Port**: Pipeline Service Management UI URL

- **Username**: Username to connect to Airbyte.

- **Password**: Password to connect to Airbyte.

- **API Version**: Version of the Airbyte REST API by default `api/v1`.

{% /extraContent %}

{% partial file="/v1.6/connectors/test-connection.md" /%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ This is a sample config for Airbyte:

**hostPort**: Pipeline Service Management UI URL

{% /codeInfo %}

{% codeInfo srNumber=2 %}

**username**: Username to connect to Airbyte.

{% /codeInfo %}

{% codeInfo srNumber=3 %}

**password**: Password to connect to Airbyte.

{% /codeInfo %}

{% codeInfo srNumber=4 %}

**apiVersion**: Version of the Airbyte REST API by default `api/v1`.

{% /codeInfo %}

Expand Down Expand Up @@ -86,6 +103,15 @@ source:
```yaml {% srNumber=1 %}
hostPort: http://localhost:8000
```
```yaml {% srNumber=2 %}
username: <username>
```
```yaml {% srNumber=3 %}
password: <password>
```
```yaml {% srNumber=4 %}
apiVersion: api/v1
```
{% partial file="/v1.6/connectors/yaml/pipeline/source-config.md" /%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ Configure and schedule Airbyte metadata and profiler workflows from the OpenMeta

- **Host and Port**: Pipeline Service Management UI URL

- **Username**: Username to connect to Airbyte.

- **Password**: Password to connect to Airbyte.

- **API Version**: Version of the Airbyte REST API by default `api/v1`.

{% /extraContent %}

{% partial file="/v1.7/connectors/test-connection.md" /%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ This is a sample config for Airbyte:

**hostPort**: Pipeline Service Management UI URL

{% /codeInfo %}

{% codeInfo srNumber=2 %}

**username**: Username to connect to Airbyte.

{% /codeInfo %}

{% codeInfo srNumber=3 %}

**password**: Password to connect to Airbyte.

{% /codeInfo %}

{% codeInfo srNumber=4 %}

**apiVersion**: Version of the Airbyte REST API by default `api/v1`.

{% /codeInfo %}

Expand Down Expand Up @@ -86,6 +103,15 @@ source:
```yaml {% srNumber=1 %}
hostPort: http://localhost:8000
```
```yaml {% srNumber=2 %}
username: <username>
```
```yaml {% srNumber=3 %}
password: <password>
```
```yaml {% srNumber=4 %}
apiVersion: api/v1
```
{% partial file="/v1.7/connectors/yaml/pipeline/source-config.md" /%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
"type": "string",
"format": "password"
},
"apiVersion": {
"title": "API Version",
"description": "Airbyte API version.",
"type": "string",
"default": "api/v1"
},
"supportsMetadataExtraction": {
"title": "Supports Metadata Extraction",
"$ref": "../connectionBasicType.json#/definitions/supportsMetadataExtraction"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ $$section
### Password $(id="password")
Password to connect to Airbyte.
$$

$$section
### Api Version $(id="apiVersion")
Version of the Airbyte REST API by default `api/v1`.
$$
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
* Airbyte Metadata Database Connection Config
*/
export interface AirbyteConnection {
/**
* Airbyte API version.
*/
apiVersion?: string;
/**
* Pipeline Service Management/UI URL.
*/
Expand Down

0 comments on commit 5b77c14

Please sign in to comment.