Example #1
0
 public void CreateTable(IConnectionManager connectionManager = null)
 {
     if (connectionManager is null)
     {
         CreateTableTask.Create(this);
     }
     else
     {
         CreateTableTask.Create(connectionManager, this);
     }
 }
Example #2
0
        private void CreateLoadProcessTable()
        {
            List <ITableColumn> lpColumns = new List <ITableColumn>()
            {
                new TableColumn("LoadProcessKey", "int", allowNulls: false, isPrimaryKey: true, isIdentity: true),
                new TableColumn("StartDate", "datetime", allowNulls: false),
                new TableColumn("TransferCompletedDate", "datetime", allowNulls: true),
                new TableColumn("EndDate", "datetime", allowNulls: true),
                new TableColumn("Source", "nvarchar(20)", allowNulls: true),
                new TableColumn("ProcessName", "nvarchar(100)", allowNulls: false)
                {
                    DefaultValue = "N/A"
                },
                new TableColumn("StartMessage", "nvarchar(4000)", allowNulls: true),
                new TableColumn("IsRunning", "bit", allowNulls: false)
                {
                    DefaultValue = "1"
                },
                new TableColumn("EndMessage", "nvarchar(4000)", allowNulls: true),
                new TableColumn("WasSuccessful", "bit", allowNulls: false)
                {
                    DefaultValue = "0"
                },
                new TableColumn("AbortMessage", "nvarchar(4000)", allowNulls: true),
                new TableColumn("WasAborted", "bit", allowNulls: false)
                {
                    DefaultValue = "0"
                },
                new TableColumn()
                {
                    Name = "IsFinished", ComputedColumn = "case when EndDate is not null then cast(1 as bit) else cast(0 as bit) end"
                },
                new TableColumn()
                {
                    Name = "IsTransferCompleted", ComputedColumn = "case when TransferCompletedDate is not null then cast(1 as bit) else cast(0 as bit) end"
                },
            };

            LoadProcessTable = new CreateTableTask("etl.LoadProcess", lpColumns)
            {
                DisableLogging = true
            };
        }
Example #3
0
        private void CreateETLLogTable()
        {
            List <ITableColumn> columns = new List <ITableColumn>()
            {
                new TableColumn("LogKey", "int", allowNulls: false, isPrimaryKey: true, isIdentity: true),
                new TableColumn("LogDate", "datetime", allowNulls: false),
                new TableColumn("Level", "nvarchar(10)", allowNulls: true),
                new TableColumn("Stage", "nvarchar(20)", allowNulls: true),
                new TableColumn("Message", "nvarchar(4000)", allowNulls: true),
                new TableColumn("TaskType", "nvarchar(40)", allowNulls: true),
                new TableColumn("TaskAction", "nvarchar(5)", allowNulls: true),
                new TableColumn("TaskHash", "char(40)", allowNulls: true),
                new TableColumn("Source", "nvarchar(20)", allowNulls: true),
                new TableColumn("LoadProcessKey", "int", allowNulls: true)
            };

            LogTable = new CreateTableTask("etl.Log", columns)
            {
                DisableLogging = true
            };
        }
Example #4
0
 public void CreateTable()
 {
     CreateTableTask.Create(this);
 }
Example #5
0
 public void CreateTable(IConnectionManager connectionManager) => CreateTableTask.Create(connectionManager, this);