Class CreateViewTask

Creates or alters a view.

Inheritance
object
CreateViewTask
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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()
Examples
CreateViewTask.CreateOrAlter("viewname","SELECT value FROM table");

CreateViewTask(string, string)

Declaration
    public CreateViewTask(string viewName, string definition)
Parameters
TypeNameDescription
stringviewName
stringdefinition
Examples
CreateViewTask.CreateOrAlter("viewname","SELECT value FROM table");

Properties

Definition

The view definition.

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

Sql

The sql that is generated to create the view

Declaration
    public string Sql { get; }
Property Value
TypeDescription
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
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
string

ViewName

The name of the view

Declaration
    public string ViewName { get; set; }
Property Value
TypeDescription
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

stringviewName

The name of the view

stringdefinition

The view definition

CreateOrAlter(string, string)

Creates or alter a view.

Declaration
    public static void CreateOrAlter(string viewName, string definition)
Parameters
TypeNameDescription
stringviewName

The name of the view

stringdefinition

The view definition

Implements