This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
CARTO Analytics Toolbox Core is a multi-cloud spatial analytics platform providing UDFs and Stored Procedures for BigQuery, Snowflake, Redshift, Postgres, Databricks, and Oracle. Two parallel systems:
- Gateway (
gateway/): Lambda-based Python functions for Redshift (build, deploy, test viagateway/Makefile) - Clouds (
clouds/{cloud}/): Native SQL UDFs per platform (6 clouds, each withmodules/sql/,modules/test/,libraries/,common/,version)
# Gateway (Redshift-only): setup and build REQUIRED before tests
cd gateway
make venv # First-time setup
make build cloud=redshift && make test-unit cloud=redshift modules=X
# Cloud SQL UDFs
cd clouds/{cloud}
make test modules=X # Run tests
make deploy # Deploy SQL UDFs
# Root: combined gateway + clouds
make deploy cloud=redshift
make create-package cloud=redshift # Create distribution package
make lint cloud=redshift # Lint both gateway + cloudsEnvironment templates: gateway/.env.template, clouds/{cloud}/.env.template.
main: development,stable: production- Release branches:
release/YYYY-MM-DDtargetingstable git merge --strategy ours stablebefore release commits- Version bumps: feat → minor, fix → patch, chore/docs → none
Conventional Commits with scope (<cloud(s)>|<module(s)>).
Cloud codes: bq, sf, rs, pg, db, ora.
feat(rs|quadbin): add quadbin_polyfill function
fix(sf|h3): fix h3_polyfill boundary handling
- Build before testing gateway:
make buildcopies shared libs required by tests - Gateway is Redshift-only: all other clouds use native SQL UDFs exclusively
- Lambda names ≤18 chars: use
lambda_namefield infunction.yaml - Two independent systems: Gateway and Clouds deploy separately but package together
Cloud-specific configuration, gateway architecture, testing, function development, CI/CD, versioning, and extending cloud support are in .claude/rules/. Loaded automatically when working on matching file paths.