Class CreateSchemaTask

Creates a schema. For MySql or MariaDb, use the CreateDatabaseTask instead. The Create method will throw an exception if the schema already exists. CreateIfNotExists will only create a schema if it doesn't exists.

Inheritance
object
CreateSchemaTask
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
Assembly: ETLBox.dll
Syntax
    public sealed class CreateSchemaTask : ControlFlowTask, ILoggableTask
Examples
CreateSchemaTask.Create("demo");
CreateSchemaTask.CreateIfNotExists("demo2");

Constructors

CreateSchemaTask()

Declaration
    public CreateSchemaTask()
Examples
CreateSchemaTask.Create("demo");
CreateSchemaTask.CreateIfNotExists("demo2");

CreateSchemaTask(string, string)

Declaration
    public CreateSchemaTask(string schemaName, string authorizationUser)
Parameters
TypeNameDescription
stringschemaName
stringauthorizationUser
Examples
CreateSchemaTask.Create("demo");
CreateSchemaTask.CreateIfNotExists("demo2");

CreateSchemaTask(string)

Declaration
    public CreateSchemaTask(string schemaName)
Parameters
TypeNameDescription
stringschemaName
Examples
CreateSchemaTask.Create("demo");
CreateSchemaTask.CreateIfNotExists("demo2");

Properties

AuthorizationUser

Declaration
    public string AuthorizationUser { get; set; }
Property Value
TypeDescription
string
Examples
CreateSchemaTask.Create("demo");
CreateSchemaTask.CreateIfNotExists("demo2");

ON

The formatted schema name

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

SchemaName

The name of the schema

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

Sql

The sql that is used to create the schema.

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

Methods

Create()

Runs the sql that creates the schema. If the schema already exists, an Exception is thrown. Works only if the database does support schema (for MySql, use the CreateDatabaseTask instead)

Declaration
    public void Create()

Create(IConnectionManager, string, string)

Creates a schema. Throws an exception if the schema already exists. For MySql, use the CreateDatabaseTask instead.

Declaration
    public static void Create(IConnectionManager connectionManager, string schemaName, string authorizationUser)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the database you want to connect

stringschemaName

The name of the schema

stringauthorizationUser

Database user which is authorized for the schema

Create(IConnectionManager, string)

Creates a schema. Throws an exception if the schema already exists. For MySql, use the CreateDatabaseTask instead.

Declaration
    public static void Create(IConnectionManager connectionManager, string schemaName)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the database you want to connect

stringschemaName

The name of the schema

Create(string, string)

Creates a schema. Throws an exception if the schema already exists. For MySql, use the CreateDatabaseTask instead.

Declaration
    public static void Create(string schemaName, string authorizationUser)
Parameters
TypeNameDescription
stringschemaName

The name of the schema

stringauthorizationUser

Database user which is authorized for the schema

Create(string)

Creates a schema. Throws an exception if the schema already exists. For MySql, use the CreateDatabaseTask instead.

Declaration
    public static void Create(string schemaName)
Parameters
TypeNameDescription
stringschemaName

The name of the schema

CreateIfNotExists()

Runs the sql that creates the schema. Schema is only created if the schema doesn't exists. Works only if the database does support schema (for MySql, use the CreateDatabaseTask instead)

Declaration
    public void CreateIfNotExists()

CreateIfNotExists(IConnectionManager, string, string)

Creates a schema if the schema doesn't exists. For MySql, use the CreateDatabaseTask instead

Declaration
    public static void CreateIfNotExists(IConnectionManager connectionManager, string schemaName, string authorizationUser)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the database you want to connect

stringschemaName

The name of the schema

stringauthorizationUser

Database user which is authorized for the schema

CreateIfNotExists(IConnectionManager, string)

Creates a schema if the schema doesn't exists. For MySql, use the CreateDatabaseTask instead

Declaration
    public static void CreateIfNotExists(IConnectionManager connectionManager, string schemaName)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

The connection manager of the database you want to connect

stringschemaName

The name of the schema

CreateIfNotExists(string, string)

Creates a schema if the schema doesn't exists. For MySql, use the CreateDatabaseTask instead.

Declaration
    public static void CreateIfNotExists(string schemaName, string authorizationUser)
Parameters
TypeNameDescription
stringschemaName

The name of the schema

stringauthorizationUser

Database user which is authorized for the schema

CreateIfNotExists(string)

Creates a schema if the schema doesn't exists. For MySql, use the CreateDatabaseTask instead.

Declaration
    public static void CreateIfNotExists(string schemaName)
Parameters
TypeNameDescription
stringschemaName

The name of the schema

Implements