mirror of
https://github.com/FlipsideCrypto/analytics-workflow-templates.git
synced 2026-02-06 11:17:52 +00:00
revise README.md
This commit is contained in:
parent
6e8e876be6
commit
29bb5c0a8a
85
README.md
85
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 `<project>/.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
|
||||

|
||||
**2. Add a Connection**
|
||||
```bash
|
||||
snow connection add
|
||||
# follow prompts: account, user, role, warehouse
|
||||
```
|
||||
|
||||
## Step 6: END
|
||||
**3. Test Connection**
|
||||
```bash
|
||||
snow connection test --connection <name>
|
||||
```
|
||||
|
||||
**4. Run SQL**
|
||||
```bash
|
||||
snow sql -c <name> -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
|
||||
```
|
||||
|
||||
Loading…
Reference in New Issue
Block a user