In this file, data is pushed to an MSSQL database.
Download:
description:> Sample MSSQL service commissioning filemetadata:name:MSSQL push serviceicon:https://www.cybus.io/wp-content/uploads/2017/10/for-whom1.svgprovider:cybushomepage:https://www.cybus.ioversion:1.0.0parameters:mssqlHost:type:stringdefault:172.17.0.1mssqlPort:type:integerdefault:1433mssqlUser:type:stringdefault:samssqlPassword:type:stringdefault:SomeLongSecurePassw0rdmssqlDatabase:type:stringdefault:tempdbresources:mssqlDB:type:Cybus::Containerproperties:image:mcr.microsoft.com/mssql/serverports: - 1433:1433/tcpenvironment:SA_PASSWORD:'SomeLongSecurePassw0rd'ACCEPT_EULA:'Y'mssqlConnection:type:Cybus::Connectionproperties:protocol:Mssqlconnection:host:!refmssqlHostport:!refmssqlPortusername:!refmssqlUserpassword:!refmssqlPassworddatabase:!refmssqlDatabasemssqlQuery2:type:Cybus::Endpointproperties:protocol:Mssqlconnection:!refmssqlConnectionwrite:# Here we use the placeholder @someValue. The protocol driver will insert# the value from the input JSON message under the key someValuequery:'INSERT INTO machine (powerlevel, state, timestamp) VALUES (@powerlevel, @state, @timestamp)'mapping:type:Cybus::Mappingproperties:mappings: - subscribe:topic:'machine-state'publish:endpoint:!refmssqlQuery2