ConditionalSplit Transformation Code

Apr 28, 2009 at 12:13 PM
Can someone share code for implementing Conditional split transformation in extending EzAPI
Apr 29, 2009 at 3:21 AM

Please let me know if there is anything wrong in this code


[

CompID("DTSTransform.ConditionalSplit")]

 

 

public class EzCondSplit : EzComponent

 

{

 

public EzCondSplit(EzDataFlow dataFlow) : base(dataFlow) { }

 

 

public EzCondSplit(EzDataFlow parent, IDTSComponentMetaData100 meta) : base(parent,meta) { }

 

 

public virtual void VerifyConnection() { }

 

 

EzConnectionManager m_connection;

 

 

public EzConnectionManager Connection

 

{

 

get

 

{

 

if (m_connection == null)

 

{

 

IDTSRuntimeConnection100 rtCnn = m_meta.RuntimeConnectionCollection[0];

 

 

if (rtCnn != null)

 

m_connection =

new EzCacheCM(Parent.Package, Parent.Package.Connections[rtCnn.ConnectionManagerID]);

 

}

 

return m_connection;

 

}

 

set

 

{

 

IDTSRuntimeConnection100 rtCnn = m_meta.RuntimeConnectionCollection[0];

 

rtCnn.ConnectionManagerID = ((

ConnectionManager)value).ID;

 

rtCnn.ConnectionManager =

DtsConvert.GetExtendedInterface((ConnectionManager)value);

 

m_connection =

value;

 

VerifyConnection();

}

}

 

public string FriendlyExpression

 

{

 

get { return (string)m_meta.CustomPropertyCollection["FriendlyExpression"].Value; }

 

 

set { m_comp.SetComponentProperty("FriendlyExpression", value); ReinitializeMetaData(); }

 

}

 

public int EvaluationOrder

 

{

 

get { return (int)m_meta.CustomPropertyCollection["EvaluationOrder"].Value; }

 

 

set { m_comp.SetComponentProperty("EvaluationOrder", value); }

 

}

 

public string Expression

 

{

 

get { return (string)m_meta.CustomPropertyCollection["Expression"].Value; }

 

 

set { m_comp.SetComponentProperty("Expression", value); ReinitializeMetaData(); }

 

}

 

public bool IsDefaultOut

 

{

 

get { return (bool)Meta.CustomPropertyCollection["IsDefaultOut"].Value; }

 

 

set { SetComponentProperty("IsDefaultOut", value); ReinitializeMetaData(); }

 

}

 

}

 

}