Passing custom extension to built in mydbr result handler

(9 posts) (2 voices)
  1. maron, Member

    I'm writing an extension that pulls data from the google analytics api based on urls in my database.

    My intention is to use the Ext_AnalyticsRow function and modify some of the columns (replace ga:/url_pat with visits from analytics).

    Can I then pass the modified result set back to one of mydbr built in result handlers, for example graph or table result handler for output?

  2. myDBR Team, Key Master

    Hi,
    this is unfortunately not currently possible. We can take a look if there is something that could be done here.

    --
    myDBR Team

  3. maron, Member

    Hi.
    Thanks for the quick reply, please do. I would be very interested in this feature.

    The functionality I'm looking for could also be a column based extension / parser - where a certain column would be parsed through a specific extension / parser - similar to the formatting options.

    Thanks, Maron

  4. myDBR Team, Key Master

    What would be the use case for column based parser? Could you give an example?

    --
    myDBR Team

  5. maron, Member

    My example would be where I would have a statement selecting products, with various information and url paths. The url path I would pass through the google analytics parser, and when defining the parser I would provide the column as the first parameter, which I will handle as a filter in my extension - something like the below - based on dbr.ga triggering the column extension

    select 'dbr.ga', 'page_views','<ga:id>,'<ga:metric>','<start-date>','<end-date>'; select sku, product_name, sum(row_total), url_path as pageviews, count(qty) as sold_items, sold_items / pageviews as conversion_rate from order_items where ...

    In the above example the intention would be to replace the url_path with the pageviews from google analytics for that url_path.

    The initial idea of preprocessing the data before it's passed to the table parser might be more flexible though - but I can see various use cases for both

  6. maron, Member

    Hi again.

    Did you have any further look into the above?

    Regards,
    Maron

  7. myDBR Team, Key Master

    Hi,
    we have some changes in the 4.0 which will make it easier for us to do this. We'll take a look at it.

    --
    myDBR Team

  8. myDBR Team, Key Master

    Maron,
    the latest build includes a new type of extension: a passtrhough. It will allow for you to create an extension that takes myDBR result set, modifies the data any way you like and then pass the modified result back to myDBR.

    An example report would look like this:

    select 'dbr.chart', 'pie', 'test';
    select 'dbr.passthrough'; select ..
    from mydata;

    The passthrough extension would get the data from the query, and the chart would be drawn from the output of the extension.

    There is an example extension included in the build. Take a look at it. If you need additional info, let us know. We'll add the feature to the next documentation update.

    --
    myDBR Team

  9. maron, Member

    Very useful thanks - working on an implementation of this in one of my reports this week.


Reply

You must log in to post.