Skip to content

Commit d81710a

Browse files
committed
Merge branch 'master' of github.com:elementary-data/elementary into athena-integrations
2 parents 2f034e7 + 60060a1 commit d81710a

File tree

11 files changed

+612
-513
lines changed

11 files changed

+612
-513
lines changed

.github/workflows/close_pylon_issue.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,26 @@ name: Close Pylon Ticket on Issue or Pull Request Closure
33
on:
44
issues:
55
types: [closed]
6-
pull_request:
6+
pull_request_target:
77
types: [closed]
88

99
jobs:
1010
close_pylon_ticket:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Check out the repository
14-
uses: actions/checkout@v2
15-
1613
- name: Extract Pylon Ticket ID
1714
id: extract_ticket_id
1815
run: |
1916
if [[ "${{ github.event_name }}" == 'issues' ]]; then
2017
ISSUE_BODY=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
2118
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}" | jq -r '.body')
2219
pylon_ticket_id=$(echo "$ISSUE_BODY" | grep -oP '(?<=<!-- pylon-ticket-id: )\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b(?= -->)')
23-
elif [[ "${{ github.event_name }}" == 'pull_request' ]]; then
20+
elif [[ "${{ github.event_name }}" =~ ^pull_request ]]; then
2421
PR_BODY=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
2522
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" | jq -r '.body')
2623
pylon_ticket_id=$(echo "$PR_BODY" | grep -oP '(?<=<!-- pylon-ticket-id: )\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b(?= -->)')
2724
fi
28-
echo "::set-output name=pylon_ticket_id::$pylon_ticket_id"
25+
echo "pylon_ticket_id=$pylon_ticket_id" >> "$GITHUB_OUTPUT"
2926
3027
- name: Close Pylon Ticket
3128
if: steps.extract_ticket_id.outputs.pylon_ticket_id != ''

.github/workflows/create_pylon_issue.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ name: Create Pylon Issue
33
on:
44
issues:
55
types: [opened]
6-
pull_request:
6+
pull_request_target:
77
types: [opened]
88

99
jobs:
1010
create_pylon_issue:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Check out the repository
14-
uses: actions/checkout@v2
15-
1613
- name: Install jq
1714
run: sudo apt-get install -y jq
1815

@@ -46,7 +43,7 @@ jobs:
4643
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}"
4744
4845
- name: Create Pylon Issue for Pull Request
49-
if: github.event_name == 'pull_request'
46+
if: contains(github.event_name, 'pull_request')
5047
run: |
5148
response=$(curl --request POST \
5249
--url https://api.usepylon.com/issues \

.github/workflows/test-main-warehouse.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Test main warehouse platform
22
on:
3-
pull_request:
3+
pull_request_target:
44
branches: ["master"]
55
paths:
66
- elementary/**
@@ -13,4 +13,5 @@ jobs:
1313
uses: ./.github/workflows/test-warehouse.yml
1414
with:
1515
warehouse-type: postgres
16+
elementary-ref: ${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.sha) || '' }}
1617
secrets: inherit

.github/workflows/test-warehouse.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ env:
7777
jobs:
7878
test:
7979
runs-on: ubuntu-latest
80+
environment: elementary_test_env # This is a github environment (not to be confused with env vars)
8081
defaults:
8182
run:
8283
working-directory: elementary

docs/_snippets/quickstart-package-install.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Some packages we recommend you check out: [dbt_utils](https://github.com/dbt-lab
3939
```yml packages.yml
4040
packages:
4141
- package: elementary-data/elementary
42-
version: 0.17.0
42+
version: 0.18.0
4343
## Docs: https://docs.elementary-data.com
4444
```
4545
</Step>

elementary/monitor/data_monitoring/report/index.html

Lines changed: 560 additions & 494 deletions
Large diffs are not rendered by default.

elementary/monitor/data_monitoring/schema.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import re
22
from datetime import datetime
33
from enum import Enum
4-
from typing import Any, Generic, List, Optional, Pattern, Tuple, TypeVar
4+
from typing import Any, Generic, Iterable, List, Optional, Pattern, Set, Tuple, TypeVar
55

66
from elementary.utils.log import get_logger
77
from elementary.utils.pydantic_shim import BaseModel, Field, validator
@@ -97,6 +97,20 @@ def apply_filter_on_values(self, values: List[ValueT]) -> bool:
9797
return all(self.apply_filter_on_value(value) for value in values)
9898
raise ValueError(f"Unsupported filter type: {self.type}")
9999

100+
def get_matching_values(self, values: Iterable[ValueT]) -> Set[ValueT]:
101+
values_list = set(values)
102+
matching_values = set(
103+
value for value in values_list if self.apply_filter_on_value(value)
104+
)
105+
if self.type in ANY_OPERATORS:
106+
return matching_values
107+
elif self.type in ALL_OPERATORS:
108+
if len(matching_values) != len(values_list):
109+
return set()
110+
return matching_values
111+
112+
raise ValueError(f"Unsupported filter type: {self.type}")
113+
100114

101115
class StatusFilterSchema(FilterSchema[Status]):
102116
values: List[Status]

elementary/monitor/dbt_project/package-lock.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ packages:
22
- package: dbt-labs/dbt_utils
33
version: 0.8.6
44
- package: elementary-data/elementary
5-
version: 0.17.0
6-
sha1_hash: b63f4a2be6fec35c17f4e41107c8ad47a79b5c65
5+
version: 0.18.0
6+
sha1_hash: 24666e9f3179ea742d9fb6adce8005b9af3fc466

elementary/monitor/dbt_project/packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ packages:
22
- package: dbt-labs/dbt_utils
33
version: [">=0.8.0", "<0.9.0"]
44
- package: elementary-data/elementary
5-
version: 0.17.0
5+
version: 0.18.0
66

77
# NOTE - for unreleased CLI versions we often need to update the package version to a commit hash (please leave this
88
# commented, so it will be easy to access)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "elementary-data"
3-
version = "0.17.0"
3+
version = "0.18.0"
44
description = "Data monitoring and lineage"
55
authors = ["Elementary"]
66
keywords = ["data", "lineage", "data lineage", "data warehouse", "DWH", "observability", "data monitoring", "data observability", "Snowflake", "BigQuery", "Redshift", "data reliability", "analytics engineering"]
@@ -34,7 +34,7 @@ azure-storage-blob = ">=12.11.0"
3434
pymsteams = ">=0.2.2,<1.0.0"
3535
numpy = "<2.0.0"
3636
tabulate = ">= 0.9.0"
37-
pytz = "^2025.1"
37+
pytz = ">= 2025.1"
3838

3939
dbt-snowflake = {version = ">=0.20,<2.0.0", optional = true}
4040
dbt-bigquery = {version = ">=0.20,<2.0.0", optional = true}

0 commit comments

Comments
 (0)