Skip to content

Commit fbcb883

Browse files
feat(source-pokeapi): Switch pokemon stream to use InferredSchemaLoader
This commit replaces the InlineSchemaLoader with the new InferredSchemaLoader on the pokemon stream. The InferredSchemaLoader will read 1 sample record at discover time and infer the schema using genson. This demonstrates the end-to-end functionality of the InferredSchemaLoader feature from CDK PR airbytehq/airbyte-python-cdk#831. Expected behavior: - Discover should return a non-empty schema inferred from the sample record - Schema may include nullable unions (e.g., ["string", "null"]) from genson - Read operations should continue to work with the inferred schema Related: airbytehq/airbyte-python-cdk#831 Co-Authored-By: AJ Steers <aj@airbyte.io>
1 parent d177cf7 commit fbcb883

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

airbyte-integrations/connectors/source-pokeapi/manifest.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,19 @@ definitions:
2626
type: DpathExtractor
2727
field_path: []
2828
schema_loader:
29-
type: InlineSchemaLoader
30-
schema:
31-
$ref: "#/schemas/pokemon"
29+
type: InferredSchemaLoader
30+
record_sample_size: 1
31+
retriever:
32+
type: SimpleRetriever
33+
requester:
34+
$ref: "#/definitions/base_requester"
35+
path: /{{config['pokemon_name']}}
36+
http_method: GET
37+
record_selector:
38+
type: RecordSelector
39+
extractor:
40+
type: DpathExtractor
41+
field_path: []
3242
base_requester:
3343
type: HttpRequester
3444
url_base: https://pokeapi.co/api/v2/pokemon

0 commit comments

Comments
 (0)