2019-09-03 14:23:51 +00:00
# HDFS {#table_engines-hdfs}
2019-09-04 13:24:41 +00:00
This engine provides integration with [Apache Hadoop ](https://en.wikipedia.org/wiki/Apache_Hadoop ) ecosystem by allowing to manage data on [HDFS ](https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsDesign.htmll )via ClickHouse. This engine is similar
2019-09-04 13:25:07 +00:00
to the [File ](file.md ) and [URL ](url.md ) engines, but provides Hadoop-specific features.
2019-09-03 14:23:51 +00:00
## Usage
```
ENGINE = HDFS(URI, format)
```
2019-09-04 19:55:56 +00:00
The `URI` parameter is the whole file URI in HDFS.
2019-09-03 14:23:51 +00:00
The `format` parameter specifies one of the available file formats. To perform
`SELECT` queries, the format must be supported for input, and to perform
`INSERT` queries -- for output. The available formats are listed in the
[Formats ](../../interfaces/formats.md#formats ) section.
**Example:**
2019-09-04 13:26:52 +00:00
**1.** Set up the `hdfs_engine_table` table:
2019-09-03 14:23:51 +00:00
``` sql
CREATE TABLE hdfs_engine_table (name String, value UInt32) ENGINE=HDFS('hdfs://hdfs1:9000/other_storage', 'TSV')
```
2019-09-04 19:55:56 +00:00
**2.** Fill file:
``` sql
INSERT INTO hdfs_engine_table VALUES ('one', 1), ('two', 2), ('three', 3)
```
**3.** Query the data:
2019-09-03 14:23:51 +00:00
``` sql
SELECT * FROM hdfs_engine_table LIMIT 2
```
```
┌─name─┬─value─┐
│ one │ 1 │
│ two │ 2 │
└──────┴───────┘
```
2019-09-04 13:26:03 +00:00
## Implementation Details
2019-09-03 14:23:51 +00:00
- Reads and writes can be parallel
- Not supported:
- `ALTER` and `SELECT...SAMPLE` operations.
- Indexes.
- Replication.
[Original article ](https://clickhouse.yandex/docs/en/operations/table_engines/hdfs/ ) <!--hide-->