Επεξεργασία

Κοινή χρήση μέσω


Plugin Algorithms

Applies to: SQL Server 2019 and earlier Analysis Services Azure Analysis Services Fabric/Power BI Premium

Important

Data mining was deprecated in SQL Server 2017 Analysis Services and now discontinued in SQL Server 2022 Analysis Services. Documentation is not updated for deprecated and discontinued features. To learn more, see Analysis Services backward compatibility.

In addition to the algorithms that Microsoft SQL Server SQL Server Analysis Services provides, there are many other algorithms that you can use for data mining. Accordingly, SQL Server Analysis Services provides a mechanism for "plugging in" algorithms that are created by third parties. As long as the algorithms follow certain standards, you can use them within SQL Server Analysis Services just as you use the Microsoft algorithms. Plugin algorithms have all the capabilities of algorithms that SQL Server SQL Server Analysis Services provides.

For a full description of the interfaces that SQL Server Analysis Services uses to communicate with plugin algorithms, see the samples for creating a custom algorithm and custom model viewer that are published on CodePlex Web site.

Algorithm Requirements

To plug an algorithm into SQL Server Analysis Services, you must implement the following COM interfaces:

IDMAlgorithm
Implements an algorithm that produces models, and implements the prediction operations of the resulting models.

IDMAlgorithmNavigation
Enables browsers to access the content of the models.

IDMPersist
Enables the models that the algorithm trains to be saved and loaded by SQL Server Analysis Services.

IDMAlgorithmMetadata
Describes the capabilities and input parameters of the algorithm.

IDMAlgorithmFactory
Creates instances of the objects that implement the algorithm interface, and provides SQL Server Analysis Services with access to the algorithm-metadata interface.

SQL Server Analysis Services uses these COM interfaces to communicate with plugin algorithms. Although plugin algorithms that you use must support the Microsoft OLE DB for Data Mining specification, they do not have to support all the data mining options in the specification. You can use the MINING_SERVICES schema rowset to determine the capabilities of an algorithm. This schema rowset lists the data mining support options for each plugin algorithm provider.

You must register new algorithms before you use them with SQL Server Analysis Services. To register an algorithm, include the following information in the .ini file of the instance of SQL Server Analysis Services on which you want to include the algorithms:

  • The algorithm name

  • ProgID (this is optional and will only be included for plugin algorithms)

  • A flag that indicates whether the algorithm is enabled or not

The following code sample illustrates how to register a new algorithm:

<ConfigurationSettings>

...

<DataMining>

...

<Algorithms>

...

<Sample_Plugin_Algorithm>

<Enabled>1</Enabled>

<ProgID>Microsoft.DataMining.SamplePlugInAlgorithm.Factory</ProgID>

</Sample_PlugIn_Algorithm>

...

</Algorithms>

...

</DataMining>

...

</ConfigurationSettings>

See Also

Data Mining Algorithms (Analysis Services - Data Mining)