Cloning Queries
Cloning creates a copy of an existing query. It is the quickest way to build a new query from one that already works, and it also moves a query to another group.
When to clone
- You want a variation of an existing report (for example, the same query for a different table or filter).
- You are about to make large changes and want to keep the original intact.
- You want to use a well-tested query as a template for a new one.
- You want to copy or move a query to another group.
Cloning a query
In the queries list, click the Clone button of a query you can edit. The Clone query window asks for:
- Description — the name of the copy, filled in with the original's description. It may not be empty.
- Group — the group the copy goes to. The list holds the groups where you are an editor and whose plan has room for another query; the group you have open is selected. The editors of the selected group get full access to the copy.
- Delete original query? — tick it to move the query: the copy is created in the selected group and the original is deleted.
Click Clone to create the copy. When no group can take another query, the Clone button opens the Packages screen instead.
What gets copied
The clone is an independent query that starts from the original's SQL, form fields and settings. If the original has an unpublished draft, the clone starts from the draft. It also gets:
- the same database connection,
- the links to the snippets the original uses,
- the original's tags (system tags such as
_slow-queryare not copied).
Because it is a separate query, it gets its own:
- share hash — the clone is not shared, and has no share password or expiry, until you set them,
- history, which starts empty: its first version is recorded when a change of its SQL or form fields is saved,
- schedules — set these up anew if needed.
This separation means you can change the clone freely without any risk to the original or to anything that depends on it. When you move a query with Delete original query?, the original is deleted: the copy has a new share hash, so the original's shared link and API endpoint, its schedules and the dashboard tiles that run it stop working.
Cloning vs. drafts
- Use a draft when you want to change the same query safely.
- Use clone when you want a new, separate query based on an existing one.
After cloning, open the new query in the editor to adjust its SQL, then save.