Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨Source Looker - Migrate Python CDK to Low-code CDK #37464

Merged
merged 53 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
18d57ad
migrate to lowcode
topefolorunso Apr 8, 2024
44c12ed
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Apr 22, 2024
0b459f2
custom auth
topefolorunso Apr 22, 2024
c829041
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Apr 22, 2024
e1c19d6
formats, fixes
topefolorunso Apr 22, 2024
901e0eb
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Apr 22, 2024
fc9742f
use api v4.0
topefolorunso Apr 22, 2024
a94c41c
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Apr 22, 2024
c19bb5c
fix manifest
topefolorunso Apr 24, 2024
7d79b2a
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Apr 24, 2024
06ee776
fix manifest, catalog
topefolorunso Apr 24, 2024
9f654ff
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Apr 24, 2024
85f1bea
Merge branch 'master' into tope/migrate-looker-lowcode
topefolorunso Apr 24, 2024
b151103
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Apr 24, 2024
b71ce80
Merge branch 'tope/migrate-looker-lowcode' of https://github.com/airb…
topefolorunso Apr 24, 2024
9c3a013
fix catalog
topefolorunso Apr 24, 2024
5649628
fix catalog
topefolorunso Apr 24, 2024
6ea0fa1
Merge branch 'master' into tope/migrate-looker-lowcode
topefolorunso Apr 24, 2024
2e71810
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Apr 25, 2024
cc87fa3
fix manifest
topefolorunso Apr 25, 2024
2b19470
fix query_history stream
topefolorunso Apr 25, 2024
cbb0709
empty streams
topefolorunso Apr 26, 2024
2992b86
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Apr 26, 2024
62922ad
doc
topefolorunso Apr 26, 2024
7957459
Merge branch 'master' into tope/migrate-looker-lowcode
girarda May 6, 2024
b974371
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso May 8, 2024
7cec9be
Merge branch 'tope/migrate-looker-lowcode' of https://github.com/airb…
topefolorunso May 8, 2024
80e2e99
refactor, major bump
topefolorunso May 10, 2024
3192205
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso May 10, 2024
45ad792
fix readme, schemas
topefolorunso May 10, 2024
081c84b
pytz
topefolorunso May 10, 2024
9fe0c82
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Jul 23, 2024
aa6f384
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Jul 23, 2024
9cf9375
update metadata, lock poetry
topefolorunso Jul 23, 2024
342ae3f
format
topefolorunso Jul 23, 2024
c0070ca
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Jul 23, 2024
6116312
Merge branch 'master' into tope/migrate-looker-lowcode
natikgadzhi Jul 24, 2024
d7303d9
format manifest
topefolorunso Jul 26, 2024
f2b492a
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Jul 26, 2024
87836d2
formats
topefolorunso Jul 27, 2024
ce1e16f
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Jul 27, 2024
69fc244
Merge branch 'tope/migrate-looker-lowcode' of https://github.com/airb…
topefolorunso Jul 27, 2024
4872ea5
lock poetry
topefolorunso Jul 27, 2024
6766043
lock poetry
topefolorunso Jul 27, 2024
7f7d1b5
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Jul 27, 2024
d29b263
minor fixes
topefolorunso Jul 30, 2024
c456562
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Jul 30, 2024
251883f
fix python version
topefolorunso Jul 30, 2024
3dae20d
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Jul 30, 2024
e663813
base image
topefolorunso Jul 30, 2024
b12e6a2
fix base image
topefolorunso Jul 30, 2024
0eb066c
Merge branch 'master' of https://github.com/airbytehq/airbyte into to…
topefolorunso Jul 30, 2024
d007608
Merge branch 'master' into tope/migrate-looker-lowcode
natikgadzhi Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions airbyte-integrations/connectors/source-looker/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
# Looker source connector


This is the repository for the Looker source connector, written in Python.
This is the repository for the Looker configuration based source connector.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/looker).

## Local development

### Prerequisites
* Python (~=3.9)
* Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)

