On this page

    Snowflake

    Snowflake is a cloud data warehouse.

    Prerequisite

    • Ensure that your Dremio cluster is at version 23.1 or later.

    Configuring Snowflake as a Source

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

    General Options

    1. In the Name field, specify the name by which you want the Snowflake source to appear in the Databases section.
    2. Under Connection, follow these steps:
      1. In the Host field, specify the account URL of the Snowflake source in the format https://LOCATOR_ID.snowflakecomputing.com.
      2. In the Database field, specify the default database to use (optional).
      3. In the Role field, specify the default access-control role to use (optional).
      4. In the Schema field, specify the default schema to use (optional).
      5. In the Warehouse field, specify the warehouse that will provide resources for executing DML statements and queries (optional).
    3. Under Authentication, specify the username and password for Dremio to use when connecting to the Snowflake source.

    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.

    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 Snowflake Source

    To edit a Snowflake 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.
    3. In the Edit Source dialog, you cannot edit the name. Editing other parameters is optional. For parameters and advanced options, see Configuring Snowflake as a Source.
    4. Click Save.

    Removing a Snowflake Source

    To remove a Snowflake 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.

    warning:

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

    Upgrading from Dremio Hub’s Community Snowflake Plugin

    warning:

    Removing a Snowflake source will drop all tables in the source. If you have any reflections configured on tables or table-level ACLs (customized privileges) in your Snowflake sources, copy the details of those items before you remove any sources. After upgrading and re-adding your sources, you will need to recreate those reflections and ACLs.

    Views are not affected by removing and re-adding Snowflake sources, provided the sources are re-added with the same names.

    note:

    The community Snowflake plugin from Dremio Hub is not compatible with Dremio version 23.0 and later. You should use Dremio version 23.1 or later if you have Snowflake sources because it comes with an official Snowflake plugin.

    If you are upgrading an older version of Dremio to version 23.1 or later, you must do the following:

    1. Note the details of any reflections and ACLs configured on tables in Snowflake sources.

    2. Remove your Snowflake sources from Dremio.

    3. Remove the community Snowflake plugin and the existing Snowflake JDBC driver.

    4. Upgrade Dremio to version 23.1 or later.

    5. Add your Snowflake sources to Dremio with the same names.

    6. Recreate any table-level reflections and ACLs on your Snowflake sources.

    Predicate Pushdowns

    These operations and functions are performed by Snowflake warehouses:

    OperatorsOperatorsOperatorsOperators
    ||, AND, ORCOUNT_STARIS DISTINCT FROMREVERSE
    =,+, -, /, *DATE_ADDIS NOT DISTINCT FROMRIGHT
    <=, <, >, >=, =, <>, !=IS NOT NULLROUND
    ABSDATE_SUBIS NULLRPAD
    AVGDATE_TRUNCLEFTRTRIM
    BETWEENDATE_TRUNC_DAYLENGTHSIGN
    CASEDATE_TRUNC_HOURLIKESQRT
    CASTDATE_TRUNC_MINUTELOCATESTDDEV
    CEILDATE_TRUNC_MONTHLOWERSTDDEV_POP
    CEILINGDATE_TRUNC_QUARTERLPADSTDDEV_SAMP
    CHARACTER_LENGTHDATE_TRUNC_WEEKLTRIMSUBSTR
    CHAR_LENGTHDATE_TRUNC_YEARMAXSUBSTRING
    COALESCEDAYOFMONTHMINSUM
    CONCATDAYOFWEEKMODTO_CHAR
    COUNTDAYOFYEARNOTTO_DATE
    COUNT_DISTINCTEXTRACTPERCENT_RANKTRIM
    COUNT_DISTINCT_MULTIFLOORPOSITIONTRUNC
    COUNT_FUNCTIONSILIKEREGEXP_LIKETRUNCATE
    COUNT_MULTIINREPLACEUPPER