> For the complete documentation index, see [llms.txt](https://docs.datapancake.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datapancake.com/guides/how-to-guides-ui/how-to-deploy-and-validate-generated-code.md).

# How to Deploy & Validate Generated Code

{% hint style="info" %}
Please ensure you have [generated the latest SQL code](/guides/how-to-guides-ui/pipeline-designer/how-to-generate-dynamic-sql-statement-code.md).
{% endhint %}

### Open the Data Source SQL page and select your data source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/6b50e14a-f1f5-40bf-a9bf-1c7186d1b5c5/ascreenshot.jpeg?tl_px=0,33\&br_px=1376,802\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=452,277)

### Click the copy button for the generated code block

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/86d02c01-f5ec-4222-bc23-165e3d452987/ascreenshot.jpeg?tl_px=164,137\&br_px=1541,906\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=985,276)

### Open Workspaces in Snowflake

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/30ce331f-0095-4910-9bb6-41f41baabfab/user_cropped_screenshot.webp?tl_px=0,0\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=208,163)

### In a new SQL file, paste the copied SQL statements

Review the statements carefully before deploying

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/5d90e971-ee9f-47e9-b56a-8bcd6422f85d/user_cropped_screenshot.webp?tl_px=0,0\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=753,87)

### Select the desired database and schema to deploy objects to

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/6d74ad5c-aa33-4c1a-932c-e68c48b942ef/user_cropped_screenshot.webp?tl_px=0,0\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=894,86)

### Run the statements and ensure they complete successfully

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/4b3a9c69-dcb2-4992-8f95-87c106111f23/user_cropped_screenshot.webp?tl_px=0,0\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=439,58)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.datapancake.com/guides/how-to-guides-ui/how-to-deploy-and-validate-generated-code.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
