private void PrimeDestinationTypesBasedOnCatalogueTypes(DataTable toProcess)
        {
            //if the extraction is of a Catalogue
            var datasetCommand = _request as IExtractDatasetCommand;

            if (datasetCommand == null)
            {
                return;
            }

            //for every extractable column in the Catalogue
            foreach (var extractionInformation in datasetCommand.ColumnsToExtract.OfType <ExtractableColumn>().Select(ec => ec.CatalogueExtractionInformation))//.GetAllExtractionInformation(ExtractionCategory.Any))
            {
                if (extractionInformation == null)
                {
                    continue;
                }

                var catItem = extractionInformation.CatalogueItem;

                //if we do not know the data type or the ei is a transform
                if (catItem == null || catItem.ColumnInfo == null || extractionInformation.IsProperTransform())
                {
                    continue;
                }

                string destinationType = GetDestinationDatabaseType(extractionInformation);

                //Tell the destination the datatype of the ColumnInfo that underlies the ExtractionInformation (this might be changed by the ExtractionInformation e.g. as a
                //transform but it is a good starting point.  We don't want to create a varchar(10) column in the destination if the origin dataset (Catalogue) is a varchar(100)
                //since it will just confuse the user.  Bear in mind these data types can be degraded later by the destination
                var columnName = extractionInformation.Alias ?? catItem.ColumnInfo.GetRuntimeName();
                var addedType  = _destination.AddExplicitWriteType(columnName, destinationType);
                addedType.IsPrimaryKey = toProcess.PrimaryKey.Any(dc => dc.ColumnName == columnName);

                //if user wants to copy collation types and the destination server is the same type as the origin server
                if (CopyCollations && _destinationDatabase.Server.DatabaseType == catItem.ColumnInfo.TableInfo.DatabaseType)
                {
                    addedType.Collation = catItem.ColumnInfo.Collation;
                }
            }

            foreach (ReleaseIdentifierSubstitution sub in datasetCommand.QueryBuilder.SelectColumns.Where(sc => sc.IColumn is ReleaseIdentifierSubstitution).Select(sc => sc.IColumn))
            {
                var  columnName = sub.GetRuntimeName();
                bool isPk       = toProcess.PrimaryKey.Any(dc => dc.ColumnName == columnName);

                var addedType = _destination.AddExplicitWriteType(columnName, datasetCommand.ExtractableCohort.GetReleaseIdentifierDataType());
                addedType.IsPrimaryKey = isPk;
                addedType.AllowNulls   = !isPk;
            }
        }