Skip to main content

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​

  1. Select Data platform → Workspace management, then select your workspace.
  2. On the Overview tab, select Create.
  3. In the Create service dialog, select Query engine, then select Create service.

Create service dialog with the Category filter and the service cards, including the Query engine card

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​

  1. Enter a Name.
  2. Enter a Description (optional).
  3. Select a Version.
  4. Select Next Step.

Basic Information screen of the Setup Query Engine form with the Name, Description, and Version fields

FieldDescription
NameRequired. The service name. 1 to 30 characters. Letters, numbers, and hyphens (-).
DescriptionOptional. A description of the service.
VersionRequired. The Query Engine version to run.

Configure nodes​

  1. Select a Storage Policy.
  2. Select a Type.
  3. Enter the Number of Workers.
  4. Turn on worker auto scaling (optional). See Worker auto scaling.
  5. Check the Cache storage (GB), and change it if you need to.
  6. Select Next Step.

Nodes Configuration screen of the Setup Query Engine form with the Storage Policy, Type, Number of coordinator, and Number of Workers fields, the Enable worker auto scaling check box, and the Cache storage field

FieldDescription
Storage PolicyRequired. The storage policy of the nodes.
TypeRequired. 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 coordinatorFixed. 1.
Number of WorkersRequired. 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.

  1. Select Enable worker auto scaling.
  2. Enter Max node.
FieldDescription
Enable worker auto scalingOptional. Turns on auto scaling for the worker nodes.
Max nodeRequired 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.

  1. Check the Max memory (GB), and change it if you need to.
  2. Check the Retry Policy, and change it if you need to.
  3. Set a Custom domain, or clear Custom Domain if you do not need one.
  4. Select Next Step.

Additional properties screen of the Setup Query Engine form with the Max memory (GB) field under Resource Management, the Retry Policy list under Query Management, and the Custom Domain check box

FieldDescription
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 PolicyWhat Query Engine retries when an error occurs. NONE, TASK, or QUERY. Default: NONE.
Retry PolicyDescription
NONETurns off fault-tolerant execution.
TASKRetries only the tasks of a query that fail. Needs an exchange manager.
QUERYRetries 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.

  1. Fill in the fields for your workspace type, as described in the tables below.
  2. 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.

FieldDescription
Custom Domain (field)Required. The domain name of the service.
Certificate nameRequired. A certificate imported on the Certificate tab of the workspace.

Custom Domain section in a Public workspace with the Custom Domain and Certificate name fields and the Manage certificate and Validate buttons

In a Private workspace, you choose HTTPS or HTTP with TLS/SSL certificate.

FieldDescription
Custom Domain (field)Required. The domain name of the service.
TLS/SSL certificateOptional. Select it to serve the service over HTTPS. When it is cleared, the service runs over HTTP and needs no certificate.
Certificate nameRequired with TLS/SSL certificate. A certificate imported on the Certificate tab of the workspace.

Custom Domain section in a Private workspace with the Custom Domain field, the TLS/SSL certificate option, the Certificate name field, and the Manage certificate and Validate buttons

Configure authentication and authorization​

On the Auth screen, choose how users sign in to Query Engine and whether Ranger controls their access.

  1. Select an Authentication Type and fill in its fields. See Authentication type.
  2. Integrate Ranger (optional). See Authorization.
  3. Select Next Step.

Authentication type​

Authentication Type, under Authentication, sets how users sign in to Query Engine. It has no default.

Authentication TypeDescription
BasicQuery Engine uses basic authentication. There are no other fields.
OAuth2Users sign in through an identity provider: FPT ID, Google, or Keycloak.
LDAPQuery Engine authenticates users against your LDAP server.
JWTQuery Engine checks the signature of the JSON Web Tokens (JWT) that users send, with your public key.

Auth screen with Basic selected as Authentication Type under Authentication and the Enable Ranger check box under Authorization

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.

FieldDescription
EmailRequired. The FPT email address of the admin account.
User patternA regular expression, for example (.+)@example\.com.

Authentication section with OAuth2 selected, FPT ID selected as Provider, and the Email and User pattern fields

With Google, enter the Google client and the email of the admin.

FieldDescription
Client IDRequired. The ID of your application, from the OAuth credentials in Google Cloud.
Client SecretRequired. The secret that goes with the client ID and authenticates the application.
EmailRequired. The Gmail or Google Workspace address of the admin who creates the service.
User patternA regular expression, for example (.+)@example\.com.

Authentication section with OAuth2 selected, Google selected as Provider, and the Client ID, Client Secret, Email, and User pattern fields

With Keycloak, enter the details of your Keycloak server and the admin email.

FieldDescription
Auth Provider nameOptional. The name of the provider.
RealmRequired. The Keycloak realm, the space where users, groups, roles, clients, and other objects are managed and secured on their own.
Auth Server URLRequired. The base URL of the Keycloak server, which clients use to authenticate. It must end with a slash (/).
Client IDRequired. The ID that authenticates the client with Keycloak.
Client SecretRequired. The secret that authenticates the client with Keycloak.
EmailRequired. The email address in Keycloak.
User patternA regular expression, for example (.+)@example\.com.

Authentication section with OAuth2 selected, Keycloak selected as Provider, and the Auth Provider name, Realm, Auth Server URL, Client ID, Client Secret, Email, and User pattern fields

With LDAP, fill in the LDAP configuration fields, then select Test connection to check the connection to the LDAP server.

FieldDescription
URLRequired. The address of the LDAP server, for example ldap://ldap.example.com:389 or ldaps://ldap.example.com:636.
BaseRequired. The base DN where queries start, for example dc=example,dc=com.
UsernameRequired. The bind DN of an account that can search the directory, for example cn=admin,dc=example,dc=com.
PasswordRequired. The password of the bind DN.
User bind patternOptional. The DN pattern that finds users, for example uid={0},ou=People,dc=example,dc=com.
Group auth patternRequired. The DN pattern that queries groups, for example cn={0},ou=Groups,dc=example,dc=com.

LDAP configuration section with the URL, Base, Username, Password, User bind pattern, and Group auth pattern fields and the Test connection button

With JWT, fill in the JWT configuration fields.

FieldDescription
IssuerRequired. The iss claim value that the tokens must match.
AudienceOptional. The aud claim value, if your JWT system uses this claim.
Principal fieldRequired. The name of the claim that holds the username, usually sub or email.
Public keyRequired. 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-----.

JWT configuration section with the Issuer, Audience, Principal field, and Public key fields and the upload icon

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:

  1. Select Enable Ranger. The Test connection button appears.
  2. 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.

Authorization section with Enable Ranger selected and the Test connection button

note

When Ranger is integrated, the service details page has no Policies tab. You manage access control in Ranger Admin.

Review and create​

  1. 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.
  2. Select Create.

Review & Create screen of the Setup Query Engine form with the Basic Information, Node Configuration, Cache, Resource Management, Query Management, Custom Domain, Authentication, and Authorization sections and the Create button

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

Next steps​