Fixes #18816 - Airbyte api endpoint (#19207)

* Fix Airbyte api endpoint

* Fix Airbyte api endpoint
This commit is contained in:
Suman Maharana 2025-01-07 12:41:56 +05:30 committed by GitHub
parent f40369f59b
commit 5b77c14dc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 83 additions and 2 deletions

View File

@ -20,6 +20,7 @@ from metadata.generated.schema.entity.services.connections.pipeline.airbyteConne
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:
@ -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),
)

View File

@ -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" /%}

View File

@ -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 %}
@ -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" /%}

View File

@ -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" /%}

View File

@ -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 %}
@ -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" /%}

View File

@ -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"

View File

@ -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`.
$$

View File

@ -16,6 +16,10 @@
* Airbyte Metadata Database Connection Config
*/
export interface AirbyteConnection {
/**
* Airbyte API version.
*/
apiVersion?: string;
/**
* Pipeline Service Management/UI URL.
*/