You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,14 @@ This CLI tool streamlines Cassandra to Spanner schema migration by automating th
7
7
4.**Apply schema to Spanner Database (Optional):** Directly connects to your target Spanner database and applies the generated schema.
8
8
9
9
[Core conecpts](https://cloud.google.com/spanner/docs/non-relational/spanner-for-cassandra-users#core_concepts) you need to know before using this tool:
10
-
* The Cassandra keyspace is mapped directly to the Spanner database. Consequently, each database will only contain a single keyspace, retaining its original name.
10
+
* The concept of a Cassandra keyspace is directly equivalent to a Spanner database. Therefore, when converting the DDL, the target Spanner database serves as the implicit keyspace. Imagine that selecting a Spanner database is akin to having created a keyspace with the same name and then executing a USE statement for it. Any keyspace specified within a CQL statement being translated must be identical to the name of the Spanner database you are actively using.
11
11
12
12
## Note on the DDL Translation
13
13
14
-
* Only `CREATE TABLE` statements are supported.
15
-
* Keyspace name is optional. If it is specified, it should match the database name.
16
-
* Table options in the `CREATE TABLE` statements are not supported.
17
-
* Static columns are not supported.
18
-
* The following data types are not supported: Duration, Tuple, and Frozen
14
+
* Only `CREATE TABLE` statements are supported. Other statements will result in a syntax error.
15
+
* Table options in the `CREATE TABLE` statements are silently ignored.
16
+
* Static columns are not supported (syntax error).
17
+
* The following data types are not supported (syntax error): `Duration`, `Tuple`, and `Frozen`.
19
18
* Mapping of [Cassandra native type](https://cassandra.apache.org/doc/stable/cassandra/cql/types.html#native-types) to [Spanner Type](https://cloud.google.com/spanner/docs/reference/standard-sql/data-types#data_type_list):
20
19
| Cassandra | Spanner |
21
20
| --------- | ---------- |
@@ -99,7 +98,7 @@ go run schema_converter.go \
99
98
-`--instance`: Spanner instance ID.
100
99
-`--database`: Spanner database ID.
101
100
-`--cql`: Path to the CQL file containing DDL statements.
102
-
-`[--dry-run]`: Print the converted DDL statements without applying to the Spanner database. This flag is optional.
101
+
-`[--dry-run]`: Output the converted DDL statements without applying to the Spanner database. This flag is optional.
0 commit comments