* Python (`^3.9`)
* Poetry (`^1.7`) - installation instructions [here](https://python-poetry.org/docs/#installation)



### Installing the connector

From this connector directory, run:
```bash
poetry install --with dev
```


### Create credentials

**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/looker)
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_looker/spec.yaml` file.
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `src/source_looker/spec.yaml` file.
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
See `sample_files/sample_config.json` for a sample config file.

Expand All @@ -31,25 +35,34 @@ poetry run source-looker spec
poetry run source-looker check --config secrets/config.json
poetry run source-looker discover --config secrets/config.json
poetry run source-looker read --config secrets/config.json --catalog sample_files/configured_catalog.json
poetry run source-looker spec
poetry run source-looker check --config secrets/config.json
poetry run source-looker discover --config secrets/config.json
poetry run source-looker read --config secrets/config.json --catalog sample_files/configured_catalog.json
```

### Running unit tests
To run unit tests locally, from the connector directory run:
### Running tests

To run tests locally, from the connector directory run:

```
poetry run pytest unit_tests
poetry run pytest tests
```

### Building the docker image

1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
2. Run the following command to build the docker image:
```bash
airbyte-ci connectors --name=source-looker build
```

An image will be available on your host with the tag `airbyte/source-looker:dev`.
An image will be available on your host with the tag `airbyte/source-looker:dev`.


### Running as a docker container

Then run any of the connector commands as follows:
```
docker run --rm airbyte/source-looker:dev spec
Expand All @@ -59,16 +72,19 @@ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integrat
```

### Running our CI test suite

You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
```bash
airbyte-ci connectors --name=source-looker test
```

### Customizing acceptance Tests

Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.

### Dependency Management

All of your dependencies should be managed via Poetry.
To add a new dependency, run:
```bash
Expand All @@ -78,6 +94,7 @@ poetry add <package-name>
Please commit the changes to `pyproject.toml` and `poetry.lock` files.

## Publishing a new version of the connector

You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-looker test`
2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
connector_image: airbyte/source-looker:dev
tests:
spec:
- spec_path: "source_looker/spec.json"
- spec_path: "source_looker/spec.yaml"
connection:
- config_path: "secrets/config.json"
status: "succeed"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"query_history": {
"history_created_time": "2050-01-01T00:00:00Z"
"history.created_time": "2050-01-01T00:00:00Z"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
},
{
"stream": {
"name": "homepage_items",
"name": "board_items",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
Expand All @@ -150,7 +150,7 @@
},
{
"stream": {
"name": "homepage_sections",
"name": "board_sections",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
Expand All @@ -160,7 +160,7 @@
},
{
"stream": {
"name": "homepages",
"name": "boards",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
Expand Down Expand Up @@ -198,16 +198,6 @@
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "lookml_dashboards",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "lookml_models",
Expand Down Expand Up @@ -292,8 +282,8 @@
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["history_created_time"],
"source_defined_primary_key": [["query_id"], ["history_created_time"]]
"default_cursor_field": ["history.created_time"],
"source_defined_primary_key": [["query.id"], ["history.created_time"]]
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
Expand Down Expand Up @@ -328,26 +318,6 @@
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "spaces",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "space_ancestors",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "user_attributes",
Expand All @@ -368,15 +338,6 @@
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "user_attribute_values",
"json_schema": {},
"supported_sync_modes": ["full_refresh"]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "user_login_lockouts",
Expand Down
9 changes: 7 additions & 2 deletions airbyte-integrations/connectors/source-looker/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 00405b19-9768-4e0c-b1ae-9fc2ee2b2a8c
dockerImageTag: 0.2.12
dockerImageTag: 1.0.0
topefolorunso marked this conversation as resolved.
Show resolved Hide resolved
dockerRepository: airbyte/source-looker
githubIssueLabel: source-looker
icon: looker.svg
Expand All @@ -18,10 +18,15 @@ data:
oss:
enabled: true
releaseStage: alpha
releases:
breakingChanges:
1.0.0:
message: Version 1.0.0 introduces changes to the connection configuration which has been upgraded to the API v4.0 from v3.1. Due to this upgrade, certain streams were affected and schemas changed generally.
upgradeDeadline: "2024-08-06"
topefolorunso marked this conversation as resolved.
Show resolved Hide resolved
documentationUrl: https://docs.airbyte.com/integrations/sources/looker
tags:
- language:python
- cdk:python
- cdk:low-code
ab_internal:
sl: 100
ql: 100
Expand Down
Loading
Loading