diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2f31f1e..9489d27 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,13 +18,13 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.30.0 + rev: 0.31.1 hooks: - id: check-dependabot - id: check-github-workflows - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.6 + rev: v0.9.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] diff --git a/plugins/loaders/target-csv--meltanolabs.lock b/plugins/loaders/target-csv--meltanolabs.lock index d16d134..9fa4b6c 100644 --- a/plugins/loaders/target-csv--meltanolabs.lock +++ b/plugins/loaders/target-csv--meltanolabs.lock @@ -23,7 +23,13 @@ "name": "add_record_metadata", "kind": "boolean", "label": "Add Record Metadata", - "description": "Add metadata to records." + "description": "Whether to add metadata fields to records." + }, + { + "name": "batch_size_rows", + "kind": "integer", + "label": "Batch Size Rows", + "description": "Maximum number of rows in each batch." }, { "name": "datestamp_format", @@ -44,6 +50,18 @@ "label": "Escape Character", "description": "The character to use for escaping special characters." }, + { + "name": "faker_config.locale", + "kind": "array", + "label": "Faker Locale", + "description": "One or more LCID locale strings to produce localized output for: https://faker.readthedocs.io/en/master/#localization" + }, + { + "name": "faker_config.seed", + "kind": "string", + "label": "Faker Seed", + "description": "Value to seed the Faker generator for deterministic output: https://faker.readthedocs.io/en/master/#seeding-the-generator" + }, { "name": "file_naming_scheme", "kind": "string", @@ -54,13 +72,13 @@ { "name": "flattening_enabled", "kind": "boolean", - "label": "Flattening Enabled", + "label": "Enable Schema Flattening", "description": "'True' to enable schema flattening and automatically expand nested properties." }, { "name": "flattening_max_depth", "kind": "integer", - "label": "Flattening Max Depth", + "label": "Max Flattening Depth", "description": "The max depth to flatten schemas." }, { @@ -112,7 +130,7 @@ { "name": "stream_map_config", "kind": "object", - "label": "Stream Map Config", + "label": "User Stream Map Configuration", "description": "User-defined config values to be used within map expressions." }, { @@ -134,6 +152,13 @@ "value": "UTC", "label": "Timestamp Timezone", "description": "The timezone code or name to use when generating `{timestamp}` and `{datestamp}`. Defaults to 'UTC'. For a list of possible values, please see: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" + }, + { + "name": "validate_records", + "kind": "boolean", + "value": true, + "label": "Validate Records", + "description": "Whether to validate the schema of the incoming streams." } ] } diff --git a/tap_planetscaleapi/streams.py b/tap_planetscaleapi/streams.py index 553b4e8..3d9574e 100644 --- a/tap_planetscaleapi/streams.py +++ b/tap_planetscaleapi/streams.py @@ -2,6 +2,7 @@ from __future__ import annotations +import functools import typing as t from tap_planetscaleapi.client import PlanetScaleAPIStream @@ -260,6 +261,13 @@ class PasswordsStream(PlanetScaleAPIStream): "items", ) + @functools.cached_property + def schema(self) -> dict[str, t.Any]: + """Patch the stream schema.""" + schema = super().schema + schema["properties"]["cidrs"]["items"] = {"type": ["string", "null"]} + return schema + class DeployRequestsStream(PlanetScaleAPIStream): """Deploy requests."""