Skip to main content

ParallelExporter

  • Namespace: PPDS.Migration.Export
  • Assembly: PPDS.Migration
  • Kind: Class
  • Implements: IExporter

Summary

Parallel exporter for Dataverse data.

Members

Constructors

ParallelExporter(IDataverseConnectionPool connectionPool, ICmtSchemaReader schemaReader, ICmtDataWriter dataWriter)

ParallelExporter(IDataverseConnectionPool connectionPool, ICmtSchemaReader schemaReader, ICmtDataWriter dataWriter)

Initializes a new instance of the PPDS.Migration.Export.ParallelExporter class.

  • Param connectionPool: The connection pool.

  • Param schemaReader: The schema reader.

  • Param dataWriter: The data writer.

ParallelExporter(IDataverseConnectionPool connectionPool, ICmtSchemaReader schemaReader, ICmtDataWriter dataWriter, FileColumnTransferHelper fileTransferHelper, IOptions<MigrationOptions> migrationOptions, ILogger<ParallelExporter> logger)

ParallelExporter(IDataverseConnectionPool connectionPool, ICmtSchemaReader schemaReader, ICmtDataWriter dataWriter, FileColumnTransferHelper fileTransferHelper, IOptions<MigrationOptions> migrationOptions, ILogger<ParallelExporter> logger)

Initializes a new instance of the PPDS.Migration.Export.ParallelExporter class.

  • Param connectionPool: The connection pool.

  • Param schemaReader: The schema reader.

  • Param dataWriter: The data writer.

  • Param fileTransferHelper: Optional file column transfer helper for downloading file data.

  • Param migrationOptions: Migration options from DI.

  • Param logger: The logger.

Methods

AddPartitionFilter

string AddPartitionFilter(string fetchXml, string primaryKeyField, GuidRange partition)

Adds GUID range filter conditions to FetchXML for partition-based export.

  • Param fetchXml: Base FetchXML query.

  • Param primaryKeyField: Primary key field name for the entity.

  • Param partition: GUID range to filter by.

  • Returns: Modified FetchXML with partition filter conditions.

DeterminePartitionCount

int DeterminePartitionCount(long recordCount, ExportOptions options)

Determines the number of GUID range partitions to use for a single entity export.

  • Param recordCount: Approximate record count for the entity.

  • Param options: Export options controlling parallelism.

  • Returns: 1 for sequential export, or N for partitioned export.

ExportAsync

Task<ExportResult> ExportAsync(MigrationSchema schema, string outputPath, ExportOptions options, IProgressReporter progress, CancellationToken cancellationToken)

Exports data using a pre-parsed schema.

  • Param schema: The migration schema.

  • Param outputPath: Output ZIP file path.

  • Param options: Export options.

  • Param progress: Optional progress reporter.

  • Param cancellationToken: Cancellation token.

  • Returns: The export result.

ExportAsync

Task<ExportResult> ExportAsync(string schemaPath, string outputPath, ExportOptions options, IProgressReporter progress, CancellationToken cancellationToken)

Exports data based on a schema file.

  • Param schemaPath: Path to the schema.xml file.

  • Param outputPath: Output ZIP file path.

  • Param options: Export options.

  • Param progress: Optional progress reporter.

  • Param cancellationToken: Cancellation token.

  • Returns: The export result.

SummarizeFilter

string SummarizeFilter(string fetchXmlFilter)

Summarizes a FetchXML filter into a human-readable description. Extracts attribute/operator/value from condition elements. Uses neutral separator since filters may mix AND/OR logic.