This document captures successful interactions testing Copilot's ability to handle SQLcl project-bound workflows.
Related Documentation:
-
VM Configuration Guide — Instructions for setting up test VMs with APEX and ORDS
-
13. Integrating SQLcl Project with GitHub Copilot — Copilot setup and MCP configuration
Initial Setup:
- User is working in branch
feature-1 - Project is configured for schemas
FOOandBAR - Copilot instructions specify MCP server
sqlcl_localand connectionproj_vm - EMP and DEPT tables have been created in the database
User Request:
We created table emp and dept in foo schema, help me to export them to the repo.
Agent Actions:
- Read SQLcl project instructions to understand workflow
- Provided export command:
project export -o DEPT,EMP - Explained the command syncs database object definitions to
src/database/foo/tables/
Result: ✅ Provided correct export command per project workflow.
User Request:
Export emp and dept data in dml files.
Agent Actions:
- Created DML files using
project stage add-customfor both tables:dept_dml.sqlemp_dml.sql
- Queried dept table data (4 rows)
- Queried emp table data (14 rows)
- Populated both DML files with DELETE + INSERT statements following Template 1 (Initial Population)
Result: ✅ Successfully created and populated DML files in dist/releases/next/changes/feature-1/_custom/.
User Request:
Add two employees alex and bob into emp and rerun dml export for emp.
Agent Actions:
- Inserted two new employee records:
- Alex (empno 7935, CLERK, dept 10)
- Bob (empno 7936, CLERK, dept 30)
- Queried updated emp table (now 16 rows)
- Updated
emp_dml.sqlwith all 16 employee records
Result: ✅ Successfully added records and regenerated DML file with updated data.
Setup Change: User completed development on feature-1 and ran project stage to generate DDL changesets.
User Request:
Do table DDL splits.
Agent Actions:
- Found 4 table changeset files in
dist/releases/next/changes/feature-1/ - Processed each file sequentially (one at a time):
- Moved
sqlcl_snapshotcomment to line 2 - Removed original single changeset header
- Added numbered changeset headers (
.1,.2, etc.) for each DDL statement - Applied proper blank line formatting
- Moved
- Split files:
emp.sql(2 changesets),dept.sql(2 changesets),t.sql(1 changeset),q.sql(1 changeset)
Result: ✅ Successfully split all table changesets following Workflow 3 rules.
Setup Change: User merged feature-1 into main and created new branch feature-2 to continue development.
User Request:
Add a field icon to dept table and populate it with Font Awesome icons that make sense for the department, after that give me a command to export dept table and generate the DML file.
Agent Actions:
- Connected to
proj_vmdatabase (project-specific connection) - Executed
ALTER TABLE foo.dept ADD (icon VARCHAR2(50)) - Populated icon values with appropriate Font Awesome icons:
- ACCOUNTING (deptno 10) →
fa-calculator - RESEARCH (deptno 20) →
fa-flask - SALES (deptno 30) →
fa-shopping-cart - OPERATIONS (deptno 40) →
fa-cogs
- ACCOUNTING (deptno 10) →
- Created incremental DML file using
project stage add-custom -file-name dept_icon_updates.sql - Populated
dist/releases/next/changes/feature-2/_custom/dept_icon_updates.sqlwith UPDATE statements - Provided export command:
project export -o DEPT
Result: ✅ Successfully added column, populated data, created DML file, and provided correct export command.