1
0
mirror of synced 2025-12-25 02:09:19 -05:00

🐛 Source Google Directory: migrate to advanced auth (#26775)

* Connector health: source hubspot, gitlab, snapchat-marketing: fix builds

* #26232 source Google Directory: remove authSpecification from spec

* #26775 upd changelog

* #26232 source google directory: update stream schemas

* source google directory: update the Users stream schema

* source google directory: fix schema

* #26232 source google directory: add even more fields

* source google directory: add primary key

* expose pk for CATs
This commit is contained in:
Denys Davydov
2023-05-31 20:53:34 +03:00
committed by GitHub
parent 1766460279
commit c10bd5e706
9 changed files with 172 additions and 29 deletions

View File

@@ -34,5 +34,5 @@ COPY source_google_directory ./source_google_directory
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
LABEL io.airbyte.version=0.1.9
LABEL io.airbyte.version=0.2.0
LABEL io.airbyte.name=airbyte/source-google-directory

View File

@@ -5,30 +5,36 @@
"name": "users",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_cursor": false
"source_defined_cursor": false,
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
"destination_sync_mode": "overwrite",
"primary_key": [["id"]]
},
{
"stream": {
"name": "groups",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_cursor": false
"source_defined_cursor": false,
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
"destination_sync_mode": "overwrite",
"primary_key": [["id"]]
},
{
"stream": {
"name": "group_members",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_cursor": false
"source_defined_cursor": false,
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
"destination_sync_mode": "overwrite",
"primary_key": [["id"]]
}
]
}

View File

@@ -2,7 +2,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: d19ae824-e289-4b14-995a-0632eb46d246
dockerImageTag: 0.1.9
dockerImageTag: 0.2.0
dockerRepository: airbyte/source-google-directory
githubIssueLabel: source-google-directory
icon: googledirectory.svg

View File

@@ -3,8 +3,9 @@
#
from typing import Any, Mapping, Tuple
from typing import Any, Generator, Mapping, Tuple
from airbyte_cdk.models import AirbyteStream
from airbyte_cdk.sources.deprecated.client import BaseClient
from .api import API, GroupMembersAPI, GroupsAPI, UsersAPI
@@ -40,3 +41,9 @@ class Client(BaseClient):
error_msg = repr(error)
return alive, error_msg
@property
def streams(self) -> Generator[AirbyteStream, None, None]:
for stream in super().streams:
stream.source_defined_primary_key = [["id"]]
yield stream

View File

@@ -16,6 +16,12 @@
},
"type": {
"type": ["null", "string"]
},
"etag": {
"type": ["null", "string"]
},
"status": {
"type": ["null", "string"]
}
}
}

View File

@@ -25,6 +25,18 @@
},
"adminCreated": {
"type": ["null", "boolean"]
},
"aliases": {
"type": ["null", "array"],
"items": {
"type": ["null", "string"]
}
},
"nonEditableAliases": {
"type": ["null", "array"],
"items": {
"type": ["null", "string"]
}
}
}
}

View File

