@@ -31,7 +31,7 @@ MS SQL Database Migration Options: WITH
31
31
---------------------------------------
32
32
33
33
When loading from a `MS SQL ` database, the same options as when loading a
34
- `MySQL ` database are supported. Please refer to the MySQL section. The
34
+ `MS SQL ` database are supported. Please refer to the MS SQL section. The
35
35
following options are added:
36
36
37
37
- *create schemas *
53
53
The cast clause allows to specify custom casting rules, either to overload
54
54
the default casting rules or to amend them with special cases.
55
55
56
- Please refer to the MySQL CAST clause for details.
56
+ Please refer to the MS SQL CAST clause for details.
57
+
58
+ MS SQL Views Support
59
+ --------------------
60
+
61
+ MS SQL views support allows pgloader to migrate view as if they were base
62
+ tables. This feature then allows for on-the-fly transformation from MS SQL
63
+ to PostgreSQL, as the view definition is used rather than the base data.
64
+
65
+ MATERIALIZE VIEWS
66
+ ^^^^^^^^^^^^^^^^^
67
+
68
+ This clause allows you to implement custom data processing at the data
69
+ source by providing a *view definition * against which pgloader will query
70
+ the data. It's not possible to just allow for plain `SQL ` because we want to
71
+ know a lot about the exact data types of each column involved in the query
72
+ output.
73
+
74
+ This clause expect a comma separated list of view definitions, each one
75
+ being either the name of an existing view in your database or the following
76
+ expression::
77
+
78
+ *name* `AS` `$$` *sql query* `$$`
79
+
80
+ The *name * and the *sql query * will be used in a `CREATE VIEW ` statement at
81
+ the beginning of the data loading, and the resulting view will then be
82
+ dropped at the end of the data loading.
83
+
84
+ MATERIALIZE ALL VIEWS
85
+ ^^^^^^^^^^^^^^^^^^^^^
86
+
87
+ Same behaviour as *MATERIALIZE VIEWS * using the dynamic list of views as
88
+ returned by MS SQL rather than asking the user to specify the list.
57
89
58
90
MS SQL Partial Migration
59
91
------------------------
@@ -96,7 +128,7 @@ schema 'public' in the target database with this command::
96
128
ALTER TABLE NAMES MATCHING ... IN SCHEMA '...'
97
129
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98
130
99
- See the MySQL explanation for this clause above. It works the same in the
131
+ See the MS SQL explanation for this clause above. It works the same in the
100
132
context of migrating from MS SQL, only with the added option to specify the
101
133
name of the schema where to find the definition of the target tables.
102
134
0 commit comments