Skip to main content
Question

SQL SERVER Views to Create Snowflake Views

  • June 11, 2023
  • 1 reply
  • 47 views

blackheart

I have SQL SERVER DATA where ii need to migrate views only to Snowflake

 

is there any way to create the views in FME and migarte data SQL Views to snwflake

1 reply

ctredinnick
Supporter
Forum|alt.badge.img+18
  • Supporter
  • June 12, 2023

What you need to do is get the script which creates the view, then execute that on Snowflake

The sys.modules table contains the view script as text.

In a SQLCreator

SELECT o.name, m.definition
FROM sys.sql_modules m
INNER JOIN sys.objects o ON m.object_id = o.object_id
WHERE o.type = 'V' AND o.name = 'YourViewName'

That'll get you the current SQL Server view scripts.

Then, any syntax differences between SQL and Snowflake, changes in database name, table names, you *should* be able to swap in with Regex with a StringReplacer or two assuming it's not too different.

Add a Text File FeatureWriter to back up all scripts.

Then SQLExecutor to create the views on Snowflake.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings