Hey, I searched the support channel but I don't se...
# community-support
j
Hey, I searched the support channel but I don't see others with this same issue. Upgraded to
0.14
yesterday and wanted to try out sending alerts to a Teams channel. I triggered a failure in a dbt job, ran edr monitor and the alert was sent to the Teams channel. Wanted to make a change to the webhook icon and name so I triggered the failure again and then edr monitor again to trigger another alert. However, when running edr monitor again to trigger the next alert, I received the below error. When I check the Github repo, there was a change in the repo to this area of the code 3 weeks ago in this file but it looks like it was just moving the same code from alerts.py to data_monitoring_alerts.py. Are others experiencing this issue?
Copy code
sorted_alerts = self._sort_alerts(
 File " \AppData\Roaming\Python\Python39\site-packages\elementary\monitor\data_monitoring\alerts\data_monitoring_alerts.py", line 101, in _sort_alerts
   suppressed_alerts = self._get_suppressed_alerts(alerts, alerts_last_sent_times)
 File " \AppData\Roaming\Python\Python39\site-packages\elementary\monitor\data_monitoring\alerts\data_monitoring_alerts.py", line 131, in _get_suppressed_alerts
   (current_time_utc - last_sent_time).total_seconds() / 3600
TypeError: can't subtract offset-naive and offset-aware datetimes
e
Hi @Joel Gowman, First of all congrats for being one of the first users to try out Teams alerts 🙂 Looks like this issue is not really related to Teams though, but to the suppression feature, which enables you to suppress identical alerts for a chosen period of time. I will try to recreate the issue locally and keep you posted.
Hi @Joel Gowman, First of all what DWH are you using? And can you please run a query on the alerts_v2 table in your Elementary schema and return the last say, 10 records? specifically the column
sent_at
is what we want to look at. Can you also get a definition of the alerts_v2 table from your DWH info schema and send that over as well? Thanks!
j
Hi Ella, thank you so much for the help with this! 🙂 Snowflake is the dwh. This is a brand new elementary install so there are only 8 records in the alerts_v2 table. Here are the records:
Here's the table definition:
i
Hey @Joel Gowman, chiming in here 🙂 The issue was that we created a new alerts table
alerts_v2
that now defines the
sent_at
column as
timestamp
and not
string
. It seems that your default
timestamp
column is set to be
timestamp_ltz
which convert the dates into your local time zone. I created a fix that handles the case when the
sent_at
column contains a time zone. It will be released in our next release. For now you can change your elementary installation from
0.14.0
to the commit hash:
git+<https://github.com/elementary-data/elementary.git@3194fa9d14a4e202f2c0e28fafdd3488fbf5669d>
🙌 1
Let us know if that fixes the issue for you 🙂
j
Hey @Idan Shavit, I installed edr from the commit hash and that seems to have fixed the issue. Thanks!
🙏 1
n
hi sorry to intrude, but I also had this exact issue, but with BigQuery as the DWH. Installing edr from that commit hash worked to fix the issue for me as well, thank you.
🙏 1
t
Hi Elementary friends, can also report that we are seeing the error with our BigQuery DWH with version
0.14.0
e
Hi @Tim Jungnickel did the fix above work for you?
r
@Ella Katz I set mine as
Copy code
- git: "<https://github.com/elementary-data/elementary.git>"
    revision: 3194fa9d14a4e202f2c0e28fafdd3488fbf5669d
and am getting
Copy code
Runtime Error
  No dbt_project.yml found at expected path /var/folders/2j/dct4xt2j16lcgtnqx4f7hzt40000gn/T/dbt-downloads-erbmcc3a/bf58159aa26ffefe07a885635b85aaad/dbt_project.yml
  Verify that each entry within packages.yml (and their transitive dependencies) contains a file named dbt_project.yml
Is there a different format that works? What you show above with git+https doesn't seem to match any of the dbt packages.yml formats for dbt-core, so I'm not sure how to use that. I tried that for the version but it doesn't accept it.
j
@Renee Cooper, I thought that initially as well but the change to be made isn't on the packages.yml but rather the pip install edr version. I can try to find the exact command I ran if that would be helpful
r
🤦 Thank you Joel! No wonder!
j
So I think
pip install git+<https://github.com/elementary-data/elementary.git@3194fa9d14a4e202f2c0e28fafdd3488fbf5669d>
should work. I feel like maybe I also did a pip uninstall elementary-data first?
thankyou 1
r
Ah yes, so this took me a look up as well since we use a requirements.txt for our Docker container. Ended up looking like:
Copy code
dbt-bigquery==1.7.5
dbt-core==1.7.8
elementary-data @git+<https://github.com/elementary-data/elementary.git@3194fa9d14a4e202f2c0e28fafdd3488fbf5669d>
(as an example of the difference with == vs @
Copy code
Building wheel for elementary-data (pyproject.toml) ... done
  Created wheel for elementary-data: filename=elementary_data-0.14.0-py3-none-any.whl size=760649 sha256=97e2b1b101472db59b5203a1a9cb8fd12c98f163f5014f7916633e25601b45df
  Stored in directory: .../Library/Caches/pip/wheels/3c/3f/d5/47900482c071fee3072578c7b877d62cdd9deb0393717b3649
Successfully built elementary-data
Installing collected packages: elementary-data
Successfully installed elementary-data-0.14.0
j
Awesome! 🙂