Create a Query Engine service
Create a Query Engine service in your workspace to query data across many sources with Trino. The Setup Query Engine form has five screens: Basic Information, Nodes Configuration, Additional properties, Auth, and Review & Create.
Prerequisites
- A workspace whose Status is Connected. See Create a workspace.
- To integrate Ranger, a Ranger service that is installed and running. See Create a Ranger service.
- For OAuth2, LDAP, or JWT sign-in, the details of your identity provider, LDAP server, or token issuer.
- To use a custom domain, a certificate imported on the Certificate tab of the workspace. See Manage certificates.
Open the create form
- Select Data platform → Workspace management, then select your workspace.
- On the Overview tab, select Create.
- In the Create service dialog, select Query engine, then select Create service.

In a workspace with no services yet, the Overview tab shows Create first service instead. Select the Query engine card there to open the form directly.
The Setup Query Engine form opens on the Basic Information screen.
Enter basic information
- Enter a Name.
- Enter a Description (optional).
- Select a Version.
- Select Next Step.

| Field | Description |
|---|---|
| Name | Required. The service name. 1 to 30 characters. Letters, numbers, and hyphens (-). |
| Description | Optional. A description of the service. |
| Version | Required. The Query Engine version to run. |
Configure nodes
- Select a Storage Policy.
- Select a Type.
- Enter the Number of Workers.
- Turn on worker auto scaling (optional). See Worker auto scaling.
- Check the Cache storage (GB), and change it if you need to.
- Select Next Step.

| Field | Description |
|---|---|
| Storage Policy | Required. The storage policy of the nodes. |
| Type | Required. The node size of the coordinator and the workers, for example Large-16 (4 CPU - 16 GB RAM). Select a Storage Policy first. |
| Number of coordinator | Fixed. 1. |
| Number of Workers | Required. The number of worker nodes. From 1 to 10. |
| Cache storage (GB) | The size of the cache of the service, in GB. From 40 to 2048. Default: 40. |
Worker auto scaling
Auto scaling lets the service add worker nodes automatically, up to the number you set in Max node.
- Select Enable worker auto scaling.
- Enter Max node.
| Field | Description |
|---|---|
| Enable worker auto scaling | Optional. Turns on auto scaling for the worker nodes. |
| Max node | Required with Enable worker auto scaling. Greater than Number of Workers, and at most 10. |
Configure additional properties
On the Additional properties screen, set the memory limit and the retry policy of queries, and set a custom domain if you need one.
- Check the Max memory (GB), and change it if you need to.
- Check the Retry Policy, and change it if you need to.
- Set a Custom domain, or clear Custom Domain if you do not need one.
- Select Next Step.

| Field | Description |
|---|---|
| Max memory (GB) | The most user memory, in GB, that one query can use across the whole cluster. User memory is the memory that the query itself controls, for example for hash tables and sorting. Query Engine stops a query whose user memory on all workers together reaches this limit. From 1 to 1024. Default: 20. |
| Retry Policy | What Query Engine retries when an error occurs. NONE, TASK, or QUERY. Default: NONE. |
| Retry Policy | Description |
|---|---|
| NONE | Turns off fault-tolerant execution. |
| TASK | Retries only the tasks of a query that fail. Needs an exchange manager. |
| QUERY | Retries the whole query. |
Custom domain
A custom domain lets you reach the service at your own domain name. The fields depend on the Type of the workspace: a Public workspace always serves the service over HTTPS, and a Private workspace lets you choose HTTPS or HTTP.
Custom Domain is selected by default. Clear it if you do not need a custom domain.
- Fill in the fields for your workspace type, as described in the tables below.
- Select Validate to check that the certificate is valid for the domain.
Manage certificate, next to Certificate name, opens certificate management, where you can import a certificate that is not in the list yet. See Manage certificates.
In a Public workspace, the form has no TLS/SSL certificate option because HTTPS is always on.
| Field | Description |
|---|---|
| Custom Domain (field) | Required. The domain name of the service. |
| Certificate name | Required. A certificate imported on the Certificate tab of the workspace. |

In a Private workspace, you choose HTTPS or HTTP with TLS/SSL certificate.
| Field | Description |
|---|---|
| Custom Domain (field) | Required. The domain name of the service. |
| TLS/SSL certificate | Optional. Select it to serve the service over HTTPS. When it is cleared, the service runs over HTTP and needs no certificate. |
| Certificate name | Required with TLS/SSL certificate. A certificate imported on the Certificate tab of the workspace. |

