Class CreateViewTask

Creates or alters a view.

Inheritance
System.Object
CreateViewTask
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.ControlFlow.Tasks
Assembly: ETLBox.dll
Syntax
    public sealed class CreateViewTask : ControlFlowTask, ILoggableTask
Examples
CreateViewTask.CreateOrAlter("viewname","SELECT value FROM table");

Constructors

CreateViewTask()

Declaration
    public CreateViewTask()

CreateViewTask(String, String)

Declaration
    public CreateViewTask(string viewName, string definition)
Parameters
TypeNameDescription
System.StringviewName
System.Stringdefinition

Properties

Definition

The view definition.

Declaration
    public string Definition { get; set; }
Property Value
TypeDescription
System.String

Sql

The sql that is generated to create the view

Declaration
    public string Sql { get; }
Property Value
TypeDescription
System.String

TaskName

A name to identify the task or component. Every component or task comes with a default name that can be overwritten.

Declaration
    public override string TaskName { get; set; }
Property Value
TypeDescription
System.String
Overrides

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
TypeDescription
System.String

ViewName

The name of the view

Declaration
    public string ViewName { get; set; }
Property Value
TypeDescription
System.String

VN

The formatted name of the view

Declaration
    public ObjectNameDescriptor VN { get; }
Property Value
TypeDescription
ObjectNameDescriptor

Methods

CreateOrAlter(IConnectionManager, String, String)

Creates or alter a view.

Declaration
    public static void CreateOrAlter(IConnectionManager connectionManager, string viewName, string definition)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the database you want to connect

System.StringviewName

The name of the view

System.Stringdefinition

The view definition

CreateOrAlter(String, String)

Creates or alter a view.

Declaration
    public static void CreateOrAlter(string viewName, string definition)
Parameters
TypeNameDescription
System.StringviewName

The name of the view

System.Stringdefinition

The view definition

Implements