Skip to main content
Version: 24.3.x

Connecting to Another Dremio Software Cluster

You can add a Dremio Software cluster as a data source. Such a cluster is referred to as a data-source cluster. The Dremio cluster that you add it to is referred to as a querying cluster.

caution

Only Dremio Software can serve as a data-source cluster. Using Dremio Cloud as a data-source cluster is not supported.

A data-source cluster gives a querying cluster access to one or more data sources, such as Amazon S3, Hive, and Postgres, that are connected to the data-source cluster. Dremio treats the connected Dremio cluster as any other supported data source. The data sources that are connected to the data-source cluster are represented as schemas. From a querying cluster, you can drill down into the schemas to see source datasets. You can then promote source datasets to tables, create reflections and views on those tables, and views on the views, and so on.

Example

In this diagram, there are two Dremio Software clusters: Dremio_1 and Dremio_2. Suppose that you wanted to access DataSource_2 from Dremio_1. To do so, you would add Dremio_2 as a data source to Dremio_1. In fact, you could add any number of Dremio Software clusters as data sources.

Connecting one Dremio Software cluster to another

In the UI for Dremio_1, Dremio_2 is listed under Sources > Databases. If you were to select Dremio_2 there, you would see the folder DataSource_2. Double-clicking that folder would show a list of the folders or schemas in that data source.

An administrator can promote a table on a data source connected through a data-source cluster, just as it is possible to do on data source that is directly connected to a querying cluster. For example, an administrator promotes table DataSource_1.Table_1 from DataSource_1.Source_1 on the data source directly connected to Dremio_1, and also promotes table Dremio_2.DataSource_2.Table_2 from DataSource_2.Source_2 via the data-source cluster.

Connecting to a data source directly and through a Dremio Software cluster

The administrator can then use the tables as any other table, by querying them, creating views on them, and creating reflections on them.

If Dremio_1 were connected to two Dremio clusters, the administrator could promote tables on both. Then, business users could run queries and view reports that federated data across the two data-source clusters.

Queries can federate data that is in two or more clusters.

And while business users run queries through the querying-cluster, other business users can continue running queries directly through a data-source cluster.

Business users can still query data-source clusters directly.
caution
  • Ensure that the Dremio instance that you connect to does not itself connect to your original Dremio instance. For example, if Dremio_1 connects to Dremio_2 as a data source, ensure that Dremio_2 does not connect to Dremio_1 as a data source.
Avoid recursive loops.
  • Querying across more than one region or more than one cloud vendor might increase query latency. Querying across cloud vendors also might result in egress charges from cloud vendors. For example, in this diagram DataSource_1 is using one cloud vendor, while DataSource_2 is using a different cloud vendor. Queries from Dremio_1 across Dremio_2 and Dremio_3 against those two data sources might incur egress charges from the cloud vendors.
Federating data across cloud vendors can incur egress charges.
note

Recommendation: Configure full TLS wire encryption on querying clusters and data-source clusters. See Full Wire Encryption

User Impersonation

When you connect a querying cluster to a data-source cluster, you provide the username and password of an account on the data-source cluster. By default, queries that run from the querying cluster against the data-source cluster run under the username of that account.

You can instead allow users running queries from the querying cluster to run them under their own usernames on the data-source cluster. For example, User 1 on the querying cluster Dremio 1 can run queries as User 1 on the data-source cluster. User 1 must have an account on the data-source cluster, and that account must use the same username. User impersonation (also known as inbound impersonation) must be set up on the data-source cluster. The policy for user impersonation would look like this:

Example policy
ALTER SYSTEM SET "exec.impersonation.inbound_policies"='[
{
"proxy_principals":{
"users":[
"User 1"
]
},
"target_principals":{
"users":[
"User 1"
]
}
}
]'

See Inbound Impersonation for more information.

Limitation

You cannot query columns that use complex data types, such as LIST, STRUCT, and MAP. Columns of complex data types do not appear in result sets.

Prerequisites

  • You must have a username and password for the account on a data-source cluster to use for connections from the querying cluster.
  • The querying cluster and data-source clusters must all be at version 23.1 or later.

Configuring Another Dremio Software Cluster as a Source

note

If the cluster that you are connecting to has a self-signed certificate, ensure that the cluster that you are connecting from has a copy of that certificate in its truststore.

  1. In the bottom-left corner of the Datasets page, click Add Source.
  2. Under Databases in the Add Data Source dialog, select Dremio.

General Options

  1. In the Name field, specify the name by which you want the data-source cluster to appear in the Databases section.
  2. Under Connection, specify how you want to connect to the data-source cluster.
    • Direct: Connect directly to a coordinator node of the cluster.
    • ZooKeeper: Connect to an external ZooKeeper instance that is coordinating the nodes of the cluster.
  3. In the Host and Port field, specify the hostname or IP address, and the port number, of the coordinator node or ZooKeeper instance.
  4. If the data-source cluster is configured to use TLS for connections to it, select the Use SSL option.
  5. Under Authentication, specify the username and password for the querying cluster to use when connecting to the data-source cluster.

Advanced Options

On the Advanced Options page, you can set values for these non-required options:

OptionDescription
Maximum Idle ConnectionsThe total number of connections allowed to be idle at a given time. The default maximum idle connections is 8.
Connection Idle TimeThe amount of time (in seconds) allowed for a connection to remain idle before the connection is terminated. The default connection idle time is 60 seconds.
Query TimeoutThe amount of time (in seconds) allowed to wait for the results of a query. If this time expires, the connection being used is returned to an idle state.
User ImpersonationAllows users to run queries on the data-source cluster under their own user IDs, not the user ID for the account used to authenticate with the data-source cluster. Inbound impersonation must be configured on the data-source cluster. See Inbound Impersonation.

