Can setting up of push notifications interrupt accessibility of reports?

(4 posts) (2 voices)

Tags:

No tags yet.

  1. arnas1589, Member

    Hey guys, just as the title says I'm wondering if any wrong setting in user/extension_init.php could mess something up withing whole installation. Is there any risk in the process that accessibility to reports could be halted?

    I would like to set up push notifications for other users but documentation and examples to do so is quite limited, it's the top priority that other functionality stays up regardless of any changes that I do so we are a bit hesitant to start.

    Is there anything particular I should keep in mind, perhaps any tips or examples?

    EDIT:
    Thought that an example of what we are trying to achieve might be useful:
    Our goal is to set a push notifications to multiple users when a certain parameter within our reports increases more than usual within given time fame. Thus keeping us informed on sudden changes.

    Thanks!

  2. myDBR Team, Key Master

    The user/extension_init.php is a file where you can set up any initialization values for your extension (usernames/passwords etc.). It is a PHP file that is included when a report is run, so make sure you have no errors in the code.

    What is the part of the documentation where you would like to see improved?

    --
    myDBR Team

  3. arnas1589, Member

    Examples of integrating push notifications into actual report would be amazing. In documentation there is some syntax examples but that's pretty much it. I have tried to use calculated values of report to trigger an notification but that didn't work because of some syntax error, examples as such would be great!

    Perhaps you could assist with my use case?
    Tt would be something like this.

    Select sum(columnA) AS "sum_A", count(columnB) AS "count_B", sum(columnC) AS "sum_C",

    CASE WHEN count(columnB)>0 THEN -- PUSH NOTIFICATION HERE END

    FROM TableA

  4. myDBR Team, Key Master

    To first determine if your parameter is out of range, capture it to a variable so that you can use it. Then compare it and invoke the push notification if the threshold is reached. Following uses MySQL/MariaDB syntax:

    declare v_sum_A int;
    declare v_count_B int;
    declare v_sum_C int; select
    sum(columnA) AS "sum_A",
    count(columnB) AS "count_B",
    sum(columnC) AS "sum_C"
    into
    v_sum_A, v_count_B, v_sum_C
    from yourtable; if (v_count_B>0) then
    select 'dbr.push';
    select 'dbr.push.sender', 'Pushbullet'; select 'receiver@mail.com', concat('The count of B is ', v_count_B);
    end if;

    --
    myDBR Team


Reply

You must log in to post.