public void Can_BulkCopy() { var data = CreateTable(); var manifestObject = GetJsonFile <DatabaseJobManifest>(_inputRoot, "database.manifest.xepdb1.json"); OracleSqlWriter target = new OracleSqlWriter(); var outputnoOfRecord = target.BulkCopy(connectionString, manifestObject.manifest.tables[0], data); data.Rows.Count.Should().Be(outputnoOfRecord); }
public void UploadTable_SetupSource() { var data = CreateTable("Pre", 60000); var manifestObject = GetJsonFile <DatabaseJobManifest>(_inputRoot, "database.manifest.xepdb1.json"); var table = manifestObject.manifest.tables[0]; table.temp_name = table.qualified_table_name; //initializing Table-TempName with Person Table var target = new OracleSqlWriter(); target.ExecuteSqlText(connectionString, new List <string> { $"truncate table {table.temp_name}" }); // Cleaning the Person Table first before adding these records with data var outputnoOfRecord = target.BulkCopy(connectionString, table, data); // This call should copy records from data to Persons directly. data.Rows.Count.Should().Be(outputnoOfRecord); }