ASExecuteDDLTask::Source Property
Gets or sets the name of the source that contains the DDL statement to be sent to the Analysis Services server.
Assembly: Microsoft.SqlServer.ASTasks (in Microsoft.SqlServer.ASTasks.dll)
Property Value
Type: System::String^The name of the source that contains the DDL statement to be sent to the Analysis Services server.
This property works with the SourceType property. If the source type is a variable, and the variable is null, the String returned is empty. If the source type is a connection and there is an error retrieving the connection, the String returned is empty.
The DDL statement consists of an XML for Analysis (XMLA) statement that contains the XMLA Create, Alter, or Delete commands, in a format like the example that follows:
<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ParentObject>
<DatabaseID>Adventure Works DW</DatabaseID>
</ParentObject>
<ObjectDefinition>
<Dimension xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID>Dim Customer</ID>
<Name>Customer</Name>
<Annotations>
...
</Annotations>
<Source xsi:type="DataSourceViewBinding">
<DataSourceViewID>Adventure Works DW</DataSourceViewID>
</Source>
<Type>Customers</Type>
<Language>1033</Language>
<Collation>Latin1_General_CI_AS</Collation>
<UnknownMemberName>Unknown</UnknownMemberName>
<Translations>
...
</Translations>
<Attributes>
...
</Attributes>
...
</Dimension>
</ObjectDefinition>
</Create>
The following code sample creates, configures, and executes a new ASExecuteDDLTask that loads the DDL statement to execute from a file connection. The sample uses the Source property.