mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 11:32:03 +00:00
Update remote.md
Simplifying this example for remoteSecure(): * no reason to be using a ReplicatedMergeTree example here * no reason to be setting index_granularity to a default value
This commit is contained in:
parent
f35faa4b8f
commit
4b0d5a8a96
@ -114,9 +114,8 @@ This example uses one table from a sample dataset. The database is `imdb`, and
|
|||||||
`first_name` String,
|
`first_name` String,
|
||||||
`last_name` String,
|
`last_name` String,
|
||||||
`gender` FixedString(1))
|
`gender` FixedString(1))
|
||||||
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}')
|
ENGINE = MergeTree
|
||||||
ORDER BY (id, first_name, last_name, gender)
|
ORDER BY (id, first_name, last_name, gender);
|
||||||
SETTINGS index_granularity = 8192
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### On the destination ClickHouse system:
|
#### On the destination ClickHouse system:
|
||||||
@ -132,9 +131,8 @@ This example uses one table from a sample dataset. The database is `imdb`, and
|
|||||||
`first_name` String,
|
`first_name` String,
|
||||||
`last_name` String,
|
`last_name` String,
|
||||||
`gender` FixedString(1))
|
`gender` FixedString(1))
|
||||||
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}')
|
ENGINE = MergeTree
|
||||||
ORDER BY (id, first_name, last_name, gender)
|
ORDER BY (id, first_name, last_name, gender);
|
||||||
SETTINGS index_granularity = 8192
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Back on the source deployment:
|
#### Back on the source deployment:
|
||||||
@ -142,7 +140,7 @@ This example uses one table from a sample dataset. The database is `imdb`, and
|
|||||||
Insert into the new database and table created on the remote system. You will need the host, port, username, password, destination database, and destination table.
|
Insert into the new database and table created on the remote system. You will need the host, port, username, password, destination database, and destination table.
|
||||||
```sql
|
```sql
|
||||||
INSERT INTO FUNCTION
|
INSERT INTO FUNCTION
|
||||||
remoteSecure('remote.clickhouse.cloud:9440', 'imdb.actors', 'USER', 'PASSWORD', rand())
|
remoteSecure('remote.clickhouse.cloud:9440', 'imdb.actors', 'USER', 'PASSWORD')
|
||||||
SELECT * from imdb.actors
|
SELECT * from imdb.actors
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user