Created
August 29, 2013 16:15
-
-
Save ToeJamson/6380179 to your computer and use it in GitHub Desktop.
Why Business Intelligence Tools Need a Real-time Service Provider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELIMITER $$ | |
| CREATE PROCEDURE push_message | |
| (p1 DOUBLE, | |
| p2 DOUBLE, | |
| p3 BIGINT) | |
| BEGIN | |
| DECLARE cmd CHAR(255); | |
| DECLARE result CHAR(255); | |
| SET cmd = CONCAT('curl https://pubsub.pubnub.com/publish/demo/demo/0/mysql_triggers/0/%22',p1, ',' ,p2, ',' ,p3,'%22'); | |
| SET result = sys_eval(cmd); | |
| END$$; | |
| NOTE: Make sure your PROCEDURE types are correct DOUBLE or VARCHAR or TEXT. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TRIGGER push_message_trigger AFTER INSERT ON your_table_name_here | |
| FOR EACH ROW | |
| CALL push_message(NEW.Column1, NEW.Column2, NEW.Column3); | |
| NOTE: Make sure to include the columns you need here in your push message. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment