Hello Everyone Regarding slack notification - is ...
# community-support
w
Hello Everyone Regarding slack notification - is it possible to pass own title instead of "Monitoring summary" ? W have many dbt projects(~40) and each project has it's own elementary package - then we have one slack channel with elementary notifications. The thing is that all these notifications have exactly the same title and it's not possible to distinguish which report is of which project. Ideally would be great if it would be possible to pass the custom title in
edr send-report
command, like for example
--slack-report-title "Custom Title"
. currently it look like this:
e
Hi @Wojciech, That's a great suggestion! Do you think just adding the name of the elementary schema / dbt project to the title of the summary would also be a good solution here? I can also suggest sending the different summaries to different channels, although not sure it's relevant.
❤️ 1
w
Hi @Ella Katz Thank you for an answer Yeah, I think adding dbt project name to report title would be good enough. Regarding creating separate slack channels is also an option but having 40 additional channels would be not convenient from the slack user perspective.
e
Got it. Would you like to open a GitHub issue about it? You can also try to contribute this if you like 😇
m
Hello, Sorry for hijacking this post but if you are interested in applying an additional string in the title you can use the project name variable (for example the google_project_name for GCP based interactions). My goal was to add a project name for each summary report notification so not exactly the whole scope you are looking for but here are the relevant blocs that you can edit in order to do so (be aware that this is just an attempt at adding this feature and I am sure it can be done more properly) : 1. First you will need to add a string variable
project_name
in
get_slack_message
(file
slack_report_summary_message_builder.py
). In this same file you add the project name into
add_title_to_slack_alert
which governs the title of the notification. Then you go to said method and modify the
create_header_block
2. In
data_monitoring_report.py
you have a method named
send_test_results_summary
there you can add the
project_name
argument with a value of
self.config.google_project_name
which will take the value of the config
project_name
inside
google
block of the
config.yml
file. 3. Finally you will add the
project_name
and voila, the notification contains The Project name that can be different than your warehouse (You will receive something like this) Hope this helped and if anyone has a better solution I am eager to try it. @Hanalytics - Team Data
🙌 2
w
e
Hi @Wojciech! Thanks, will review this week
Hi @Wojciech! added a couple of comments