writing-sql

Generate dialect-appropriate SQL for Celigo RDBMS export and import operations.

3|2|Updated May 20, 2026
One-click install
npx skills add https://github.com/celigo/ai --skill writing-sql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-sql
Source: https://github.com/celigo/ai/tree/main/skills/writing-sql
Command: npx skills add https://github.com/celigo/ai --skill writing-sql

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing RDBMS export and import SQL for Celigo often fails due to dialect differences, incorrect Handlebars templating, wrong query shapes, or mismatched queryType settings.

Core Features & Use Cases

  • Correct Handlebars SQL templating: uses the required record. prefix and triple braces to prevent broken quoting and numeric corruption.
  • Right query structure per queryType: generates the proper array-of-strings format and aligns INSERT/UPDATE/UPSERT/MERGE patterns to per_record, per_page, bulk_insert, and bulk_load strategies.
  • Database-dialect safe patterns: provides practical syntax guidance across Snowflake, Postgres, MySQL/MariaDB, SQL Server/Azure Synapse, Oracle, BigQuery, and Redshift, including delta and once/mark-as-processed flows.
  • Troubleshooting and guardrails: includes common error causes and a pre-submit checklist for typical runtime and syntax failures.

Quick Start

Use the writing-sql skill to generate an export SELECT query using the correct record. templating and the right delta token for your target database.

Frequently Asked Questions about writing-sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write SQL for Snowflake delta exports using Handlebars templating?

Snowflake delta export SQL requires Handlebars templating with the required record. prefix and triple braces to prevent broken quoting and numeric corruption. This generates correct dialect-appropriate SELECT queries and aligns delta tokens for your target database.

What is the correct query structure for Celigo RDBMS bulk insert and upsert merge operations?

The correct query structure for RDBMS bulk insert and upsert merge operations is an array of strings aligned to the proper queryType setting. This matches INSERT, UPDATE, UPSERT, or MERGE patterns to per_record, per_page, bulk_insert, or bulk_load strategies including custom MERGE behavior.

Does Celigo integration support writing SQL for Postgres, MySQL, and SQL Server?

Celigo integration supports writing database-dialect safe SQL for Postgres, MySQL, MariaDB, SQL Server, and Azure Synapse. It provides practical syntax guidance across these relational databases for export and import operations including delta and once flows.

Why does my RDBMS SQL query fail with mismatched queryType settings in Celigo?

RDBMS SQL queries fail with mismatched queryType settings because query shapes must align with per_record, per_page, bulk_insert, or bulk_load strategies. Incorrect queryType alignment causes runtime and syntax failures during export and import operations.

What's the best way to troubleshoot broken quoting and numeric corruption in SQL generation?

The best way to troubleshoot broken quoting and numeric corruption in SQL generation is to verify Handlebars syntax. You must use triple braces and the record. prefix to prevent template parsing errors and ensure correct SQL generation.

When do I need to use custom MERGE behavior for RDBMS integration imports?

You need custom MERGE behavior for RDBMS integration imports when performing upsert merge strategies. This allows specific UPDATE and INSERT actions during bulk_load operations across major relational databases like Oracle and Redshift.