Class CreateViewTask
Creates or alters a view.
Implements
Inherited Members
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
public sealed class CreateViewTask : ControlFlowTask, ILoggableTaskExamples
CreateViewTask.CreateOrAlter("viewname","SELECT value FROM table");Constructors
CreateViewTask()
Declaration
public CreateViewTask()CreateViewTask(string, string)
Declaration
public CreateViewTask(string viewName, string definition)Parameters
| Type | Name | Description |
|---|---|---|
| string | viewName | |
| string | definition |
Properties
Definition
The view definition.
Declaration
public string Definition { get; set; }Property Value
| Type | Description |
|---|---|
| string |
Sql
The sql that is generated to create the view
Declaration
public string Sql { get; }Property Value
| Type | Description |
|---|---|
| string |
VN
The formatted name of the view
Declaration
public ObjectNameDescriptor VN { get; }Property Value
| Type | Description |
|---|---|
| ObjectNameDescriptor |
ViewAttributes
Optional, will set the view attributes, e.g. "WITH SCHEMABINDING". This part is put after the CREATE VIEW [viewname] statement and before the AS statement.
Declaration
public string ViewAttributes { get; set; }Property Value
| Type | Description |
|---|---|
| string |
ViewName
The name of the view
Declaration
public string ViewName { get; set; }Property Value
| Type | Description |
|---|---|
| string |
Methods
CreateOrAlter(IConnectionManager, string, string)
Creates or alter a view.
Declaration
public static void CreateOrAlter(IConnectionManager connectionManager, string viewName, string definition)Parameters
| Type | Name | Description |
|---|---|---|
| IConnectionManager | connectionManager | The connection manager of the database you want to connect |
| string | viewName | The name of the view |
| string | definition | The view definition |
CreateOrAlter(string, string)
Creates or alter a view.
Declaration
public static void CreateOrAlter(string viewName, string definition)Parameters
| Type | Name | Description |
|---|---|---|
| string | viewName | The name of the view |
| string | definition | The view definition |