Skip to content

Commit 215fed1

Browse files
committed
AUTO: Sync ScalarDB docs in English to docs site repo
1 parent 6bc52d4 commit 215fed1

File tree

2 files changed

+40
-4
lines changed

2 files changed

+40
-4
lines changed

docs/configurations.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This page describes the available configurations for ScalarDB.
77

88
## ScalarDB client configurations
99

10-
ScalarDB provides its own transaction protocol called Consensus Commit. You can use the Consensus Commit protocol directly through the ScalarDB client library or through [ScalarDB Cluster (redirects to the Enterprise docs site)](https://scalardb.scalar-labs.com/docs/latest/scalardb-cluster/), which is a component that is available only in the ScalarDB Enterprise edition.
10+
ScalarDB provides its own transaction protocol called Consensus Commit. You can use the Consensus Commit protocol directly through the ScalarDB client library or through [ScalarDB Cluster (redirects to the Enterprise docs site)](https://scalardb.scalar-labs.com/docs/3.12/scalardb-cluster/), which is a component that is available only in the ScalarDB Enterprise edition.
1111

1212
### Use Consensus Commit directly
1313

@@ -139,9 +139,9 @@ For details about using multiple storages, see [Multi-Storage Transactions](mult
139139

140140
### Use Consensus Commit through ScalarDB Cluster
141141

142-
[ScalarDB Cluster (redirects to the Enterprise docs site)](https://scalardb.scalar-labs.com/docs/latest/scalardb-cluster/) is a component that provides a gRPC interface to ScalarDB.
142+
[ScalarDB Cluster (redirects to the Enterprise docs site)](https://scalardb.scalar-labs.com/docs/3.12/scalardb-cluster/) is a component that provides a gRPC interface to ScalarDB.
143143

144-
For details about client configurations, see the ScalarDB Cluster [client configurations (redirects to the Enterprise docs site)](https://scalardb.scalar-labs.com/docs/latest/scalardb-cluster/developer-guide-for-scalardb-cluster-with-java-api/#client-configurations).
144+
For details about client configurations, see the ScalarDB Cluster [client configurations (redirects to the Enterprise docs site)](https://scalardb.scalar-labs.com/docs/3.12/scalardb-cluster/developer-guide-for-scalardb-cluster-with-java-api/#client-configurations).
145145

146146
## Cross-partition scan configurations
147147

@@ -251,4 +251,4 @@ scalar.db.transaction_manager=cluster
251251
scalar.db.contact_points=indirect:<SCALARDB_CLUSTER_CONTACT_POINT>
252252
```
253253

254-
For details about client configurations, see the ScalarDB Cluster [client configurations (redirects to the Enterprise docs site)](https://scalardb.scalar-labs.com/docs/latest/scalardb-cluster/developer-guide-for-scalardb-cluster-with-java-api/#client-configurations).
254+
For details about client configurations, see the ScalarDB Cluster [client configurations (redirects to the Enterprise docs site)](https://scalardb.scalar-labs.com/docs/3.12/scalardb-cluster/developer-guide-for-scalardb-cluster-with-java-api/#client-configurations).

docs/schema-loader.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ Create/Delete schemas in the storage defined in the config file
7171
--coordinator Create/delete/repair Coordinator tables
7272
-D, --delete-all Delete tables
7373
-f, --schema-file=<schemaFile>
74+
-I, --import Import tables : it will import existing non-ScalarDB
75+
tables to ScalarDB.
7476
Path to the schema json file
7577
--no-backup Disable continuous backup (supported in DynamoDB)
7678
--no-scaling Disable auto-scaling (supported in DynamoDB, Cosmos DB)
@@ -372,6 +374,10 @@ The following database-specific CLI arguments have been deprecated. Please use t
372374

373375
:::
374376

377+
### Import tables
378+
379+
You can import an existing table in JDBC databases to ScalarDB by using the `--import` option and an import-specific schema file. For details, see [Importing Existing Tables to ScalarDB by Using ScalarDB Schema Loader](./schema-loader-import.mdx).
380+
375381
### Sample schema file
376382

377383
The following is a sample schema. For a sample schema file, see [`schema_sample.json`](https://github.com/scalar-labs/scalardb/blob/master/schema-loader/sample/schema_sample.json).
@@ -632,3 +638,33 @@ SchemaLoader.repairTables(properties, serializedSchemaJson, tableReparationOptio
632638
// Delete tables.
633639
SchemaLoader.unload(properties, serializedSchemaJson, deleteCoordinatorTables);
634640
```
641+
642+
### Import tables
643+
644+
You can import an existing JDBC database table to ScalarDB by using the `--import` option and an import-specific schema file, in a similar manner as shown in [Sample schema file](#sample-schema-file). For details, see [Importing Existing Tables to ScalarDB by Using ScalarDB Schema Loader](./schema-loader-import.mdx).
645+
646+
:::warning
647+
648+
You should carefully plan to import a table to ScalarDB in production because it will add transaction metadata columns to your database tables and the ScalarDB metadata tables. In this case, there would also be several differences between your database and ScalarDB, as well as some limitations.
649+
650+
:::
651+
652+
The following is an import sample:
653+
654+
```java
655+
public class SchemaLoaderImportSample {
656+
public static int main(String... args) throws SchemaLoaderException {
657+
Path configFilePath = Paths.get("database.properties");
658+
// "import_sample_schema.json" can be found in the "/sample" directory.
659+
Path schemaFilePath = Paths.get("import_sample_schema.json");
660+
Map<String, String> tableImportOptions = new HashMap<>();
661+
662+
// Import tables.
663+
// You can also use a Properties object instead of configFilePath and a serialized-schema JSON
664+
// string instead of schemaFilePath.
665+
SchemaLoader.importTables(configFilePath, schemaFilePath, tableImportOptions);
666+
667+
return 0;
668+
}
669+
}
670+
```

0 commit comments

Comments
 (0)