Class CreateSchemaTask
Creates a schema if the schema doesn't exists. For MySql or MariaDb, use the CreateDatabaseTask instead.
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 CreateSchemaTask : ControlFlowTask, ILoggableTask
Examples
CreateSchemaTask.Create("demo");
Constructors
CreateSchemaTask()
Declaration
public CreateSchemaTask()
CreateSchemaTask(String)
Declaration
public CreateSchemaTask(string schemaName)
Parameters
Type | Name | Description |
---|---|---|
System.String | schemaName |
Properties
ON
The formatted schema name
Declaration
public ObjectNameDescriptor ON { get; }
Property Value
Type | Description |
---|---|
ObjectNameDescriptor |
SchemaName
The name of the schema
Declaration
public string SchemaName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Sql
The sql that is used to create the schema.
Declaration
public string Sql { get; }
Property Value
Type | Description |
---|---|
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
Type | Description |
---|---|
System.String |
Overrides
Methods
Create(IConnectionManager, String)
Creates a schema if the schema doesn't exists. For MySql, use the CreateDatabaseTask instead
Declaration
public static void Create(IConnectionManager connectionManager, string schemaName)
Parameters
Type | Name | Description |
---|---|---|
IConnectionManager | connectionManager | The connection manager of the database you want to connect |
System.String | schemaName | The name of the schema |
Create(String)
Creates a schema if the schema doesn't exists. For MySql, use the CreateDatabaseTask instead.
Declaration
public static void Create(string schemaName)
Parameters
Type | Name | Description |
---|---|---|
System.String | schemaName | The name of the schema |
Execute()
Runs the sql that creates the schema. Works only if the database does support schema (for MySql, use the CreateDatabaseTask instead)
Declaration
public void Execute()