# Step 4

<figure><img src="/files/nTnkZXvaSsbTldgnMPp2" alt=""><figcaption></figcaption></figure>

Using the "SQL Set Rewrite Parser" engine, SQL Simulator takes the SQL and rewrites it so that SQL Simulator retrieves only the needed records from production and copies them to the database pod. However if you try to retrieve more data than allowed by the Data Access Control, the records set will not be copied to production

If there are any foreign key tables those tables will get populated automatically by the "SQL Set Rewrite Parser".

{% hint style="danger" %}
If you omit the where clause in your SQL then the entire table will be copied.
{% endhint %}


---

# 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://sql-simulator.tribalknowledge.tech/getting-started/technical-overview/postview-merge/step-4.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.
