...
Code Block | ||
---|---|---|
| ||
<Header> <Extension> <KafkaTopics model="modelA"> <Topic name="exampleTopic" /> </KafkaTopics> <KafkaTopics model="modelB"> <Topic name="exampleTopic2" /> <Topic name="exampleTopicFoo" /> </KafkaTopics> </Extension> <!-- other Elements --> </Header> |
Structure
A possible access architecture might look like this:
...
The PMML document is loaded by an ACCESS operator (e.g. by a Kafka Topic) and runs through all necessary extensions to get all essential information. A mining operator, which gets the model as an input, can then pass on current models (if a new PMML is send over a Topic), without starting the query again. If a UNION operator is the prefix of a mining operator, you could access further Topics over a COMMAND operator in the future, as long as they don't change during runtime (this type of overloads can be defined in extentions).
Query of Mining Models (PMML)
Name | Query of Mining Models |
---|---|
Actors | System PG EStream, System PG DAvE |
Trigger | System PG EStream is started |
Description | Existing PMML models can be requested by an Http query. The Http query contains the latest appropriate PMML model if the query was successful and there was at least one appropriate PMML specification in the Big Data Archive. If there is no model with this specification yet, this information is sent as a Http response. |
Pre-Requirements |
|
Essential Steps |
|
Exceptions | Model doesn't exist, because the query is not an arranged standard PMML model:
|
Post-Requirements | Latest PMML model is available in Http response. |
Time Behaviour | immediately |
UML |
Execute PMML in Odysseus
Execute correct product:
Either check out the Odysseus or EStream branch.
Execute the product from de.pgestream.odysseus.studio (so all necessary bundles are automatically loaded).
PMML Operators
ProtocolHandler:
To access a PMML document you can assign 'PMML' as protocol handler. There are no other parameters necessary and the PMML model has port 0 as an output. You can use e.g. Kafka as a transport handler to reload PMML documents during runtime of queries.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
models = ACCESS({ source='pmml-data', wrapper='GenericPull', transport='HTTP', protocol='PMML', dataHandler='Tuple', options=[ ['uri', 'http://dmg.org/pmml/pmml_examples/rattle_pmml_examples/AuditKMeans.xml'], ['method', 'get'], ['scheduler.delay', '100000'], ['fireOnce', 'true'] ], schema=[ ['models', 'Object'], ] }) |
Operator:
A PMML document can potentially contain more than one mining models and is therefore outside of the Transporthandler. After the procurement of models you can choose or run a model by name with the operator PMML_EVAL.
...