From 29bb5c0a8afe8947be33c39c9004fe465a47e183 Mon Sep 17 00:00:00 2001 From: Jack Forgash <58153492+forgxyz@users.noreply.github.com> Date: Sat, 2 Aug 2025 10:23:46 -0400 Subject: [PATCH] revise README.md --- README.md | 85 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 71 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 60c764c..94b0780 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,78 @@ -# dbt-replacement +# Analytics Team Workflows +Contains workflows, prompts, and automations for the Analytics Team to use across projects. -Please follow the below steps to do the dbt cloud replacement: -## Step 1: Checkout the branch -`git pull` +## Cursor Rules +The `.cursor/` directory contains rules for directing Cursor when using an LLM to generate models or documentation. The current rules are: +- **dbt-documentation-standards**: Contains general standards for documenting a dbt model, including table-level and column-level requirements. +- **dbt-overview-standards**: Contains guidance on maintaining the `__overview__.md` for a dbt project, including keeping the list of quicklinks up to date and adding a set of XML tags for LLM use. +- **general-coding-standards**: Contains general coding standards for dbt models, including naming conventions, documentation requirements, and code structure. +- **review-dbt-documentation**: A process-based rule for use in reviewing and updating out of date model documentation. Specifically geared towards modernizing a project's documentation for the AI platform. -`git checkout AN-2377-added-schedule-dbt-run-template-github-actions` +## Claude Subagents +Claude subagents are extremely useful for automating tasks and workflows when the process can be easily defined and described. Read more [here](https://docs.anthropic.com/en/docs/claude-code/sub-agents). The defined subagents, at the moment, are: +- **dbt-job-failure-investigator**: This subagent is designed to identify the cause of and suggest solutions to failed github actions workflows. The `gh` cli tool is required for the agent to properly find the failed workflow and read the logs. The `snow` cli tool allows the agent to access Snowflake to read recent query logs and replicate the issue for triage. + - Save this file in `~/.claude/agents/` for global access or simply in the `/.claude/agents/` for use in a specific project. + - Run the agent from the repository root of the target project as that will allow the agent access to read the dbt models to help diagnose the issue. -## Step 2: Created a new temp branch based on main -`git checkout -b tmp-dbt-replacement` +### Snow CLI Quickstart -## Step 3: Checked out the changes -`git checkout AN-2377-added-schedule-dbt-run-template-github-actions .github/workflows` +**1. Install** +```bash +# macOS (Homebrew) +brew tap snowflakedb/snowflake-cli +brew install snowflake-cli -## Step 4: Merged it to main +# Any OS (pipx) +pipx install snowflake-cli +``` -## Step 5: Set up the repository secrets -Go to `Github Repo -> Settings -> Environments`, click create new environment, call it `workflow`, and then type in the repo like this by adding the profiles under the current folder -![environment](./images/environment_screenshot.png) +**2. Add a Connection** +```bash +snow connection add +# follow prompts: account, user, role, warehouse +``` -## Step 6: END \ No newline at end of file +**3. Test Connection** +```bash +snow connection test --connection +``` + +**4. Run SQL** +```bash +snow sql -c -q "SELECT CURRENT_USER();" +``` + +**5. Config Location** +`~/.snowflake/config.toml` + +### GitHub CLI Quickstart + +**1. Install** +```bash +# macOS (Homebrew) +brew install gh + +# Ubuntu/Debian +sudo apt install gh + +# Fedora/RHEL +sudo dnf install gh +``` + +**2. Authenticate** +```bash +gh auth login +# follow prompts: GitHub.com, HTTPS, browser login or token +``` + +**3. Test** +```bash +gh repo view owner/repo +``` + +**4. Common Commands** +```bash +gh repo clone owner/repo +gh pr create +gh issue list +```