Class CsvConnectorValidator
- Namespace
- Datafication.Connectors.CsvConnector
- Assembly
- Datafication.CsvConnector.dll
Validates configurations for CSV data connectors.
public class CsvConnectorValidator : IDataConnectorConfigurationValidator
- Inheritance
-
objectCsvConnectorValidator
- Implements
Remarks
This validator ensures that the CSV connector configuration is properly set up before attempting to connect to the data source. It validates the presence of required fields and the accessibility of the specified CSV source.
Methods
Validate(IDataConnectorConfiguration)
Validates the provided configuration for a CSV data connector.
public ValidationResult Validate(IDataConnectorConfiguration configuration)
Parameters
configurationIDataConnectorConfigurationThe configuration to validate.
Returns
- ValidationResult
A validation result indicating whether the configuration is valid and any error messages if it is not.
Remarks
This method performs the following validations:
- Checks if the configuration is null
- Verifies if the configuration is of the correct type (CsvConnectorConfiguration)
- Validates the presence of required fields (Id and Source)
- Ensures the source URI is accessible (for file paths) or has a valid scheme (for URLs)