# How to Create Schema Drift Alerts (Script Builder)

{% hint style="warning" %}
Please ensure the [Admin Guides](https://docs.datapancake.com/guides/how-to-guides-script-builder/admin-guides) have been completed and at least one [data source](https://docs.datapancake.com/guides/how-to-guides-script-builder/alert-guides/broken-reference) is connected before creating schema drift alerts.
{% endhint %}

### 1. Navigate to the "Alert" script builder

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-19/cd52db23-d02e-41ed-adf8-771e225408cc/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,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=71,445)

### 2. (Optional) Change the app database name

The default is DATAPANCAKE

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/24218b5c-82e1-4939-991f-f40a1b2eddb8/ascreenshot.jpeg?tl_px=0,68\&br_px=2698,1575\&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=476,276)

### 3. Enter the role used to install DataPancake

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/8b789a8a-139b-41ce-9e76-d7666d67e675/ascreenshot.jpeg?tl_px=0,228\&br_px=2698,1735\&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=482,277)

### 4. Enter the name of the Snowflake database used to store the alert

{% hint style="info" %}
If the name is case sensitive, put the name in double quotes such as `"EXAMPLE_NAME"`
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/5d6f496c-8290-4ed2-8e32-32887dd8d61b/ascreenshot.jpeg?tl_px=0,402\&br_px=2698,1909\&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=492,276)

### 5. Enter the name of the schema used to store the alert

{% hint style="info" %}
If the name is case sensitive, put the name in double quotes such as `"EXAMPLE_NAME"`
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/98dc4976-e999-4f73-9c28-4df1c0700432/ascreenshot.jpeg?tl_px=0,420\&br_px=2698,1928\&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=475,341)

### 6. Enter the name of the Warehouse used to store the alert

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/4f6528b6-3890-4cc2-aa70-9bfb69c5607c/ascreenshot.jpeg?tl_px=0,64\&br_px=2698,1571\&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=810,277)

### 7. Select the Interval Type

Choose the interval type for data to be analyzed and determine if an alert should be sent.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/b39b55b6-0631-46b9-bfa2-98a12f932dde/ascreenshot.jpeg?tl_px=0,236\&br_px=2698,1743\&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=838,276)

### 8. Enter the Interval Quantity

Choose the interval quantity for data to be analyzed and determine if an alert should be sent.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/bd7c1b16-70bd-4202-aab8-0fe999a0e941/ascreenshot.jpeg?tl_px=0,404\&br_px=2698,1911\&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=793,276)

### 9. Enter the comma separated email addresses that should receive the alerts

{% hint style="info" %}
The email addresses must be verified by Snowflake to receive emails. Email verification can be initiated through the user's "My Profile" settings in Snowflake. Click 'Resend verification email' if needed.

![](https://201309747-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkX4nSXGvrFIEggg2Drr1%2Fuploads%2FpSx7Rkh3gSZRPGqmNzL3%2Fimage.png?alt=media\&token=d2e3992b-8992-48b8-987d-6e499d55f7c7)
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/32cd5041-9fb5-43cb-95f2-c4800bb0bcde/ascreenshot.jpeg?tl_px=0,420\&br_px=2698,1928\&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=783,338)

### 10. (Option 1) Click "Generate Alert Script (Free)"

The free version will send an email notification informing of a schema change to one or more data sources including the name of the data source only.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/054ee7b9-5c91-455a-9d59-f30d986547ae/ascreenshot.jpeg?tl_px=0,420\&br_px=2698,1928\&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=469,428)

### 11. (Option 2) Click "Generate Alert Script (Paid)"

The paid version will send an email notification informing of a schema change to one or more data sources including the details of the schema changes.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/b61e04c3-3051-42ba-b474-1f73c999514a/ascreenshot.jpeg?tl_px=0,372\&br_px=2698,1879\&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=455,276)

### 12. Copy the script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/c6ee9c28-4924-40fa-afbb-2f5c154b2687/ascreenshot.jpeg?tl_px=0,420\&br_px=2698,1928\&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=991,306)

### 13. Open a new Snowflake SQL file and paste the script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/2f5ac057-d541-4719-aa83-b11076f80c65/ascreenshot.jpeg?tl_px=0,14\&br_px=2698,1521\&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=878,276)

### 14. Review & Execute the script

Use the blue dropdown arrow at the top right and click "Run All"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/3cab1d13-d350-433a-b4a1-961654ca921b/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&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=1005,73)

### 15. Ensure successful execution by examining the call result

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/c7322af1-a3f4-49d3-b698-59d13e9565b7/ascreenshot.jpeg?tl_px=0,140\&br_px=2698,1647\&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=512,276)

### 16. Alert Management

SQL statements have been provided to:

* Manually execute the alert
* Start and stop the alert scheduling.
* View alert execution history

<figure><img src="https://201309747-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkX4nSXGvrFIEggg2Drr1%2Fuploads%2Fj1kBmOuFlpVhBqjWzP1Y%2Fimage.png?alt=media&#x26;token=7c4205d8-3046-4428-952a-48f3202476bb" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datapancake.com/guides/how-to-guides-script-builder/alert-guides/how-to-create-schema-drift-alerts-script-builder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
