Beispiel #1
0
 protected override void FinishWrite()
 {
     TableData?.Close();
     if (BulkInsertConnectionManager != null)
     {
         BulkInsertConnectionManager.IsInBulkInsert = false;
         BulkInsertConnectionManager.CleanUpBulkInsert(DestinationTableDefinition?.Name);
         BulkInsertConnectionManager.CloseIfAllowed();
     }
 }
Beispiel #2
0
        protected override void BulkInsertData(TInput[] data)
        {
            AddDynamicColumnsToTableDef(data);
            TableData.ClearData();
            ConvertAndAddRows(data);
            var sql = new SqlTask($"Execute Bulk insert")
            {
                DisableLogging    = true,
                ConnectionManager = BulkInsertConnectionManager
            };

            sql.CopyLogTaskProperties(this);
            sql
            .BulkInsert(TableData, DestinationTableDefinition.Name);
            BulkInsertConnectionManager.CheckLicenseOrThrow(ProgressCount);
        }
Beispiel #3
0
 private void InitBulkInsertConnectionManager()
 {
     BulkInsertConnectionManager = this.DbConnectionManager.CloneIfAllowed();
     BulkInsertConnectionManager.IsInBulkInsert = true;
     BulkInsertConnectionManager.PrepareBulkInsert(DestinationTableDefinition.Name);
 }