CustomDataTransformation Class TIBCO Spotfire 6.5 API Reference
Base class for custom data transformations. To create a custom transformation you need to extend this class and CustomDataRowReader, register the transformation class in your AddIn by using the overriddenRegisterDataTransformations(AddIn DataTransformationRegistrar). If necessary create a UI and register in the overridden RegisterViews(AddIn ViewRegistrar) together with your transformation.
Inheritance Hierarchy

System Object
  Spotfire.Dxp.Data DataTransformation
    Spotfire.Dxp.Application.Extension CustomDataTransformation

Namespace: Spotfire.Dxp.Application.Extension
Assembly: Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 14.10.7525.5058 (14.10.7525.5058)
Syntax

[SerializableAttribute]
[PersistenceVersionAttribute(1, 0)]
public abstract class CustomDataTransformation : DataTransformation
Examples

For the reader implementation see the example in CustomDataRowReader
[Serializable] 
public class EveryNColumnsTransformation : CustomDataTransformation
{
    private int n;

    public EveryNColumnsTransformation()
    {
        n = 2;
    }

    public int N
    {
        get { return n; }
        set { n = value; }
    }

    protected override DataTransformationConnection ConnectCore(ImportContext importContext, DataRowReader input)
    {
        PromptService promptService = importContext.PromptService;
        List<object> promptModels = new List<object>();
        if (promptService.IsPromptingAllowed)
        {
            promptModels.Add(this);
        }

        //prompt for a value of N that the dialog sets directly on the promptmodel 

        return
            DataTransformationConnection.CreateConnection(
            delegate { return new EveryNColumnsTransformationReader(input, N); },
            promptModels);
    }

    public EveryNColumnsTransformation(SerializationInfo info, StreamingContext context)
        : base(info, context)
    {
        n = info.GetInt32("n");
    }

    protected override void GetObjectData(SerializationInfo info, StreamingContext context)
    {
        base.GetObjectData(info, context);
        info.AddValue("n", n);
    }   
}
Version Information

Supported in: 6.5, 6.0, 5.5, 5.0, 4.5
See Also