Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Failed rows config WIP#2318

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
m1n0 wants to merge27 commits intov4
base:v4
Choose a base branch
Loading
fromv4-failedrows-config
Open
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
27 commits
Select commitHold shift + click to select a range
bd1e649
failed rows wip
tombaeyensJun 6, 2025
f37e783
Failed rows wip
tombaeyensJun 6, 2025
b097f27
failed rows wip
tombaeyensJun 9, 2025
a286dbc
Fixed extension mechanism
tombaeyensJun 11, 2025
8b47953
Failed rows wip
tombaeyensJun 12, 2025
1f5ca20
Implement proper status handling for both local and remote contract v…
nielsnJun 6, 2025
2351523
Add dotenv to deps (#2305)
m1n0Jun 9, 2025
9b99876
Fix diagnostics, support date-like in freshness (#2307)
m1n0Jun 10, 2025
6744f3d
Bump contract json schema (#2308)
m1n0Jun 10, 2025
2ced0a8
Fix freshness if no data, handle corner cases better (#2309)
m1n0Jun 10, 2025
b919b45
Use question mark char for not_evaluated (#2310)
m1n0Jun 10, 2025
83d75ac
DTL-807: Floor the current freshness in seconds so it returns an `int…
nielsnJun 12, 2025
587ab8c
V4 datatime2 (#2311)
tombaeyensJun 16, 2025
100dd75
Default check names (#2317)
tombaeyensJun 16, 2025
2e31e46
failed rows wip
tombaeyensJun 16, 2025
f9e5fff
Failed rows extension wip
tombaeyensJun 17, 2025
11b2eb8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot]Jun 17, 2025
ad9134e
Failed rows wip
tombaeyensJun 17, 2025
eeb99e6
Failed rows keys wip
tombaeyensJun 18, 2025
c5e4877
Failed rows keys wip
tombaeyensJun 18, 2025
460a483
Failed rows wip
tombaeyensJun 19, 2025
d1d78f6
failed rows wip
tombaeyensJun 19, 2025
920778a
Failed rows wip
tombaeyensJun 20, 2025
8560ca6
Added diagnostics check results table
tombaeyensJun 21, 2025
7971d23
Merge branch 'v4' into v4-failedrowsext
tombaeyensJun 23, 2025
a23444b
Failed rows config WIP
m1n0Jun 23, 2025
2e94aac
Failed rows config WIP
m1n0Jun 23, 2025
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
PrevPrevious commit
NextNext commit
Failed rows config WIP
  • Loading branch information
@m1n0
m1n0 committedJun 23, 2025
commita23444bc90fefc6da04a05dd5048f2add71dba96
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
import abc
from typing import Literal
from typing import Literal, Optional

from pydantic import BaseModel, Field
from soda_core.model.data_source.data_source_connection_properties import (
DataSourceConnectionProperties,
)
from soda_core.model.failed_rows import FailedRowsConfigDatasource


class DataSourceBase(
Expand All@@ -20,6 +21,7 @@ class DataSourceBase(
connection_properties: DataSourceConnectionProperties = Field(
..., alias="connection", description="Data source connection details"
)
failed_rows: Optional[FailedRowsConfigDatasource] = Field(..., description="Configuration for failed rows storage")

@classmethod
def get_class_type(cls) -> str:
Expand Down
79 changes: 79 additions & 0 deletionssoda-core/src/soda_core/model/failed_rows.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
import abc
from enum import Enum
from typing import Optional

from pydantic import BaseModel, Field

DEFAULT_SCHEMA = "failed_rows"


class FailedRowsStrategy(str, Enum):
"""Enum for failed rows strategy"""

NONE = "none"
STORE_DIAGNOSTICS = "store_diagnostics"
STORE_KEYS = "store_keys"
STORE_DATA = "store_data"


class FailedRowsConfigBase(
BaseModel,
abc.ABC,
frozen=True,
extra="forbid",
validate_by_name=True, # Allow to use both field names and aliases when populating from dict
):
enabled: Optional[bool] = Field(
None,
description="Enable or disable the storage of failed rows. " "If set to false, failed rows will not be stored.",
)


class FailedRowsConfigOrganisation(FailedRowsConfigBase):
"""Top-level configuration for failed rows, used on Soda Cloud."""

# Overrides the `enabled` field on other levels as Cloud config will return a bool always.
enabled: bool = Field(
...,
description="Enable or disable the storage of failed rows. " "If set to false, failed rows will not be stored.",
)

path_default: Optional[str] = Field(
"{{ data_source.database }}/{DEFAULT_SCHEMA}", # TODO: revisit
description="Path to the warehouse location where failed rows will be stored. ",
)
enabled_by_default: bool = Field(
True,
description="Enable or disable the storage of failed rows by default. Does not override the `enabled` setting if `enabled` is set to false."
"If set to false, failed rows will not be stored unless explicitly enabled in the contract or check.",
)
strategy_default: FailedRowsStrategy = Field(
FailedRowsStrategy.STORE_DIAGNOSTICS, description="Default strategy for storing failed rows."
)


class FailedRowsConfigDatasource(FailedRowsConfigBase):
"""Top-level configuration for failed rows, on data source level."""

path: Optional[str] = Field(..., description="Path to the warehouse location where failed rows will be stored.")
enabled_by_default: Optional[bool] = Field(
True,
description="Enable or disable the storage of failed rows by default. Does not override the `enabled` setting if `enabled` is set to false."
"If set to false, failed rows will not be stored unless explicitly enabled in the contract or check.",
)
strategy_default: Optional[FailedRowsStrategy] = Field(
FailedRowsStrategy.STORE_DIAGNOSTICS, description="Default strategy for storing failed rows."
)


class FailedRowsConfigContract(FailedRowsConfigBase):
"""Configuration for failed rows at the contract level."""

path: Optional[str] = Field(..., description="Path to the warehouse location where failed rows will be stored.")
strategy: Optional[FailedRowsStrategy] = Field(..., description="Strategy for storing failed rows.")


class FailedRowsConfigCheck(FailedRowsConfigBase):
"""Configuration for failed rows at the check level."""

strategy: Optional[FailedRowsStrategy] = Field(..., description="Strategy for storing failed rows.")
Loading

[8]ページ先頭

©2009-2025 Movatter.jp