-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from dqops/1.6.1
1.6.1
- Loading branch information
Showing
213 changed files
with
15,621 additions
and
6,413 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# 1.6.0 | ||
* Fixes to some error sampling templates | ||
* Redesigned data quality check editor to work in a simplified mode | ||
* JDBC drivers are pre-loaded to avoid issues with automatic registration of JDBC drivers by Java | ||
* Delta Lake and Iceberg support | ||
* Global incident screen redesigned to show the counts of incidents | ||
# 1.6.1 | ||
* Incident notification supports emails | ||
* Small bug fixes in the check editor | ||
* Additional check to detect empty columns | ||
* Copying data quality check patterns |
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 +1 @@ | ||
1.6.0 | ||
1.6.1 |
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
114 changes: 114 additions & 0 deletions
114
...dqops/client/api/default_column_check_patterns/copy_from_default_column_checks_pattern.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 |
---|---|---|
@@ -0,0 +1,114 @@ | ||
from http import HTTPStatus | ||
from typing import Any, Dict, Optional, Union | ||
|
||
import httpx | ||
|
||
from ... import errors | ||
from ...client import AuthenticatedClient, Client | ||
from ...types import Response | ||
|
||
|
||
def _get_kwargs( | ||
target_pattern_name: str, | ||
source_pattern_name: str, | ||
) -> Dict[str, Any]: | ||
|
||
pass | ||
|
||
return { | ||
"method": "post", | ||
"url": "api/default/checks/column/{targetPatternName}/copyfrom/{sourcePatternName}".format( | ||
targetPatternName=target_pattern_name, | ||
sourcePatternName=source_pattern_name, | ||
), | ||
} | ||
|
||
|
||
def _parse_response( | ||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response | ||
) -> Optional[Any]: | ||
if response.status_code == HTTPStatus.CREATED: | ||
return None | ||
if client.raise_on_unexpected_status: | ||
raise errors.UnexpectedStatus(response.status_code, response.content) | ||
else: | ||
return None | ||
|
||
|
||
def _build_response( | ||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response | ||
) -> Response[Any]: | ||
return Response( | ||
status_code=HTTPStatus(response.status_code), | ||
content=response.content, | ||
headers=response.headers, | ||
parsed=_parse_response(client=client, response=response), | ||
) | ||
|
||
|
||
def sync_detailed( | ||
target_pattern_name: str, | ||
source_pattern_name: str, | ||
*, | ||
client: AuthenticatedClient, | ||
) -> Response[Any]: | ||
"""copyFromDefaultColumnChecksPattern | ||
Creates (adds) a copy of an existing default column-level checks pattern configuration, under a new | ||
name. | ||
Args: | ||
target_pattern_name (str): | ||
source_pattern_name (str): | ||
Raises: | ||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. | ||
httpx.TimeoutException: If the request takes longer than Client.timeout. | ||
Returns: | ||
Response[Any] | ||
""" | ||
|
||
kwargs = _get_kwargs( | ||
target_pattern_name=target_pattern_name, | ||
source_pattern_name=source_pattern_name, | ||
) | ||
|
||
response = client.get_httpx_client().request( | ||
**kwargs, | ||
) | ||
|
||
return _build_response(client=client, response=response) | ||
|
||
|
||
async def asyncio_detailed( | ||
target_pattern_name: str, | ||
source_pattern_name: str, | ||
*, | ||
client: AuthenticatedClient, | ||
) -> Response[Any]: | ||
"""copyFromDefaultColumnChecksPattern | ||
Creates (adds) a copy of an existing default column-level checks pattern configuration, under a new | ||
name. | ||
Args: | ||
target_pattern_name (str): | ||
source_pattern_name (str): | ||
Raises: | ||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. | ||
httpx.TimeoutException: If the request takes longer than Client.timeout. | ||
Returns: | ||
Response[Any] | ||
""" | ||
|
||
kwargs = _get_kwargs( | ||
target_pattern_name=target_pattern_name, | ||
source_pattern_name=source_pattern_name, | ||
) | ||
|
||
response = await client.get_async_httpx_client().request(**kwargs) | ||
|
||
return _build_response(client=client, response=response) |
114 changes: 114 additions & 0 deletions
114
...n/dqops/client/api/default_table_check_patterns/copy_from_default_table_checks_pattern.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 |
---|---|---|
@@ -0,0 +1,114 @@ | ||
from http import HTTPStatus | ||
from typing import Any, Dict, Optional, Union | ||
|
||
import httpx | ||
|
||
from ... import errors | ||
from ...client import AuthenticatedClient, Client | ||
from ...types import Response | ||
|
||
|
||
def _get_kwargs( | ||
target_pattern_name: str, | ||
source_pattern_name: str, | ||
) -> Dict[str, Any]: | ||
|
||
pass | ||
|
||
return { | ||
"method": "post", | ||
"url": "api/default/checks/table/{targetPatternName}/copyfrom/{sourcePatternName}".format( | ||
targetPatternName=target_pattern_name, | ||
sourcePatternName=source_pattern_name, | ||
), | ||
} | ||
|
||
|
||
def _parse_response( | ||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response | ||
) -> Optional[Any]: | ||
if response.status_code == HTTPStatus.CREATED: | ||
return None | ||
if client.raise_on_unexpected_status: | ||
raise errors.UnexpectedStatus(response.status_code, response.content) | ||
else: | ||
return None | ||
|
||
|
||
def _build_response( | ||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response | ||
) -> Response[Any]: | ||
return Response( | ||
status_code=HTTPStatus(response.status_code), | ||
content=response.content, | ||
headers=response.headers, | ||
parsed=_parse_response(client=client, response=response), | ||
) | ||
|
||
|
||
def sync_detailed( | ||
target_pattern_name: str, | ||
source_pattern_name: str, | ||
*, | ||
client: AuthenticatedClient, | ||
) -> Response[Any]: | ||
"""copyFromDefaultTableChecksPattern | ||
Creates (adds) a copy of an existing default table-level checks pattern configuration, under a new | ||
name. | ||
Args: | ||
target_pattern_name (str): | ||
source_pattern_name (str): | ||
Raises: | ||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. | ||
httpx.TimeoutException: If the request takes longer than Client.timeout. | ||
Returns: | ||
Response[Any] | ||
""" | ||
|
||
kwargs = _get_kwargs( | ||
target_pattern_name=target_pattern_name, | ||
source_pattern_name=source_pattern_name, | ||
) | ||
|
||
response = client.get_httpx_client().request( | ||
**kwargs, | ||
) | ||
|
||
return _build_response(client=client, response=response) | ||
|
||
|
||
async def asyncio_detailed( | ||
target_pattern_name: str, | ||
source_pattern_name: str, | ||
*, | ||
client: AuthenticatedClient, | ||
) -> Response[Any]: | ||
"""copyFromDefaultTableChecksPattern | ||
Creates (adds) a copy of an existing default table-level checks pattern configuration, under a new | ||
name. | ||
Args: | ||
target_pattern_name (str): | ||
source_pattern_name (str): | ||
Raises: | ||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. | ||
httpx.TimeoutException: If the request takes longer than Client.timeout. | ||
Returns: | ||
Response[Any] | ||
""" | ||
|
||
kwargs = _get_kwargs( | ||
target_pattern_name=target_pattern_name, | ||
source_pattern_name=source_pattern_name, | ||
) | ||
|
||
response = await client.get_async_httpx_client().request(**kwargs) | ||
|
||
return _build_response(client=client, response=response) |
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
Oops, something went wrong.