use it as an extaction layor for an existing SQL instance by issuing sql commands and interpreting the results into a JSON log output and output to targit {name to be determined, I know it starts with the letter x and released in a later version of their bi tool; the whole reason I'm implementing it in a data center with the upgraded release version so all the new features unlock as part of the migration] which is designed to show multi dimensional views of predefined unputs.
In troubleshooting large sql tables I often start by query with a
Code: Select all
SELECT TOP 1 * from PBAInstanceTable
which returns column names of the table that is used to define a product model which has configuration options for a product like
Kent which can be seen in the
configuration engine.
Options like vaulted, or finish, length, shade are records in sql using referencial number. I would want another SQL statement to return the collection of these configurations. By the way it will return pre and post configuration engine variables so you will actually need to filter on that as well if you want to return a single configuration detail set.
Code: Select all
SELECT * from PBATABLEINSTANCE WHERE INVENTTRANSID = {#instance_variable}
I would want to have JSON logging like this
Code: Select all
{ _id: BSON ,
query: "SELECT TOP 1 * from PBAInstanceTable",
headers: "INVENTTRANSID, variable, value"
rows: "1, pba_model_number, 1"
},
{_id: BSON,
query: "SELECT * from PBATABLEINSTANCE WHERE INVENTTRANSID = 3245",
rows: {
3245, pba_model_number, 25
3245, finish, "old_brass",
3245, shade, "Mission Satin Etched Flared Shade$35.00"
3245, upshade, "Mission Satin Etched Flared Gas-Style Shade$50.00"
3245, lights, 8
3245, lengths, 36
3245, socket, :turnkey
3245, vaulted, false
}
Asynchronous process at a higher level language can parse this document and run an update statement that appends to the model embedded document like
Code: Select all
db.pba_instance.find({_id: bson}).shade
Can be queried to return the string
Code: Select all
db.pba_instance.update({_id: bson} , $set : {shade : "Mission Satin Etched Flared Shade$35.00", state: "processed"}})
The state is the addition of statemachine which allows the document processing state to follow the document. It allows built in error handling that happens within the document itself. MongoDB is a great thing to add features like statemachine for some documents, and a capped collection so those that were old fall off and those that were in error which have likely been fixed by the time the error drops off makes for efficient troubleshooting with built in analytics.
For example your state machine might be inspecting the model for the product and validating that all of the required config variables exist and if it detects an anomoly against the model it can set the state to
Code: Select all
state: "expecting value for pba_model 25 variables [priority, gu24_bulb, gu24_socket_count], variables out of range []"