Configure authentication and authorization
On the Auth screen, choose how users sign in to Query Engine and whether Ranger controls their access.
- Select an Authentication Type and fill in its fields. See Authentication type.
- Integrate Ranger (optional). See Authorization.
- Select Next Step.
Authentication type
Authentication Type, under Authentication, sets how users sign in to Query Engine. It has no default.
| Authentication Type | Description |
|---|---|
| Basic | Query Engine uses basic authentication. There are no other fields. |
| OAuth2 | Users sign in through an identity provider: FPT ID, Google, or Keycloak. |
| LDAP | Query Engine authenticates users against your LDAP server. |
| JWT | Query Engine checks the signature of the JSON Web Tokens (JWT) that users send, with your public key. |

With OAuth2, select a Provider, then fill in the fields of your provider, as described in the tables below. Every provider has a User pattern field.
With FPT ID, enter the admin account.
| Field | Description |
|---|---|
| Required. The FPT email address of the admin account. | |
| User pattern | A regular expression, for example (.+)@example\.com. |

With Google, enter the Google client and the email of the admin.
| Field | Description |
|---|---|
| Client ID | Required. The ID of your application, from the OAuth credentials in Google Cloud. |
| Client Secret | Required. The secret that goes with the client ID and authenticates the application. |
| Required. The Gmail or Google Workspace address of the admin who creates the service. | |
| User pattern | A regular expression, for example (.+)@example\.com. |

With Keycloak, enter the details of your Keycloak server and the admin email.
| Field | Description |
|---|---|
| Auth Provider name | Optional. The name of the provider. |
| Realm | Required. The Keycloak realm, the space where users, groups, roles, clients, and other objects are managed and secured on their own. |
| Auth Server URL | Required. The base URL of the Keycloak server, which clients use to authenticate. It must end with a slash (/). |
| Client ID | Required. The ID that authenticates the client with Keycloak. |
| Client Secret | Required. The secret that authenticates the client with Keycloak. |
| Required. The email address in Keycloak. | |
| User pattern | A regular expression, for example (.+)@example\.com. |

With LDAP, fill in the LDAP configuration fields, then select Test connection to check the connection to the LDAP server.
| Field | Description |
|---|---|
| URL | Required. The address of the LDAP server, for example ldap://ldap.example.com:389 or ldaps://ldap.example.com:636. |
| Base | Required. The base DN where queries start, for example dc=example,dc=com. |
| Username | Required. The bind DN of an account that can search the directory, for example cn=admin,dc=example,dc=com. |
| Password | Required. The password of the bind DN. |
| User bind pattern | Optional. The DN pattern that finds users, for example uid={0},ou=People,dc=example,dc=com. |
| Group auth pattern | Required. The DN pattern that queries groups, for example cn={0},ou=Groups,dc=example,dc=com. |

With JWT, fill in the JWT configuration fields.
| Field | Description |
|---|---|
| Issuer | Required. The iss claim value that the tokens must match. |
| Audience | Optional. The aud claim value, if your JWT system uses this claim. |
| Principal field | Required. The name of the claim that holds the username, usually sub or email. |
| Public key | Required. The public key in PEM format that Query Engine uses to check the JWT signature. Paste it, or upload the file with the upload icon. Use an RSA or EC key of 2048 bits or more. The PEM must start with -----BEGIN PUBLIC KEY-----. |

Authorization
Under Authorization, choose whether Ranger controls access to Query Engine. The note next to Enable Ranger reminds you that Apache Ranger must be installed and running before you integrate it. See Create a Ranger service.
When Enable Ranger is cleared, Query Engine runs in standard mode and applies no policy from Ranger. You manage access on the Policies tab of the service. See Manage Query Engine policies.
To integrate Ranger:
- Select Enable Ranger. The Test connection button appears.
- Select Test connection to check the connection to Ranger.
Next Step stays unavailable until the connection test succeeds. To succeed, the test needs a Ranger service that is running in the same workspace.

When Ranger is integrated, the service details page has no Policies tab. You manage access control in Ranger Admin.
Review and create
- Check the settings on the Review & Create screen. The node settings appear under Node Configuration, with Coordinator and Workers, and the Ranger integration under Authorization.
- Select Create.

The service is ready when its Status is Healthy. This takes about 10 minutes.