A query you've perfected is worth sharing. Turn it into a custom view and it appears in the Catalogue as a provider of its own, so your team can query it by name, with parameters, without seeing or copying the SQL behind it. The view designer in the Luminesce Query Editor writes the Sys.Admin.SetupView query that publishes it.
Prerequisites
Access to the Luminesce Query Editor in the LUSID web app, under Data Virtualisation > Query Editor.
Permission to use
Sys.Admin.SetupView, and a licence for it. See Query Editor permissions reference.A query that returns the data the view should return.
Methods
Method 1: Create a view
Put the query in the editor. To use only part of what's in the tab, highlight that part.
Select the view designer on the toolbar:
.png?sv=2026-02-06&spr=https&st=2026-11-24T14%3A43%3A16Z&se=2026-11-24T14%3A56%3A16Z&sr=b&sp=r&sig=drO4dxk0wDi9kcbbmxAzhu%2FrZjAX6CTSRL4eBa0DC%2BM%3D)
You can also select View Designer in the query designer.
Complete the form:
View Name: the name the view has in the Catalogue, such as
Views.Finance.MaturingBonds. It must be unique.Optional Description: shown in the Catalogue, so people know what the view returns.
Documentation Link / Url: an optional link to more information about the view.
Add any parameters the view needs (Method 2).
Check the query at the bottom of the form, then select Generate SQL.
The view designer replaces everything in the tab with the SQL that creates the view. Read the comment at the end, add the macros it suggests (Method 3), then run the query to publish the view.
Select Refresh in the Catalogue to see your view.
For example, to create the Views.MaturityDaysToExpiry example view, you could complete the form like this:
.png?sv=2026-02-06&spr=https&st=2026-11-24T14%3A43%3A16Z&se=2026-11-24T14%3A56%3A16Z&sr=b&sp=r&sig=pJAguZzF1Vh2mRSS3jwVp%2BCEgA9AXMCysaaqgL0xQ8g%3D)
If a view with that name already exists, you're asked whether to carry on. Carrying on replaces it when you run the query.
Method 2: Add parameters
Parameters let the people using your view pass values in, such as a portfolio scope or a date.
Select Create Parameter.
Enter a Parameter name, choose a Data type, and enter an Initial value: the value used while you set the view up.
Turn on Is initial value default to use the initial value whenever someone queries the view without giving one. Leave it off to use it only while setting the view up.
Optionally, enter a Description. It's shown beside the parameter in the Catalogue.
For a Table parameter, enter the name of a table variable in your query as the Initial value, such as @portfolios. Turn on Pass in table of data to require people to pass a table in.
The parameters table shows each one; right-click a row to edit or delete it. The Is Mandatory column shows the setting of Is initial value default or Pass in table of data.
Adding a parameter declares it, but doesn't use it. To use its value in the view, put #PARAMETERVALUE(<name>) in the view's SQL after you generate it, for example where PortfolioScope = #PARAMETERVALUE(Scope). The generated comment shows an example for each parameter.
Method 3: Make the view fast
The view designer wraps your query as it is. For the view to perform well, especially on large providers, add the macros that pass the user's filters, columns and limits through to the providers underneath:
#SELECT_AGG(or#SELECT) and#RESTRICT_AGG(or#RESTRICT) around the columns#GROUP_BY,#ORDER_BY,#DISTINCTand#LIMIT
The comment the designer adds lists them as a reminder. See Writing a Sys.Admin.SetupView query to create your custom view for how to use each one.
Method 4: Change an existing view
Put the view's use Sys.Admin.SetupView … enduse query in the editor, for example by opening it from Sys.File or a Saved Query, then select the view designer. The form opens with the view's name, description, link and parameters filled in. Change them, generate the SQL and run it to publish the change.
Troubleshooting
The form says there was an issue in validating it
If you're creating a new view from an ordinary query, ignore the message and carry on. If you're editing an existing view, the designer couldn't read its use Sys.Admin.SetupView query; select here in the message for the details. A common cause is a missing ---- line between the options and the SQL.
Generate SQL is greyed out
Enter a View Name.
The view ignores a parameter
Add #PARAMETERVALUE(<name>) where the value belongs in the view's SQL (Method 2).