@@ -166,6 +166,129 @@
},
"includeInGlobalAddressList": {
"type": ["null", "boolean"]
},
"etag": {
"type": ["null", "string"]
},
"languages": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"languageCode": {
"type": ["null", "string"]
},
"preference": {
"type": ["null", "string"]
}
}
}
},
"isEnforcedIn2Sv": {
"type": ["null", "boolean"]
},
"isEnrolledIn2Sv": {
"type": ["null", "boolean"]
},
"archived": {
"type": ["null", "boolean"]
},
"primaryEmail": {
"type": ["null", "string"]
},
"suspensionReason": {
"type": ["null", "string"]
},
"locations": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"area": {
"type": ["null", "string"]
},
"buildingId": {
"type": ["null", "string"]
},
"type": {
"type": ["null", "string"]
}
}
}
},
"thumbnailPhotoEtag": {
"type": ["null", "string"]
},
"thumbnailPhotoUrl": {
"type": ["null", "string"]
},
"addresses": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"formatted": {
"type": ["null", "string"]
},
"type": {
"type": ["null", "string"]
}
}
}
},
"recoveryPhone": {
"type": ["null", "string"]
},
"recoveryEmail": {
"type": ["null", "string"]
},
"gender": {
"type": ["null", "object"],
"properties": {
"type": {
"type": ["null", "string"]
}
}
},
"sshPublicKeys": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"expirationTimeUsec": {
"type": ["null", "string"]
},
"fingerprint": {
"type": ["null", "string"]
},
"key": {
"type": ["null", "string"]
}
}
}
},
"posixAccounts": {
"gid": {
"type": ["null", "string"]
},
"homeDirectory": {
"type": ["null", "string"]
},
"operatingSystemType": {
"type": ["null", "string"]
},
"primary": {
"type": ["null", "boolean"]
},
"systemId": {
"type": ["null", "string"]
},
"uid": {
"type": ["null", "string"]
},
"username": {
"type": ["null", "string"]
}
}
}
}

View File

@@ -23,8 +23,6 @@
"title": "Credentials Title",
"description": "Authentication Scenario",
"const": "Web server app",
"enum": ["Web server app"],
"default": "Web server app",
"order": 0
},
"client_id": {
@@ -58,8 +56,6 @@
"title": "Credentials Title",
"description": "Authentication Scenario",
"const": "Service accounts",
"enum": ["Service accounts"],
"default": "Service accounts",
"order": 0
},
"credentials_json": {
@@ -78,13 +74,5 @@
]
}
}
},
"authSpecification": {
"auth_type": "oauth2.0",
"oauth2Specification": {
"rootObject": ["credentials", 0],
"oauthFlowInitParameters": [["client_id"], ["client_secret"]],
"oauthFlowOutputParameters": [["refresh_token"]]
}
}
}

View File

@@ -66,11 +66,12 @@ You should now be ready to use the Google Directory connector in Airbyte.
## Changelog
| Version | Date | Pull Request | Subject |
| :------ | :-------- | :----- | :------ |
| 0.1.9 | 2021-12-06 | [8524](https://github.com/airbytehq/airbyte/pull/8524) | Update connector fields title/description |
| 0.1.8 | 2021-11-02 | [7409](https://github.com/airbytehq/airbyte/pull/7409) | Support oauth (update publish) |
| 0.1.7 | 2021-11-02 | [7409](https://github.com/airbytehq/airbyte/pull/7409) | Support oauth |
| 0.1.6 | 2021-11-02 | [7464](https://github.com/airbytehq/airbyte/pull/7464) | Migrate to the CDK |
| 0.1.5 | 2021-10-20 | [6930](https://github.com/airbytehq/airbyte/pull/6930) | Fix crash when a group don't have members |
| 0.1.4 | 2021-10-19 | [7167](https://github.com/airbytehq/airbyte/pull/7167) | Add organizations and phones to `users` schema |
| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------|
| 0.2.0 | 2023-05-30 | [26775](https://github.com/airbytehq/airbyte/pull/26775) | Remove `authSpecification` from spec; update stream schemas. |
| 0.1.9 | 2021-12-06 | [8524](https://github.com/airbytehq/airbyte/pull/8524) | Update connector fields title/description |
| 0.1.8 | 2021-11-02 | [7409](https://github.com/airbytehq/airbyte/pull/7409) | Support oauth (update publish) |
| 0.1.7 | 2021-11-02 | [7409](https://github.com/airbytehq/airbyte/pull/7409) | Support oauth |
| 0.1.6 | 2021-11-02 | [7464](https://github.com/airbytehq/airbyte/pull/7464) | Migrate to the CDK |
| 0.1.5 | 2021-10-20 | [6930](https://github.com/airbytehq/airbyte/pull/6930) | Fix crash when a group don't have members |
| 0.1.4 | 2021-10-19 | [7167](https://github.com/airbytehq/airbyte/pull/7167) | Add organizations and phones to `users` schema |