Export (0) Print
Expand All

DTSProcessingTask Class

 

Applies To: SQL Server 2016 Preview

Processes objects in a Microsoft SQL Server Analysis Services database.

Namespace:   Microsoft.DataTransformationServices.Tasks.DTSProcessingTask
Assembly:  Microsoft.SqlServer.ASTasks (in Microsoft.SqlServer.ASTasks.dll)


[DtsTaskAttribute(LocalizationType = typeof(DTSProcessingTask), 
	TaskType = "DTS90", UITypeName = "Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=12.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", 
	IconResource = "ProcessTaskIcon")]
[GuidAttribute("095062DB-C4B1-4B43-97CD-53D236159E22")]
public sealed class DTSProcessingTask : ASTaskBase, IDTSComponentPersist

NameDescription
System_CAPS_pubmethodDTSProcessingTask()

Initializes a new instance of the DTSProcessingTask class.

NameDescription
System_CAPS_pubpropertyConnectionName

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the name of the connection for the analysis services task.(Inherited from ASTaskBase.)

System_CAPS_pubpropertyExecutionValue

Returns a user-defined object. This field is read-only. (Inherited from Task.)

System_CAPS_pubpropertyProcessingCommands

Gets or sets the text of the processing command to be sent to the Analysis Services server.

System_CAPS_pubpropertySystem_CAPS_staticTaskDescription

Gets the description of the Analysis Services Processing task.

System_CAPS_pubpropertySystem_CAPS_staticTaskDisplayName

Gets the unique name for the Analysis Services Processing task.

System_CAPS_pubpropertyVersion

*** Member deprecated; see Remarks. ***   Returns the version of the task. This property is read-only.(Inherited from Task.)

NameDescription
System_CAPS_pubmethodCanUpdate(String)

*** Member deprecated; see Remarks. ***   A Boolean that indicates whether the new package XML can update the old package XML.(Inherited from Task.)

System_CAPS_pubmethodEquals(Object)

Determines whether two object instances are equal.(Inherited from DtsObject.)

System_CAPS_pubmethodExecute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object)

This API supports the product infrastructure and is not intended to be used directly from your code. Executes the analysis services task.(Inherited from ASTaskBase.)

System_CAPS_pubmethodGetConnectionID(Connections, String)

Gets a String containing the ID of the connection.(Inherited from Task.)

System_CAPS_pubmethodGetConnectionName(Connections, String)

Gets a String containing the name of the connection.(Inherited from Task.)

System_CAPS_pubmethodGetHashCode()

Returns the hash code for this instance.(Inherited from DtsObject.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInitializeTask(Connections, VariableDispenser, IDTSInfoEvents, IDTSLogging, EventInfos, LogEntryInfos, ObjectReferenceTracker)

Initializes the properties associated with the task. This method is called by the runtime and is not used in code.(Inherited from Task.)

System_CAPS_pubmethodLoadFromXML(XmlElement, IDTSInfoEvents)

Loads the task information from XML. This method is not callable by your application code. To load a package saved as .xml, use the Application.LoadPackage method.

System_CAPS_pubmethodSaveToXML(XmlDocument, IDTSInfoEvents)

Saves component information to the package XML. This method is not callable by your application code. To save a package as .xml, use the Application.SaveToXml method.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodUpdate(String)

*** Member deprecated; see Remarks. ***   This method updates the old package XML with the new package XML if CanUpdate is set to true.(Inherited from Task.)

System_CAPS_pubmethodValidate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging)

This API supports the product infrastructure and is not intended to be used directly from your code. Validates the analysis service task.(Inherited from ASTaskBase.)

Legacy Code Example

The following code sample creates, configures, and executes a new DTSProcessingTask that processes the Targeted Mailing mining model in the Adventure Works DW sample database.

using Microsoft.SqlServer.Dts.Runtime;
using System.Reflection;

class Module1
{

  public static void Main()
  {

    Package pkg = new Package();
    string procCmd;

    ConnectionManager asCM;
    asCM = pkg.Connections.Add("MSOLAP100");
    asCM.Name = "Analysis Services Connection Manager";
    asCM.ConnectionString = "Data Source=<servername>;" +
      "Initial Catalog=Adventure Works DW;Provider=MSOLAP;" +
      "Integrated Security=SSPI;Impersonation Level=Impersonate;";

    procCmd = "<Batch xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">" +
      "<Parallel>" +
        "<Process xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " +
            "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" +
          "<Object>" +
            "<DatabaseID>Adventure Works DW</DatabaseID>" +
            "<MiningStructureID>Targeted Mailing</MiningStructureID>" +
          "</Object>" +
          "<Type>ProcessFull</Type>" +
          "<WriteBackTableCreation>UseExisting</WriteBackTableCreation>" +
        "</Process>" +
      "</Parallel>" +
    "</Batch>";

    Executable exe = pkg.Executables.Add("Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask, " +
      "Microsoft.SqlServer.ASTasks, Version=10.0.0.0, " +
      "Culture=neutral, PublicKeyToken=89845dcd8080cc91");
    TaskHost thTask = (TaskHost) exe;
    {
      thTask.Properties("ConnectionName").SetValue(thTask, "Analysis Services Connection Manager");
      thTask.Properties("ProcessingCommands").SetValue(thTask, procCmd);
    }

    DTSExecResult valResults = pkg.Validate(pkg.Connections, pkg.Variables, null, null);

    if (valResults==DTSExecResult.Success)
    {
      pkg.Execute();
    }

  }

}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft