Manually Modifying Schema Map at Runtime

You can override the Schema Map at runtime to dynamically add/remove columns or replace the Map completely

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

To do this you need to use the project Automation Feature from the View Menu

Project Automation

Then you need to add a method override for the GetDataSchema(schema) method.

GetDataSchema

In this function you can adjust the schema, your passed the current project schema and 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.


Can't find the answers you're looking for? Contact our support team and we'll personally get back to you as quickly as we can.