@@ -106,6 +106,8 @@ pub struct CreateTableBuilder {
106106 pub location : Option < String > ,
107107 /// Optional `AS SELECT` query for the table.
108108 pub query : Option < Box < Query > > ,
109+ /// Optional Snowflake `USING TEMPLATE` query.
110+ pub template : Option < Box < Query > > ,
109111 /// Whether `WITHOUT ROWID` is set.
110112 pub without_rowid : bool ,
111113 /// Optional `LIKE` clause kind.
@@ -246,6 +248,7 @@ impl CreateTableBuilder {
246248 file_format : None ,
247249 location : None ,
248250 query : None ,
251+ template : None ,
249252 without_rowid : false ,
250253 like : None ,
251254 clone : None ,
@@ -400,6 +403,11 @@ impl CreateTableBuilder {
400403 self . query = query;
401404 self
402405 }
406+ /// Set a Snowflake `USING TEMPLATE` query.
407+ pub fn template ( mut self , template : Option < Box < Query > > ) -> Self {
408+ self . template = template;
409+ self
410+ }
403411 /// Set `WITHOUT ROWID` option.
404412 pub fn without_rowid ( mut self , without_rowid : bool ) -> Self {
405413 self . without_rowid = without_rowid;
@@ -709,6 +717,7 @@ impl CreateTableBuilder {
709717 file_format : self . file_format ,
710718 location : self . location ,
711719 query : self . query ,
720+ template : self . template ,
712721 without_rowid : self . without_rowid ,
713722 like : self . like ,
714723 clone : self . clone ,
@@ -808,6 +817,7 @@ impl From<CreateTable> for CreateTableBuilder {
808817 file_format : table. file_format ,
809818 location : table. location ,
810819 query : table. query ,
820+ template : table. template ,
811821 without_rowid : table. without_rowid ,
812822 like : table. like ,
813823 clone : table. clone ,
0 commit comments