Source
Use the Catalog API to retrieve information about sources and the child objects they contain, as well as to create, update, and delete sources.
Dremio supports a number of different source types. Each source type has the same parameters except for the parameters within the config object. The available parameters in the config object are different for each source type. The examples on this page use an Amazon S3 source to demonstrate the available requests and responses for sources. Read Source Configuration for information about the available parameters in the config object for each supported source type.
{
"entityType": "source",
"config": {
"accessKey": "EXAMPLE78HT89VS4YJEL",
"accessSecret": "$DREMIO_EXISTING_VALUE$",
"secure": true,
"rootPath": "/",
"enableAsync": true,
"compatibilityMode": false,
"isCachingEnabled": true,
"maxCacheSpacePct": 100,
"whitelistedBuckets": [
"archive.dremio.com",
"logs_east-1",
"logs_west-1"
],
"requesterPays": false,
"enableFileStatusCheck": true,
"defaultCtasFormat": "ICEBERG",
"isPartitionInferenceEnabled": false,
"credentialType": "ACCESS_KEY"
},
"id": "2b1be882-7012-4a99-8d6c-82e32e4562e4",
"tag": "T0/Zr1FOY3A=",
"type": "S3",
"name": "AWS-S3_testgroup",
"createdAt": "2023-02-17T14:32:20.640Z",
"metadataPolicy": {
"authTTLMs": 86400000,
"namesRefreshMs": 3600000,
"datasetRefreshAfterMs": 3600000,
"datasetExpireAfterMs": 10800000,
"datasetUpdateMode": "PREFETCH_QUERIED",
"deleteUnavailableDatasets": true,
"autoPromoteDatasets": false
},
"accelerationGracePeriodMs": 10800000,
"accelerationRefreshPeriodMs": 3600000,
"accelerationNeverExpire": false,
"accelerationNeverRefresh": false,
"accelerationActivePolicyType": "NEVER",
"accelerationRefreshSchedule": "",
"children": [
{
"id": "dremio:/AWS-S3_testgroup/archive.dremio.com",
"path": [
"AWS-S3_testgroup",
"archive.dremio.com"
],
"type": "CONTAINER",
"containerType": "FOLDER"
},
{
"id": "dremio:/AWS-S3_testgroup/logs_east-1",
"path": [
"AWS-S3_testgroup",
"logs_east-1"
],
"type": "CONTAINER",
"containerType": "FOLDER"
},
{
"id": "dremio:/AWS-S3_testgroup/logs_west-1",
"path": [
"AWS-S3_testgroup",
"logs_west-1"
],
"type": "CONTAINER",
"containerType": "FOLDER"
}
],
"allowCrossSourceSelection": false,
"disableMetadataValidityCheck": false,
"accessControlList": {
"users": [
{
"id": "ebe519ab-20e3-43ff-9b4c-b3ec590c7e65",
"permissions": [
"VIEW_REFLECTION",
"SELECT"
]
}
],
"roles": [
{
"id": "c45ff4d8-e910-4f85-89db-9b8c29188a56",
"permissions": [
"ALTER",
"CREATE_TABLE",
"DROP",
"INSERT",
"DELETE",
"UPDATE",
"TRUNCATE",
"VIEW_REFLECTION",
"ALTER_REFLECTION",
"MODIFY",
"MANAGE_GRANTS",
"SELECT"
]
}
]
},
"permissions": [
"READ",
"WRITE",
"ALTER_REFLECTION",
"SELECT",
"ALTER",
"VIEW_REFLECTION",
"MODIFY",
"MANAGE_GRANTS",
"CREATE_TABLE",
"DROP",
"EXTERNAL_QUERY",
"INSERT",
"TRUNCATE",
"DELETE",
"UPDATE",
"EXECUTE",
"CREATE_SOURCE",
"ALL"
],
"checkTableAuthorizer": true,
"owner": {
"ownerId": "4fb93af3-acc2-4b10-ad4b-64dd7070d365",
"ownerType": "USER"
},
"accelerationRefreshOnDataChanges": false
}
Source Attributes
entityType String
Type of the catalog object. For sources, the entityType is source.
Example: source
config Object
Configuration settings for the source. The available parameters in the config object are different for different source types. For more information, read Source Configuration.
Example: {"accessKey": "EXAMPLE78HT89VS4YJEL","accessSecret": "$DREMIO_EXISTING_VALUE$","secure": true,"rootPath": "/","enableAsync": true,"compatibilityMode": false,"isCachingEnabled": true,"maxCacheSpacePct": 100,"requesterPays": false,"enableFileStatusCheck": true,"defaultCtasFormat": "ICEBERG","isPartitionInferenceEnabled": false,"credentialType": "ACCESS_KEY"}
id String (UUID)
Unique identifier of the source.
Example: 2b1be882-7012-4a99-8d6c-82e32e4562e4
tag String
Unique identifier of the version of the source. Dremio changes the tag whenever the source changes and uses the tag to ensure that PUT requests apply to the most recent version of the source.
Example: T0/Zr1FOY3A=
type String
Type of source.
Valid values: ADX, AMAZONELASTIC, AWSGLUE, AZURE_STORAGE, BIGQUERY, DB2, DREMIOTODREMIO, DREMIO_CATALOG_EXTERNAL_V1, ELASTIC, GCS, HDFS, HIVE3, HIVE, MONGO, MSSQL, MYSQL, NAS, NESSIE, ORACLE, POSTGRES, REDSHIFT, RESTCATALOG, S3, SAPHANA, SNOWFLAKEOPENCATALOG, SNOWFLAKE, SYNAPSE, TERADATA, UNITY, VERTICA.
The Iceberg RESTCATALOG source type provides support for several catalogs including Apache Polaris OSS, Nessie with Iceberg REST, AWS Glue Iceberg REST, S3 Tables, Confluent Tableflow, and Microsoft OneLake.
Example: S3
name String
Name of the source.
Example: AWS-S3_testgroup
createdAt String
Date and time that the source was created, in UTC format.
Example: 2023-02-17T14:32:20.640Z
metadataPolicy Object
Information about the metadata policy for the source.
Example: {"authTTLMs": 86400000,"namesRefreshMs": 3600000,"datasetRefreshAfterMs": 3600000,"datasetExpireAfterMs": 10800000,"datasetUpdateMode": "PREFETCH_QUERIED","deleteUnavailableDatasets": true,"autoPromoteDatasets": false}
accelerationGracePeriodMs Integer
Maximum age allowed for Reflection data used to accelerate queries on datasets in the source, in milliseconds. Default is 0. For more information, read Setting the Expiration Policy for Reflections.
Example: 10800000
accelerationRefreshPeriodMs Integer
Refresh period for the data in all Reflections on datasets in the source, in milliseconds. Default is 0.
Example: 3600000
accelerationNeverExpire Boolean
Option to set an expiration for Reflections. Default setting is false. Set to true to prevent Reflections from expiring and to override the accelerationGracePeriodMs setting.
Example: false
accelerationNeverRefresh Boolean
Option to set a refresh for Reflections. Default setting is false. Set to true to prevent Reflections from refreshing and to override the accelerationRefreshPeriodMs setting.
accelerationActivePolicyType String
Option to set the policy for refreshing Reflections that are defined on the source. For this option to take effect, accelerationNeverRefresh must be set to false.
The possible values are:
NEVER: The Reflections are never refreshed.PERIOD: The Reflections are refreshed at the end of every period that is defined by accelerationRefreshPeriodMs.SCHEDULE: The Reflections are refreshed according to the schedule that is set by accelerationRefreshSchedule.
accelerationRefreshSchedule String
A cron expression that sets the schedule, in UTC time, according to which the Reflections that are defined on the source are refreshed.
| Field | Allowed Values | Allowed Special Characters |
|---|---|---|
| Second | 0 | N/A |
| Minute | 0-59 | N/A |
| Hour | 0-23 | N/A |
| Day of month | N/A | * ? |
| Month | N/A | * ? |
| Days of week | 1-7 or SUN-SAT | , - * ? |
| Special Character | Description |
|---|---|
| * | Used to specify all values for a field. For Day of month, specifies every day of the month. For Month, specifies every month. For Days of week, specifies every day of the week. |
| ? | Equivalent to *. |
| , | Used to specify two or more days in the Days of week field. For example, MON,WED,FRI. |
| - | Used to specify ranges in the Days of week field. For example, 1-3 is equivalent to Sunday, Monday, and Tuesday. |
Examples:
0 0 0 * * ? : Refreshes every day at midnight.
0 45 15 * * 1,4,7 : Refreshes at 15:45 on Sunday, Wednesday, and Saturday.
0 15 7 ? * 2-6 : Refreshes at 7:15 on Monday and Friday.
children Array of Object
Information about each catalog object in the source.
Example: [{"id": "dremio:/AWS-S3_testgroup/archive.dremio.com","path": ["AWS-S3_testgroup","archive.dremio.com"],"type": "CONTAINER","containerType": "FOLDER"},{"id": "dremio:/AWS-S3_testgroup/logs_east-1","path": ["AWS-S3_testgroup","logs_east-1"],"type": "CONTAINER","containerType": "FOLDER"},{"id": "dremio:/AWS-S3_testgroup/logs_west-1","path": ["AWS-S3_testgroup","logs_west-1"],"type": "CONTAINER","containerType": "FOLDER"}]
allowCrossSourceSelection Boolean
If the source is available for queries that can select from multiple sources, set to true. Otherwise, set to false (default).
Example: false
disableMetadataValidityCheck Boolean
To disable the check for expired metadata and require users to refresh manually, set to true. Otherwise, set to false (default).
The disableMetadataValidityCheck attribute is not supported by default. Contact Dremio Support to enable it.
Example: false
accessControlList Object
Enterprise only. Information about users and roles with access to the source and the specific privileges each user or role has. May include an array of users, an array of roles, or both, depending on the configured access and privileges. The accessControlList array is empty if source-specific access control privileges are not set.
Example: {"users": [{"id": "ebe519ab-20e3-43ff-9b4c-b3ec590c7e65","permissions": ["VIEW_REFLECTION","SELECT" ]}],"roles": [{"id": "c45ff4d8-e910-4f85-89db-9b8c29188a56","permissions": ["ALTER","CREATE_TABLE","DROP","INSERT","DELETE","UPDATE","TRUNCATE","VIEW_REFLECTION","ALTER_REFLECTION","MODIFY","MANAGE_GRANTS","SELECT"]}]}
permissions Array of String
Enterprise-only. List of the privileges that you have on the source. Empty unless the request URL includes the permissions query parameter. For more information, read Privileges.
Example: ["READ","WRITE","ALTER_REFLECTION","SELECT","ALTER","VIEW_REFLECTION","MODIFY","MANAGE_GRANTS","CREATE_TABLE","DROP","EXTERNAL_QUERY","INSERT","TRUNCATE","DELETE","UPDATE","EXECUTE","CREATE_SOURCE","ALL"]
checkTableAuthorizer Boolean
Not used. Has the value true.
Example: true
owner Object
Information about the source's owner.
Example: {"ownerId": "4fb93af3-acc2-4b10-ad4b-64dd7070d365","ownerType": "USER"}
accelerationRefreshOnDataChanges Boolean
If Reflections automatically refresh for underlying tables that are in Iceberg format when new snapshots are created after an update, true. Otherwise, false.
Attributes of the config Object
The config object attributes vary for different source types. Read Source Configuration for information about the available parameters in the config object for each supported source type.
Attributes of the metadataPolicy Object
authTTLMs Integer
Length of time to cache the privileges that the user has on the source, in milliseconds. For example, if authTTLMs is set to 28800000 (8 hours), Dremio checks the user's permission status once every 8 hours. Default is 86400000 (24 hours). Minimum is 60000 (1 minute).
Example: 86400000
namesRefreshMs Integer
How often the source is refreshed, in milliseconds. Default is 3600000 (1 hour). Minimum is 60000 (1 minute).
Example: 3600000
datasetRefreshAfterMs Integer
How often the metadata in the source's datasets is refreshed, in milliseconds. Default is 3600000 (1 hour). Minimum is 60000 (1 minute).
Example: 3600000
datasetExpireAfterMs Integer
Maximum age allowed for the metadata in the source's datasets, in milliseconds. Default is 3600000 (1 hour). Minimum is 60000 (1 minute).
Example: 10800000
datasetUpdateMode String
Approach Dremio uses for updating the metadata when updating datasets in the source.
PREFETCH: (deprecated) Dremio updates details for all datasets in a source.PREFETCH_QUERIED: Dremio updates details for previously queried objects in a source.
Example: PREFETCH_QUERIED
deleteUnavailableDatasets Boolean
If Dremio removes dataset definitions from the source when the underlying data is unavailable, set to true (default). Otherwise, set to false.
Example: true
autoPromoteDatasets Boolean
If Dremio automatically formats files into tables when a user issues a query, set to true. Otherwise, set to false (default). Available only for datalake sources, such as Amazon S3 and Hive.
Example: false
Attributes of Objects in the children Array
id String
Unique identifier of the child catalog object. The ID can be a UUID like 1acab7b3-ee82-44c1-abcc-e86d56078d4d or a text path like dremio:/Samples/samples.dremio.com/zip_lookup.csv.
Example: dremio:/AWS-S3_testgroup/archive.dremio.com
path Array of String
Path to the child catalog object within the source, expressed as an array. The path consists of the source, followed by the name of the folder, file, or dataset itself as the last item in the array.
Example: ["AWS-S3_testgroup","archive.dremio.com"]
type String
Type of the catalog object.
Enum: CONTAINER, FILE, DATASET
Example: CONTAINER
containerType String
For catalog objects with the type CONTAINER, the containerType is FOLDER.
Example: FOLDER
datasetType String
For catalog objects with the type DATASET, the type of dataset. If the dataset is from an external source such as PostgreSQL, the datasetType is DIRECT. For tables, the datasetType is PROMOTED. For views, the datasetType is VIRTUAL.
Enum: DIRECT, PROMOTED, VIRTUAL
Example: VIRTUAL