Was this helpful?
QUERY DATA SOURCE
Valid in: SQL, ESQL, OpenAPI, ODBC, JDBC, .NET
You can access the data source through a table-function call that specifies the resource reference and any per-query options. Multiple data sources, or the same data source with different “reference” values, can be combined in a single query using standard JOIN or subquery syntax.
This statement has the following format:
SELECT column_list
FROM datasource_name
(reference = 'file_name | table_name'
[, option_key = 'value' [, ...]])
[WHERE ...]
datasource_name
(Required) Specifies the name of the data source.
reference
(Required) Specifies the file name or table name depending on the data source type:
For FILE data sources, specifies the file name relative to the location. It has the following parameters:
format
(Required) Specifies the file format. Supported values are CSV, Parquet, JSON, ORC, Avro, and similar. It is required if the referenced file name does not have a known extension.
header
(Only for CSV files) Specifies if the first row is a header row. Valid values are 'true' and 'false'. If no header row is present, column names default to ‘_c0’, ‘_c1’, and so on.
sep
(Only for CSV files) Specifies the field delimiter character. Default value is ‘,’.
comment
(Only for CSV files) Specifies the comment character. Lines that begin with this character are ignored.
For catalog‑based data sources such as ICEBERG_HADOOP, ICEBERG_REST, and DELTA_LAKE, specifies the fully qualified table name in the form “namespace.table”.
For JDBC and ACTIAN_DATASTREAMS data sources, specifies the table name.
Note:  The “reference” value passed to the table-function call is relative to the “location” specified at creation time. Absolute paths or URIs are not supported as reference values.
See CREATE DATA SOURCE Examples topic for examples of using data sources in SELECT queries.
Last modified date: 09/11/2026