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:
Thom O'Connor 2023-06-22 09:30:23 -06:00 committed by GitHub
parent f35faa4b8f
commit 4b0d5a8a96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
``` ```