SnowConvert AI - Redshiftの機能の違い¶
SSC-FDM-RS0001¶
Data storage option is not supported in Snowflake. Data distribution is automatically handled by Snowflake.
説明¶
Snowflakeでは、Snowflakeのアーキテクチャが本質的にデータの分散と最適化を管理するため、Redshiftからの移行時に SORTKEY 、 DISTSTYLE を明示的に定義する必要はありません。Snowflakeはデータパーティショニングとインデックス作成を自動的に処理し、これらのパラメータを手動で設定することなくクエリパフォーマンスを最適化します。
コード例¶
入力コード:¶
Redshift¶
生成されたコード:¶
Snowflake¶
ベストプラクティス¶
頻繁にクエリされる列のデータローカリティを最適化することで、クエリパフォーマンスを改善できる可能性があるため、Redshiftからの移行中にSnowflakeで
CLUSTER BYの使用を評価することをお勧めします。さらにサポートが必要な場合は、 snowconvert-support@snowflake.com までメールでお問い合わせください
SSC-FDM-RS0002¶
The performance of CLUSTER BY in Snowflake may vary compared to the performance of SORTKEY in Redshift.
説明¶
Amazon Redshiftの SORTKEY ( SORTKEY AUTO を除く)は、Snowflakeの CLUSTER BY に類似しています。ただし、RedshiftとSnowflakeのアーキテクチャの違いにより、パフォーマンスへの影響は異なる可能性があります。
SORTKEYは、指定された列に基づくソート順でデータを維持することにより、パフォーマンスを向上させます。これは特にレンジクエリや順序操作に有益です。Snowflakeの
CLUSTER BYは、指定された列に基づいてデータをブロックに整理し、フィルタリングと集計タスクを支援します。しかし、SORTKEYと比べると、オーダーに関してはそれほど厳密ではありません。
これらのメカニズムを理解することは、それぞれのプラットフォームでパフォーマンスを最適化するために極めて重要です。
コード例¶
入力コード:¶
Redshift¶
生成されたコード:¶
Snowflake¶
ベストプラクティス¶
Benchmark after migration: Run representative queries on both platforms to compare performance, as
CLUSTER BYuses micro-partitioning rather than physical sort order.Consider automatic clustering: For large tables with frequent queries on specific columns, enable automatic clustering in Snowflake.
さらにサポートが必要な場合は、 snowconvert-support@snowflake.com までメールでお問い合わせください
SSC-FDM-RS0003¶
Pending SnowConvert AI translation for Redshift foreign key constraints.
説明¶
Pending SnowConvert AI translation for Redshift foreign key constraints. Snowflake supports foreign key constraints, but they are not enforced and serve only as referential integrity metadata. This is a SnowConvert AI limitation, not a Snowflake platform limitation.
コード例¶
入力コード:¶
Redshift¶
生成されたコード:¶
Snowflake¶
ベストプラクティス¶
外部キーを手動で テーブルを変更 して追加することができます。
さらにサポートが必要な場合は、 snowconvert-support@snowflake.com までメールでお問い合わせください
SSC-FDM-RS0004¶
日付が間違っている可能性があり、Snowflakeは間違った日付を受け付けません。
説明¶
Snowflakeでは、 TO_DATE を無効な日付文字列(「20010631」など)で使用するとエラーになります。これは、Snowflakeが厳密な検証を実施し、存在しない日付を拒否するためです。対照的に、 is_strict パラメーターがfalseに設定されている場合、Redshiftの TO_DATE は、そのような無効な日付を最も近い有効な日付に調整することができます(例えば、6月31日を7月1日にローリングします)。この違いは、Snowflakeが無効な日付を自動的に修正しないことでデータの整合性を優先しているのに対して、Redshiftは日付の取り扱いに柔軟性を持たせていることを浮き彫りにしています。
コード例¶
入力コード:¶
Redshift¶
生成されたコード:¶
Snowflake¶
ベストプラクティス¶
TRY_TO_DATE() で日付が有効であることを確認します。
さらにサポートが必要な場合は、 snowconvert-support@snowflake.com までメールでお問い合わせください
SSC-FDM-RS0005¶
Redshift MERGE rejects duplicate source rows. Snowflake allows them, which may produce different results.
説明¶
In Redshift, the MERGE statement throws an error when the source table contains duplicate rows matching the join condition. Snowflake allows MERGE to execute with duplicate source rows, which may produce non-deterministic results when multiple source rows match the same target row.
コード例¶
入力コード:¶
Redshift¶
生成されたコード:¶
Snowflake¶
ベストプラクティス¶
Deduplicate source data: Add a
QUALIFY ROW_NUMBER() OVER (PARTITION BY join_key ORDER BY ...) = 1to the source subquery to ensure each target row matches at most one source row.Validate results: After migration, compare
MERGEoutput row counts between Redshift and Snowflake to detect non-deterministic behavior.さらにサポートが必要な場合は、 snowconvert-support@snowflake.com までメールでお問い合わせください
SSC-FDM-RS0006¶
Called procedure contains usages of COMMIT/ROLLBACK. Modifying the current transaction in child scopes is not supported in Snowflake.
説明¶
Redshiftでは、外部スコープでオープンされたトランザクションの変更を永続化または破棄するために、プロシージャ内でCOMMITおよびROLLBACKステートメントを使用することが許可されています。
Snowflakeは スコープトランザクション の概念で動作し、各プロシージャコールを個別のトランザクションとして扱います。これにより、COMMITとROLLBACKステートメントの効果は、それらが宣言されているプロシージャのスコープに制限されます。
COMMITまたはROLLBACKを持つ手続きへの呼び出しがSnowConvertによって検出された場合、前述の機能差はこのFDMで警告されます。
コード例¶
入力コード:¶
Redshift¶
生成されたコード:¶
Snowflake¶
ベストプラクティス¶
Refactor transaction control: Move
COMMITandROLLBACKstatements into the outermost procedure or use scoped transactions where supported.Use caller's rights: Ensure the calling procedure manages the transaction boundary, as Snowflake's scoped transactions isolate child procedure changes.
さらにサポートが必要な場合は、 snowconvert-support@snowflake.com までメールでお問い合わせください
SSC-FDM-RS0007¶
DDL statements perform an automatic COMMIT in Snowflake. ROLLBACK will not undo DDL-committed changes.
説明¶
Snowflakeでは、 DDLステートメントが実行後に自動コミット を実行し、現在のトランザクションのすべての変更を永続化します。つまり、ROLLBACKによって破棄することはできません。
ROLLBACKステートメントを含むプロシージャにDDLステートメントがあると、SnowConvert AIはDDLオートコミット動作を知らせるためにFDMを生成します。
コード例¶
入力コード:¶
Redshift¶
生成されたコード:¶
Snowflake¶
ベストプラクティス¶
Separate DDL from DML transactions: Move DDL statements outside the transaction block, or execute them before
BEGIN TRANSACTIONto avoid implicit commits affecting DML operations.Use conditional logic: If DDL creation is conditional, check for object existence with
IF NOT EXISTSto avoid unnecessary autocommits.さらにサポートが必要な場合は、 snowconvert-support@snowflake.com までメールでお問い合わせください
SSC-FDM-RS0008¶
Snowflake uses autocommit by default. The NONATOMIC option is not supported in Snowflake.
説明¶
In Redshift, the NONATOMIC option on CREATE PROCEDURE allows individual statements within the procedure to commit independently. In Snowflake, autocommit is the default behavior — each statement is automatically committed unless wrapped in an explicit BEGIN TRANSACTION block. The NONATOMIC keyword is removed during migration because Snowflake's autocommit provides equivalent semantics.
コード例¶
入力コード:¶
Redshift¶
生成されたコード:¶
Snowflake¶
ベストプラクティス¶
Verify transaction behavior: If the original Redshift procedure relied on
NONATOMICfor partial commits, test the migrated Snowflake procedure to confirm that autocommit provides the expected semantics.Add explicit transactions where needed: If you need atomic (all-or-nothing) behavior for a group of statements in Snowflake, wrap them in
BEGIN TRANSACTION...COMMIT.さらにサポートが必要な場合は、 snowconvert-support@snowflake.com までメールでお問い合わせください