Reflection Refresh Options

On the Reflection Refresh page, set the policy that controls how often reflections are scheduled to be refreshed automatically, as well as the time limit after which reflections expire and are removed.

OptionDescription
Never refreshSelect to prevent automatic reflection refresh, default is to automatically refresh.
Refresh everyHow often to refresh reflections, specified in hours, days or weeks. This option is ignored if Never refresh is selected.
Never expireSelect to prevent reflections from expiring, default is to automatically expire after the time limit below.
Expire afterThe time limit after which reflections expire and are removed from Dremio, specified in hours, days or weeks. This option is ignored if Never expire is selected.

Metadata Options

On the Metadata page, you can configure settings to refresh metadata and handle datasets.

Dataset Handling

These are the optional Dataset Handling parameters.

ParameterDescription
Remove dataset definitions if underlying data is unavailableBy default, Dremio removes dataset definitions if underlying data is unavailable. Useful when files are temporarily deleted and added back in the same location with new sets of files.

Metadata Refresh

These are the optional Metadata Refresh parameters:

  • Dataset Discovery: The refresh interval for fetching top-level source object names such as databases and tables. Set the time interval using this parameter.

    ParameterDescription
    (Optional) Fetch everyYou can choose to set the frequency to fetch object names in minutes, hours, days, or weeks. The default frequency to fetch object names is 1 hour.
  • Dataset Details: The metadata that Dremio needs for query planning such as information required for fields, types, shards, statistics, and locality. These are the parameters to fetch the dataset information.

    ParameterDescription
    Fetch modeYou can choose to fetch only from queried datasets that are set by default. Dremio updates details for previously queried objects in a source. Fetching from all datasets is deprecated.
    Fetch everyYou can choose to set the frequency to fetch dataset details in minutes, hours, days, or weeks. The default frequency to fetch dataset details is 1 hour.
    Expire afterYou can choose to set the expiry time of dataset details in minutes, hours, days, or weeks. The default expiry time of dataset details is 3 hours.

Privileges

On the Privileges page, you can grant privileges to specific users or roles. See Access Controls for additional information about user privileges.

  1. (Optional) For Privileges, enter the user name or role name that you want to grant access to and click the Add to Privileges button. The added user or role is displayed in the Users table.
  2. (Optional) For the users or roles in the Users table, toggle the green checkmark for each privilege you want to grant on the Dremio source that is being created.
  3. Click Save after setting the configuration.

Editing a Dremio Source

To edit a Dremio source:

  1. In the Datasets UI, click External Sources at the bottom-left of the page. A list of sources is displayed.
  2. Under the Action column, click the Settings (gear) icon for the source you want to edit. From the list of actions, click Edit Details.

Alternatively, you can click the source and click the Settings (gear) icon of the source.

  1. In the Edit Source dialog, you cannot edit the name. Editing other parameters is optional. For parameters and advanced options, see Configuring Another Dremio Software Cluster as a Source.
  2. Click Save.

Removing a Dremio Source

To remove a Dremio source, perform these steps:

  1. In the Datasets UI, click External Sources at the bottom-left of the page. A list of sources is displayed.

  2. Under the Action column, click the Settings (gear) icon for the source that you want to remove.

  3. From the list of actions, click Remove Source. Confirm that you want to remove the source.

caution

Removing a source causes all downstream views dependent on objects in this source to break.

Predicate Pushdowns

Querying clusters offload these operations to data-source clusters. Data-source clusters either process these operations or offload them to their connected data sources.

&&, ||, !, AND, OR
+, -, /, *, %
<=, <, >, >=, =, <>, !=
ABS
ADD_MONTHS
AVG
BETWEEN
CASE
CAST
CEIL
CEILING
CHARACTER_LENGTH
CHAR_LENGTH
COALESCE
CONCAT
CONTAINS
COUNT
COUNT_DISTINCT
COUNT_DISTINCT_MULTI
COUNT_FUNCTIONS
COUNT_MULTI
COUNT_STAR
CURRENT_DATE
CURRENT_TIMESTAMP
DATE_ADD
DATE_DIFF
DATE_SUB
DATE_TRUNC
DATE_TRUNC_DAY
DATE_TRUNC_HOUR
DATE_TRUNC_MINUTE
DATE_TRUNC_MONTH
DATE_TRUNC_QUARTER
DATE_TRUNC_WEEK
DATE_TRUNC_YEAR
DAYOFMONTH
DAYOFWEEK
DAYOFYEAR
EXTRACT
FLATTEN
FLOOR
ILIKE
IN
IS DISTINCT FROM
IS NOT DISTINCT FROM
IS NOT NULL
IS NULL
LAST_DAY
LCASE
LEFT
LENGTH
LIKE
LOCATE
LOWER
LPAD
LTRIM
MAX
MEDIAN
MIN
MOD
NEXT_DAY
NOT
NVL
PERCENTILE_CONT
PERCENTILE_DISC
PERCENT_RANK
POSITION
REGEXP_LIKE
REPLACE
REVERSE
RIGHT
ROUND
RPAD
RTRIM
SIGN
SQRT
STDDEV
STDDEV_POP
STDDEV_SAMP
SUBSTR
SUBSTRING
SUM
TO_CHAR
TO_DATE
TRIM
TRUNC
TRUNCATE
UCASE
UPPER
VAR_POP
VAR_SAMP

ZooKeeper