-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨Source Gutendex: Make Connector Compatible with Builder (#39509)
- Loading branch information
1 parent
b3839e7
commit 19cfb20
Showing
16 changed files
with
247 additions
and
258 deletions.
There are no files selected for viewing
6 changes: 0 additions & 6 deletions
6
airbyte-integrations/connectors/source-gutendex/.dockerignore
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-gutendex/integration_tests/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# Copyright (c) 2024 Airbyte, Inc., all rights reserved. | ||
# |
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-gutendex/integration_tests/acceptance.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
airbyte-integrations/connectors/source-gutendex/requirements.txt
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-gutendex/source_gutendex/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
276 changes: 231 additions & 45 deletions
276
airbyte-integrations/connectors/source-gutendex/source_gutendex/manifest.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,236 @@ | ||
version: "0.29.0" | ||
version: 0.78.1 | ||
|
||
type: DeclarativeSource | ||
|
||
check: | ||
type: CheckStream | ||
stream_names: | ||
- books | ||
|
||
definitions: | ||
selector: | ||
extractor: | ||
field_path: | ||
- results | ||
requester: | ||
url_base: "https://gutendex.com/" | ||
http_method: "GET" | ||
request_parameters: | ||
author_year_start: "{{ config['author_year_start'] }}" | ||
author_year_end: "{{ config['author_year_end'] }}" | ||
copyright: "{{ config['copyright'] }}" | ||
languages: "{{ config['languages'] }}" | ||
search: "{{ config['search'] }}" | ||
sort: "{{ config['sort'] }}" | ||
topic: "{{ config['topic'] }}" | ||
retriever: | ||
record_selector: | ||
$ref: "#/definitions/selector" | ||
paginator: | ||
type: "DefaultPaginator" | ||
pagination_strategy: | ||
type: "PageIncrement" | ||
page_size: 32 | ||
page_token_option: | ||
type: RequestOption | ||
inject_into: "request_parameter" | ||
field_name: "page" | ||
page_size_option: | ||
inject_into: "body_data" | ||
field_name: "page_size" | ||
requester: | ||
$ref: "#/definitions/requester" | ||
base_stream: | ||
retriever: | ||
$ref: "#/definitions/retriever" | ||
books_stream: | ||
$ref: "#/definitions/base_stream" | ||
$parameters: | ||
name: "books" | ||
path: "/books" | ||
streams: | ||
books: | ||
type: DeclarativeStream | ||
name: books | ||
retriever: | ||
type: SimpleRetriever | ||
requester: | ||
$ref: "#/definitions/base_requester" | ||
path: /books | ||
http_method: GET | ||
request_parameters: | ||
author_year_start: "{{ config['author_year_start'] }}" | ||
author_year_end: "{{ config['author_year_end'] }}" | ||
copyright: "{{ config['copyright'] }}" | ||
languages: "{{ config['languages'] }}" | ||
search: "{{ config['search'] }}" | ||
sort: "{{ config['sort'] }}" | ||
topic: "{{ config['topic'] }}" | ||
record_selector: | ||
type: RecordSelector | ||
extractor: | ||
type: DpathExtractor | ||
field_path: | ||
- results | ||
paginator: | ||
type: DefaultPaginator | ||
page_token_option: | ||
type: RequestOption | ||
inject_into: request_parameter | ||
field_name: page | ||
page_size_option: | ||
type: RequestOption | ||
inject_into: body_data | ||
field_name: page_size | ||
pagination_strategy: | ||
type: PageIncrement | ||
page_size: 32 | ||
schema_loader: | ||
type: InlineSchemaLoader | ||
schema: | ||
$ref: "#/schemas/books" | ||
base_requester: | ||
type: HttpRequester | ||
url_base: https://gutendex.com/ | ||
|
||
streams: | ||
- "#/definitions/books_stream" | ||
- $ref: "#/definitions/streams/books" | ||
|
||
check: | ||
stream_names: | ||
- "books" | ||
spec: | ||
type: Spec | ||
connection_specification: | ||
type: object | ||
$schema: http://json-schema.org/draft-07/schema# | ||
required: [] | ||
properties: | ||
author_year_end: | ||
type: string | ||
description: >- | ||
(Optional) Defines the maximum birth year of the authors. Books by | ||
authors born after the end year will not be returned. Supports both | ||
positive (CE) or negative (BCE) integer values | ||
pattern: ^[-]?[0-9]{1,4}$ | ||
examples: | ||
- 2002 | ||
- 500 | ||
- -500 | ||
- 2020 | ||
order: 0 | ||
author_year_start: | ||
type: string | ||
description: >- | ||
(Optional) Defines the minimum birth year of the authors. Books by | ||
authors born prior to the start year will not be returned. Supports | ||
both positive (CE) or negative (BCE) integer values | ||
pattern: ^[-]?[0-9]{1,4}$ | ||
examples: | ||
- 2002 | ||
- 500 | ||
- -500 | ||
- 2020 | ||
order: 1 | ||
copyright: | ||
type: string | ||
description: >- | ||
(Optional) Use this to find books with a certain copyright status - | ||
true for books with existing copyrights, false for books in the public | ||
domain in the USA, or null for books with no available copyright | ||
information. | ||
pattern: ^(true|false|null)$ | ||
examples: | ||
- true | ||
- false | ||
- null | ||
order: 2 | ||
languages: | ||
type: string | ||
description: >- | ||
(Optional) Use this to find books in any of a list of languages. They | ||
must be comma-separated, two-character language codes. | ||
examples: | ||
- en | ||
- en,fr,fi | ||
order: 3 | ||
search: | ||
type: string | ||
description: >- | ||
(Optional) Use this to search author names and book titles with given | ||
words. They must be separated by a space (i.e. %20 in URL-encoded | ||
format) and are case-insensitive. | ||
examples: | ||
- dickens%20great%20expect | ||
- dickens | ||
order: 4 | ||
sort: | ||
type: string | ||
description: >- | ||
(Optional) Use this to sort books - ascending for Project Gutenberg ID | ||
numbers from lowest to highest, descending for IDs highest to lowest, | ||
or popular (the default) for most popular to least popular by number | ||
of downloads. | ||
pattern: ^(ascending|descending|popular)$ | ||
examples: | ||
- ascending | ||
- descending | ||
- popular | ||
order: 5 | ||
topic: | ||
type: string | ||
description: >- | ||
(Optional) Use this to search for a case-insensitive key-phrase in | ||
books' bookshelves or subjects. | ||
examples: | ||
- children | ||
- fantasy | ||
order: 6 | ||
additionalProperties: true | ||
|
||
metadata: | ||
autoImportSchema: | ||
books: false | ||
|
||
schemas: | ||
books: | ||
type: object | ||
$schema: http://json-schema.org/draft-04/schema# | ||
additionalProperties: true | ||
properties: | ||
authors: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
birth_year: | ||
type: | ||
- integer | ||
- "null" | ||
death_year: | ||
type: | ||
- integer | ||
- "null" | ||
name: | ||
type: string | ||
required: | ||
- name | ||
- birth_year | ||
- death_year | ||
bookshelves: | ||
type: array | ||
items: | ||
type: string | ||
copyright: | ||
type: | ||
- boolean | ||
- "null" | ||
download_count: | ||
type: integer | ||
formats: | ||
type: object | ||
properties: | ||
application/epub+zip: | ||
type: string | ||
application/octet-stream: | ||
type: string | ||
application/rdf+xml: | ||
type: string | ||
application/x-mobipocket-ebook: | ||
type: string | ||
image/jpeg: | ||
type: string | ||
text/html: | ||
type: string | ||
text/plain; charset=us-ascii: | ||
type: string | ||
id: | ||
type: integer | ||
languages: | ||
type: array | ||
items: | ||
type: string | ||
media_type: | ||
type: string | ||
subjects: | ||
type: array | ||
items: | ||
type: string | ||
title: | ||
type: string | ||
translators: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
birth_year: | ||
type: | ||
- integer | ||
- "null" | ||
death_year: | ||
type: | ||
- integer | ||
- "null" | ||
name: | ||
type: string | ||
required: | ||
- name | ||
- birth_year | ||
- death_year |
5 changes: 3 additions & 2 deletions
5
airbyte-integrations/connectors/source-gutendex/source_gutendex/run.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
airbyte-integrations/connectors/source-gutendex/source_gutendex/schemas/TODO.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.