CreateSchemaTask
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.
Implements
Inherited Members
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
Examples
CreateSchemaTask.Create("demo");
CreateSchemaTask.CreateIfNotExists("demo2");
Constructors
CreateSchemaTask()
Declaration
CreateSchemaTask(string)
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | schemaName |
CreateSchemaTask(string, string)
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | schemaName | |
string | authorizationUser |
Properties
AuthorizationUser
Declaration
Property Value
Type | Description |
---|---|
string |
ON
The formatted schema name
Declaration
Property Value
Type | Description |
---|---|
ObjectNameDescriptor |
SchemaName
The name of the schema
Declaration
Property Value
Type | Description |
---|---|
string |
Sql
The sql that is used to create the schema.
Declaration
Property Value
Type | Description |
---|---|
string |
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
Create(IConnectionManager, string)
Creates a schema. Throws an exception if the schema already exists. For MySql, use the CreateDatabaseTask instead.
Declaration
Parameters
Type | Name | Description |
---|---|---|
IConnectionManager | connectionManager | The connection manager of the database you want to connect |
string | schemaName | The name of the schema |
Create(IConnectionManager, string, string)
Creates a schema. Throws an exception if the schema already exists. For MySql, use the CreateDatabaseTask instead.
Declaration
Parameters
Type | Name | Description |
---|---|---|
IConnectionManager | connectionManager | The connection manager of the database you want to connect |
string | schemaName | The name of the schema |
string | authorizationUser | 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
Parameters
Type | Name | Description |
---|---|---|
string | schemaName | 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
Parameters
Type | Name | Description |
---|---|---|
string | schemaName | The name of the schema |
string | authorizationUser | Database user which is authorized for 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
CreateIfNotExists(IConnectionManager, string)
Creates a schema if the schema doesn't exists. For MySql, use the CreateDatabaseTask instead
Declaration
Parameters
Type | Name | Description |
---|---|---|
IConnectionManager | connectionManager | The connection manager of the database you want to connect |
string | schemaName | The name of the schema |
CreateIfNotExists(IConnectionManager, string, string)
Creates a schema if the schema doesn't exists. For MySql, use the CreateDatabaseTask instead
Declaration
Parameters
Type | Name | Description |
---|---|---|
IConnectionManager | connectionManager | The connection manager of the database you want to connect |
string | schemaName | The name of the schema |
string | authorizationUser | 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
Parameters
Type | Name | Description |
---|---|---|
string | schemaName | The name of the schema |
CreateIfNotExists(string, string)
Creates a schema if the schema doesn't exists. For MySql, use the CreateDatabaseTask instead.
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | schemaName | The name of the schema |
string | authorizationUser | Database user which is authorized for the schema |