Skip to content

Add slack analytics project#49

Draft
MajaCernja wants to merge 10 commits into
dbt-labs:mainfrom
MajaCernja:add-slack-analytics-project
Draft

Add slack analytics project#49
MajaCernja wants to merge 10 commits into
dbt-labs:mainfrom
MajaCernja:add-slack-analytics-project

Conversation

@MajaCernja

@MajaCernja MajaCernja commented Nov 17, 2025

Copy link
Copy Markdown

Description

This PR adds slack_analytics dbt project containing a few models and macros for processing message and reactions data accessible via the public Slack API.

It also adds 6 tasks for testing agents based on this projects and fixes two minor issues that surfaced during development.

Sanity checked all tasks pass with the sage agent:
Screenshot 2026-04-26 at 14 58 48

Running the tasks with Claude:
Performance varied a bit across a few different runs. On the most recent ones, Claude sometimes forgot to do a dbt run after generating the solution missing out on valuable error info and it particularly struggled with recreating json parsing / un-nesting functionality.
Screenshot 2026-04-26 at 15 12 08

@bstancil

Copy link
Copy Markdown
Collaborator

hey @MajaCernja , welcome! This would be great to include, if you're got ideas for generating data or for tasks. (I'm also working on generated data for a larger dbt project, so if I end up creating a programmatic way to do that, I can share it with you)

@MajaCernja
MajaCernja force-pushed the add-slack-analytics-project branch 2 times, most recently from 857d890 to 377d772 Compare January 12, 2026 17:42
@MajaCernja
MajaCernja force-pushed the add-slack-analytics-project branch from 377d772 to 3789f37 Compare March 6, 2026 15:46
@MajaCernja
MajaCernja force-pushed the add-slack-analytics-project branch 2 times, most recently from 6585b7b to f592619 Compare April 5, 2026 13:05
@MajaCernja
MajaCernja force-pushed the add-slack-analytics-project branch from a8317cf to cef5db6 Compare April 26, 2026 16:25

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's all that useful to commit this script given it served quite a niche purpose, but maybe it'd be helpful as an example for future mock data generation.

(The rest of the data I generated with an online tool called Mockaroo.)

@MajaCernja
MajaCernja force-pushed the add-slack-analytics-project branch from cef5db6 to a75ec80 Compare April 26, 2026 16:33
Internal analytics project adapted to be ok for open source sharing.
Generates reaction data which was difficult to create well with data mocking online tools.
Removing and recreating fct model from scratch
Remove and recreate custom macro for unnesting json
Introduce a type mismatch bug to be fixed by the agent
Rewrites a column ref in fct for agent to identify correct replacement
When send_blocking_keys raises the builtin TimeoutError (a subclass of OSError) it  gets misclassified as UNKNOWN_AGENT_ERROR instead of a timeout.
DuckDB treats JSON and VARCHAR as incompatible types, so agents that produced correct data but used a different unnesting approach would fail the equality test with a type mismatch error leading to a false negative result.
The setup script inserts a newer extraction of an existing message, the agent must ensure the model does not contain stale duplicate data.
This task requires an agent to create a mart model from scratch to create an overview of messaging + reaction activity.
@MajaCernja
MajaCernja force-pushed the add-slack-analytics-project branch from a75ec80 to 647dec8 Compare April 26, 2026 16:35
@dataders
dataders requested a review from jasonlin45 April 30, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants