sql-generation
Sintaxe de SQL para Databricks/Unity Catalog (Liquid Clustering com CLUSTER BY), Fabric Synapse (T-SQL), KQL para Eventhouse e tabela de conversão T-SQL→Spark…
Skill by ThomazRossito
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/thomazrossito-sql-generation
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/sql-generation
What's inside
- Skill name
sql-generation- Description
- Sintaxe de SQL para Databricks/Unity Catalog (Liquid Clustering com CLUSTER BY), Fabric Synapse (T-SQL), KQL para Eventhouse e tabela de conversão T-SQL→Spark SQL. Use ao gerar DDL ou queries para qualquer das plataformas suportadas.
- License
- MIT
- Instructions
- 126 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Skill: Geração de SQL para Databricks e Fabric
<!-- type: concept -->
## Spark SQL — Criação de Tabela Delta no Unity Catalog
```sql
-- PADRÃO MODERNO: Liquid Clustering com CLUSTER BY (Databricks 2024+)
-- Substitui PARTITIONED BY + ZORDER BY (padrões depreciados para tabelas Delta gerenciadas)
CREATE TABLE IF NOT EXISTS catalog.schema.tabela_nome (
id STRING NOT NULL COMMENT 'Identificador único',
data_evento DATE COMMENT 'Data do evento',
valor DOUBLE COMMENT 'Valor monetário',
categoria STRING COMMENT 'Categoria do produto',
_ingestion_timestamp TIMESTAMP COMMENT 'Timestamp de ingestão'
)
USING DELTA
CLUSTER BY (data_evento, categoria) -- Liquid Clustering: substitui PARTITIONED BY + ZORDER BY
TBLPROPERTIES (
'delta.autoOptimize.optimizeWrite' = 'true',
'delta.autoOptimize.autoCompact' = 'true'
)
COMMENT 'Tabela de vendas processadas';
```
<!-- type: constraint -->
> **Nota:** `PARTITIONED BY` + `ZORDER BY` são padrões legados. Para tabelas Delta novas no
> Unity Catalog, use sempre `CLUSTER BY` (Liquid Clustering). Oferece melhor performance de
> leitura e elimina a necessidade de definir partições estáticas.
<!-- type: pattern -->
## Spark SQL — OPTIMIZE (com Liquid Clustering)
```sql
-- Com Liquid Clustering, o OPTIMIZE reorganiza os dados automaticamente
-- NÃO use ZORDER BY — o CLUSTER BY já gerencia o layout dos arquivos
OPTIMIZE catalog.schema.tabela_nome;
-- Limpar versões antigas (retenção de 7 dias)
VACUUM catalog.schema.tabela_nome RETAIN 168 HOURS;
```
<!-- type: example -->
## Spark SQL — Adicionar Liquid Clustering a Tabela Existente
```sql
-- Migrar tabela legada (com PARTITION BY / ZORDER) para Liquid Clustering
ALTER TABLE catalog.schema.tabela_nome
CLUSTER BY (data_evento, categoria);
-- Após alterar, executar OPTIMIZE para reorganizar os arquivos existentes
OPTIMIZE catalog.schema.tabela_nome;
```
<!-- type: example -->
## Spark SQL — CTE com Window Function
```sql
WITH ranked AS (
SELECT
id,
categoria,
valor,
data_evento,
ROW_NUMBER() OVER (
PARTITION BY categoria
ORDER BY valor DESC
) AS rn
FROM catalog.schema.tabela_nome
WHERE data_evento >= DATE_SUB(CURRENT_DATE(), 30)
AND valor > 0
)
SELECT
categoria,
id,
valor,
data_evento
FROM ranked
WHERE rn <= 10
ORDER BY categoria, valor DESC;
```
<!-- type: example -->
## KQL — Query Eventhouse (Fabric RTI)
```kql
// Últimas 1 hora de eventos, agregados por minuto
eventos
| where ingestion_time() > ago(1h)
| where status == "success"
| summarize
total = count(),
valor_medio = avg(valor)
by bin(Timestamp, 1m), categoria
| order by Timestamp desc
```
<!-- type: example -->
## T-SQL — Fabric Synapse (Data Warehouse)
```sql
-- Top 10 produtos por receita no último mês
SELECT TOP 10
p.nome_produto,
SUM(v.valor * v.quantidade) AS receita_total,
COUNT(DISTINCT v.id_cliente) AS clientes_unicos
FROM vendas v
INNER JOIN produtos p ON v.id_produto = p.id
WHERE v.data_venda >= DATEADD(MONTH, -1, GETDATE())
GROUP BY p.nome_produto
ORDER BY receita_total DESC;
```
<!-- type: pattern -->
## Conversão T-SQL → Spark SQL
| T-SQL | Spark SQL |
|------------------------------|------------------------------------|
| TOP N | LIMIT N |
| GETDATE() | CURRENT_TIMESTAMP() |From ThomazRossito/data-agents, MIT.
More from ThomazRossito/data-agents
- 0.544score
databricks-execution-compute
ThomazRossito
Execute code and manage compute on Databricks.
SkillCFreshness: C★ 32Claude Code +9 - 0.544score
databricks-spark-declarative-pipelines
ThomazRossito
Creates, configures, and updates Databricks Lakeflow Spark Declarative Pipelines (SDP/LDP) using serverless compute.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-genie
ThomazRossito
Create and query Databricks Genie Spaces for natural language SQL exploration.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-lakebase-autoscale
ThomazRossito
Patterns and best practices for Lakebase Autoscaling (next-gen managed PostgreSQL).
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-vector-search
ThomazRossito
Patterns for Databricks Vector Search: create endpoints and indexes, query with filters, manage embeddings.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-bundles
ThomazRossito
Create and configure Declarative Automation Bundles (formerly Asset Bundles) with best practices for multi-environment deployments (CICD).
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-lakebase-provisioned
ThomazRossito
Patterns and best practices for Lakebase Provisioned (Databricks managed PostgreSQL) for OLTP workloads.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-ai-functions
ThomazRossito
Use Databricks built-in AI Functions (ai_classify, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment…
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-app-python
ThomazRossito
Builds Python-based Databricks applications using Dash, Streamlit, Gradio, Flask, FastAPI, or Reflex.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-jobs
ThomazRossito
Use this skill proactively for ANY Databricks Jobs task - creating, listing, running, updating, or deleting jobs.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-agent-bricks
ThomazRossito
Create and manage Databricks Agent Bricks: Knowledge Assistants (KA) for document Q&A, Genie Spaces for SQL exploration, and Supervisor Agents (MAS) for…
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-lakeflow-connect
ThomazRossito
Patterns and best practices for LakeFlow Connect — Databricks native managed ingestion for streaming data from SaaS applications and databases into Unity…
SkillCFreshness: C★ 32Claude Code +9
Signals
- Stars
- 32
- Forks
- 18
- Open issues
- 0
- Last commit (this folder)
- Apr 30, 2026 (6 months ago)
- Last release
- Apr 18, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ThomazRossito/data-agents
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ThomazRossito
- 0.544score
databricks-spark-declarative-pipelines
ThomazRossito
Creates, configures, and updates Databricks Lakeflow Spark Declarative Pipelines (SDP/LDP) using serverless compute.
SkillCFreshness: C★ 32Claude Code +9 - 0.544score
databricks-execution-compute
ThomazRossito
Execute code and manage compute on Databricks.
SkillCFreshness: C★ 32Claude Code +9 - 0.543score
azure-devops-engineer
ThomazRossito
Playbook operacional do Azure DevOps (Repos, Pipelines, Boards, Artifacts, Test Plans) via MCP oficial microsoft/azure-devops-mcp.
SkillBFreshness: B★ 4Claude Code +9 - 0.539score
databricks-ai-functions
ThomazRossito
Use Databricks built-in AI Functions (ai_classify, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment…
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-bundles
ThomazRossito
Create and configure Declarative Automation Bundles (formerly Asset Bundles) with best practices for multi-environment deployments (CICD).
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-vector-search
ThomazRossito
Patterns for Databricks Vector Search: create endpoints and indexes, query with filters, manage embeddings.
SkillCFreshness: C★ 32Claude Code +9
Cite this page
sql-generation skill. Agent Mart. https://agentmart.dev/skills/thomazrossito-sql-generation (last updated 2026-10-24)