How To

Manually Modify Schema Map at Runtime

You can override the schema map at runtime to dynamically add/remove columns or replace the map completely. This allows you to support new columns at runtime without having to modify the project.

Add a method of override for the GetDataSchema(DataSchema schema) method.

In this function you can adjust the schema, to bypass the current project schema you must return this schema or a new schema. For example using a simple helper function you can look at both systems and create a compatible schema where the columns match both sides by name.

public override DataSchema GetDataSchema(DataSchema schema)
        return DataSourceA.GetDefaultMap().ToAutoMap(DataSourceB.GetDefaultMap());

Note: If your data-sources do not return type information and unique key columns such as CSV files you will need to update the schema map to define the key column and any data types you need. Adjusting the schema map this way does not affect the project file.