Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/current/_includes/molt/migration-create-sql-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO crdb_user;
~~~

Depending on the MOLT Fetch [data load mode](#data-load-mode) you will use, grant the necessary privileges to run either [`IMPORT INTO`](#import-into-privileges) or [`COPY FROM`](#copy-from-privileges) on the target tables:
Depending on the MOLT Fetch [data load mode]({% link molt/molt-fetch.md %}#import-into-vs-copy-from) you will use, grant the necessary privileges to run either [`IMPORT INTO`](#import-into-privileges) or [`COPY FROM`](#copy-from-privileges) on the target tables:

#### `IMPORT INTO` privileges

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ Convert the source table definitions into CockroachDB-compatible equivalents. Co
~~~
</section>

- MOLT Fetch can automatically define matching CockroachDB tables using the {% if page.name != "migration-strategy.md" %}[`drop-on-target-and-recreate`](#table-handling-mode){% else %}[`drop-on-target-and-recreate`]({% link molt/molt-fetch.md %}#target-table-handling){% endif %} option.
- MOLT Fetch can automatically define matching CockroachDB tables using the {% if page.name != "migration-strategy.md" %}[`drop-on-target-and-recreate`](#table-handling-mode){% else %}[`drop-on-target-and-recreate`]({% link molt/molt-fetch.md %}#handle-target-tables){% endif %} option.

- If you define the target tables manually, review how MOLT Fetch handles [type mismatches]({% link molt/molt-fetch.md %}#mismatch-handling). You can use the {% if page.name != "migration-strategy.md" %}[MOLT Schema Conversion Tool](#schema-conversion-tool){% else %}[MOLT Schema Conversion Tool]({% link cockroachcloud/migrations-page.md %}){% endif %} to create matching table definitions.

<section class="filter-content" markdown="1" data-scope="oracle">
- By default, table and column names are case-insensitive in MOLT Fetch. If using the [`--case-sensitive`]({% link molt/molt-fetch.md %}#global-flags) flag, schema, table, and column names must match Oracle's default uppercase identifiers. Use quoted names on the target to preserve case. For example, the following CockroachDB SQL statement will error:
- By default, table and column names are case-insensitive in MOLT Fetch. If using the [`--case-sensitive`]({% link molt/molt-fetch-commands-and-flags.md %}#global-flags) flag, schema, table, and column names must match Oracle's default uppercase identifiers. Use quoted names on the target to preserve case. For example, the following CockroachDB SQL statement will error:

~~~ sql
CREATE TABLE co.stores (... store_id ...);
Expand All @@ -57,6 +57,6 @@ Convert the source table definitions into CockroachDB-compatible equivalents. Co
Avoid using sequential keys. To learn more about the performance issues that can result from their use, refer to the [guidance on indexing with sequential keys]({% link {{site.current_cloud_version}}/sql-faqs.md %}#how-do-i-generate-unique-slowly-increasing-sequential-numbers-in-cockroachdb). If a sequential key is necessary in your CockroachDB table, you must create it manually, after using [MOLT Fetch]({% link molt/molt-fetch.md %}) to load and replicate the data.
{{site.data.alerts.end}}

- Review [Transformations]({% link molt/molt-fetch.md %}#transformations) to understand how computed columns and partitioned tables can be mapped to the target, and how target tables can be renamed.
- Review [Transformations]({% link molt/molt-fetch.md %}#define-transformations) to understand how computed columns and partitioned tables can be mapped to the target, and how target tables can be renamed.

- By default on CockroachDB, `INT` is an alias for `INT8`, which creates 64-bit signed integers. PostgreSQL and MySQL default to 32-bit integers. Depending on your source database or application requirements, you may need to change the integer size to `4`. For more information, refer to [Considerations for 64-bit signed integers]({% link {{ site.current_cloud_version }}/int.md %}#considerations-for-64-bit-signed-integers).
4 changes: 2 additions & 2 deletions src/current/_includes/molt/molt-drop-constraints-indexes.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
To optimize data load performance, drop all non-`PRIMARY KEY` [constraints]({% link {{ site.current_cloud_version }}/alter-table.md %}#drop-constraint) and [indexes]({% link {{site.current_cloud_version}}/drop-index.md %}) on the target CockroachDB database before migrating:
{% if page.name == "molt-fetch.md" %}
{% if page.name == "molt-fetch-best-practices.md" %}
- [`FOREIGN KEY`]({% link {{ site.current_cloud_version }}/foreign-key.md %})
- [`UNIQUE`]({% link {{ site.current_cloud_version }}/unique.md %})
- [Secondary indexes]({% link {{ site.current_cloud_version }}/schema-design-indexes.md %})
- [`CHECK`]({% link {{ site.current_cloud_version }}/check.md %})
- [`DEFAULT`]({% link {{ site.current_cloud_version }}/default-value.md %})
- [`NOT NULL`]({% link {{ site.current_cloud_version }}/not-null.md %}) (you do not need to drop this constraint when using `drop-on-target-and-recreate` for [table handling](#target-table-handling))
- [`NOT NULL`]({% link {{ site.current_cloud_version }}/not-null.md %}) (you do not need to drop this constraint when using `drop-on-target-and-recreate` for [table handling]({% link molt/molt-fetch.md %}#handle-target-tables))

{{site.data.alerts.callout_danger}}
Do **not** drop [`PRIMARY KEY`]({% link {{ site.current_cloud_version }}/primary-key.md %}) constraints.
Expand Down
4 changes: 2 additions & 2 deletions src/current/_includes/molt/molt-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- Oracle advises against `LONG RAW` columns and [recommends converting them to `BLOB`](https://www.orafaq.com/wiki/LONG_RAW#History). `LONG RAW` can only store binary values up to 2GB, and only one `LONG RAW` column per table is supported.
</section>

- Only tables with [primary key]({% link {{ site.current_cloud_version }}/primary-key.md %}) types of [`INT`]({% link {{ site.current_cloud_version }}/int.md %}), [`FLOAT`]({% link {{ site.current_cloud_version }}/float.md %}), or [`UUID`]({% link {{ site.current_cloud_version }}/uuid.md %}) can be sharded with [`--export-concurrency`]({% link molt/molt-fetch.md %}#best-practices).
- Only tables with [primary key]({% link {{ site.current_cloud_version }}/primary-key.md %}) types of [`INT`]({% link {{ site.current_cloud_version }}/int.md %}), [`FLOAT`]({% link {{ site.current_cloud_version }}/float.md %}), or [`UUID`]({% link {{ site.current_cloud_version }}/uuid.md %}) can be sharded with [`--export-concurrency`]({% link molt/molt-fetch-best-practices.md %}#configure-the-source-database-and-connection).

{% if page.name != "migrate-bulk-load.md" %}
#### Replicator limitations
Expand All @@ -37,5 +37,5 @@

- Running DDL on the source or target while replication is in progress can cause replication failures.
- `TRUNCATE` operations on the source are not captured. Only `INSERT`, `UPDATE`, `UPSERT`, and `DELETE` events are replicated.
- Changes to virtual columns are not replicated automatically. To migrate these columns, you must define them explicitly with [transformation rules]({% link molt/molt-fetch.md %}#transformations).
- Changes to virtual columns are not replicated automatically. To migrate these columns, you must define them explicitly with [transformation rules]({% link molt/molt-fetch.md %}#define-transformations).
{% endif %}
2 changes: 1 addition & 1 deletion src/current/_includes/molt/molt-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

- Create a CockroachDB [{{ site.data.products.cloud }}]({% link cockroachcloud/create-your-cluster.md %}) or [{{ site.data.products.core }}]({% link {{ site.current_cloud_version }}/install-cockroachdb-mac.md %}) cluster.
- Install the [MOLT (Migrate Off Legacy Technology)]({% link releases/molt.md %}#installation) tools.
- Review the [Fetch]({% link molt/molt-fetch.md %}#best-practices) and {% if page.name != "migrate-bulk-load.md" %}[Replicator]({% link molt/molt-replicator.md %}#best-practices){% endif %} best practices.
- Review the [Fetch]({% link molt/molt-fetch-best-practices.md %}) and {% if page.name != "migrate-bulk-load.md" %}[Replicator]({% link molt/molt-replicator-best-practices.md %}){% endif %} best practices.
- Review [Migration Strategy]({% link molt/migration-strategy.md %}).

<section class="filter-content" markdown="1" data-scope="oracle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
MOLT Fetch transformation rules
</p>
<p class="feature-description">
Column exclusion, computed columns, and partitioned tables are now supported in table migrations with MOLT Fetch. They are supported via a new <a href="https://www.cockroachlabs.com/docs/molt/molt-fetch.html#transformations">transformations framework</a> that allows the user to specify a JSON file with instructions on how MOLT Fetch should treat certain schemas, tables, or underlying columns.
Column exclusion, computed columns, and partitioned tables are now supported in table migrations with MOLT Fetch. They are supported via a new <a href="https://www.cockroachlabs.com/docs/molt/molt-fetch.html#define-transformations">transformations framework</a> that allows the user to specify a JSON file with instructions on how MOLT Fetch should treat certain schemas, tables, or underlying columns.
</p>
</td>
<td>All<sup>&starf;&starf;</sup>
Expand Down
88 changes: 76 additions & 12 deletions src/current/_includes/v23.1/sidebar-data/migrate.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,60 @@
"items": [
{
"title": "Schema Conversion Tool",
"urls": [
"/cockroachcloud/migrations-page.html"
"items": [
{
"title": "Guide",
"urls": [
"/cockroachcloud/migrations-page.html"
]
},
{
"title": "Type Mapping",
"urls": [
"/molt/molt-type-mapping.html"
]
}
]
},
{
"title": "Fetch",
"urls": [
"/molt/molt-fetch.html"
"items": [
{
"title": "Guide",
"urls": [
"/molt/molt-fetch.html"
]
},
{
"title": "Installation",
"urls": [
"/molt/molt-fetch-installation.html"
]
},
{
"title": "Commands and Flags",
"urls": [
"/molt/molt-fetch-commands-and-flags.html"
]
},
{
"title": "Metrics",
"urls": [
"/molt/molt-fetch-monitoring.html"
]
},
{
"title": "Best Practices",
"urls": [
"/molt/molt-fetch-best-practices.html"
]
},
{
"title": "Troubleshooting",
"urls": [
"/molt/molt-fetch-troubleshooting.html"
]
}
]
},
{
Expand All @@ -74,7 +120,13 @@
]
},
{
"title": "Flags",
"title": "Installation",
"urls": [
"/molt/molt-replicator-installation.html"
]
},
{
"title": "Commands and Flags",
"urls": [
"/molt/replicator-flags.html"
]
Expand All @@ -84,6 +136,18 @@
"urls": [
"/molt/replicator-metrics.html"
]
},
{
"title": "Best Practices",
"urls": [
"/molt/molt-replicator-best-practices.html"
]
},
{
"title": "Troubleshooting",
"urls": [
"/molt/molt-replicator-troubleshooting.html"
]
}
]
},
Expand All @@ -99,33 +163,33 @@
"title": "Common Migration Approaches",
"items": [
{
"title": "Classic Bulk Load",
"title": "Classic Bulk Load Migration",
"urls": [
"/molt/migrate-bulk-load.html"
"/molt/migration-approach-classic-bulk-load.html"
]
},
{
"title": "Phased Bulk Load",
"title": "Phased Bulk Load Migration",
"urls": [
"/molt/migrate-bulk-load.html"
"/molt/migration-approach-phased-bulk-load.html"
]
},
{
"title": "Delta Migration",
"urls": [
"/molt/migrate-load-replicate.html"
"/molt/migration-approach-delta.html"
]
},
{
"title": "Streaming Migration",
"urls": [
"/molt/migrate-failback.html"
"/molt/migration-approach-streaming.html"
]
},
{
"title": "Active-Active Migration",
"urls": [
"/molt/migrate-failback.html"
"/molt/migration-approach-active-active.html"
]
}
]
Expand Down
88 changes: 76 additions & 12 deletions src/current/_includes/v23.2/sidebar-data/migrate.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,60 @@
"items": [
{
"title": "Schema Conversion Tool",
"urls": [
"/cockroachcloud/migrations-page.html"
"items": [
{
"title": "Guide",
"urls": [
"/cockroachcloud/migrations-page.html"
]
},
{
"title": "Type Mapping",
"urls": [
"/molt/molt-type-mapping.html"
]
}
]
},
{
"title": "Fetch",
"urls": [
"/molt/molt-fetch.html"
"items": [
{
"title": "Guide",
"urls": [
"/molt/molt-fetch.html"
]
},
{
"title": "Installation",
"urls": [
"/molt/molt-fetch-installation.html"
]
},
{
"title": "Commands and Flags",
"urls": [
"/molt/molt-fetch-commands-and-flags.html"
]
},
{
"title": "Metrics",
"urls": [
"/molt/molt-fetch-monitoring.html"
]
},
{
"title": "Best Practices",
"urls": [
"/molt/molt-fetch-best-practices.html"
]
},
{
"title": "Troubleshooting",
"urls": [
"/molt/molt-fetch-troubleshooting.html"
]
}
]
},
{
Expand All @@ -74,7 +120,13 @@
]
},
{
"title": "Flags",
"title": "Installation",
"urls": [
"/molt/molt-replicator-installation.html"
]
},
{
"title": "Commands and Flags",
"urls": [
"/molt/replicator-flags.html"
]
Expand All @@ -84,6 +136,18 @@
"urls": [
"/molt/replicator-metrics.html"
]
},
{
"title": "Best Practices",
"urls": [
"/molt/molt-replicator-best-practices.html"
]
},
{
"title": "Troubleshooting",
"urls": [
"/molt/molt-replicator-troubleshooting.html"
]
}
]
},
Expand All @@ -99,33 +163,33 @@
"title": "Common Migration Approaches",
"items": [
{
"title": "Classic Bulk Load",
"title": "Classic Bulk Load Migration",
"urls": [
"/molt/migrate-bulk-load.html"
"/molt/migration-approach-classic-bulk-load.html"
]
},
{
"title": "Phased Bulk Load",
"title": "Phased Bulk Load Migration",
"urls": [
"/molt/migrate-bulk-load.html"
"/molt/migration-approach-phased-bulk-load.html"
]
},
{
"title": "Delta Migration",
"urls": [
"/molt/migrate-load-replicate.html"
"/molt/migration-approach-delta.html"
]
},
{
"title": "Streaming Migration",
"urls": [
"/molt/migrate-failback.html"
"/molt/migration-approach-streaming.html"
]
},
{
"title": "Active-Active Migration",
"urls": [
"/molt/migrate-failback.html"
"/molt/migration-approach-active-active.html"
]
}
]
Expand Down
Loading
Loading