Code Monkey home page Code Monkey logo

hive-funnel-udf's Issues

The results are inaccurate

When the dataset is small, the results are accurate, but when the amount of data becomes larger, the results of the funnel function become inaccurate

Single filter funnels shouldn't need arrays

For example:

funnel(action, timestamp, array('signup_page', 'email_signup'),
                          array('confirm_button'),
                          array('submit_button')

Should have support to write as:

funnel(action, timestamp, array('signup_page', 'email_signup'),
                          'confirm_button',
                          'submit_button')

same user had different result

os environment
hive version:
Hive 1.1.0-cdh5.5.2
cdh version:
cdh 5.5.2

when i query one day like:

select ouid, funnel(tag1, game_time, array('activity'), array('yaozujianglin'), array('huangjinyuchang')) as funnel from sscq.odl_act_detail_info_sscq_qq where ds = '2016-12-17' group by ouid order by ouid asc

one ouid is :
000000000000000000000000001EC76C [0,0,0]

but i only query one id:
select ouid, funnel(tag1, game_time, array('activity'), array('yaozujianglin'), array('huangjinyuchang')) as funnel from sscq.odl_act_detail_info_sscq_qq where ds = '2016-12-17' and ouid = '000000000000000000000000001EC76C' group by ouid order by ouid asc
result is different.
000000000000000000000000001EC76C [1,0,0]

Convert stored funnels into integers

Stored funnels can be converted into integers, where 0 is match to funnel 0, 1 is match to funnel 1, etc.

This will greatly reduce the storage size of the funnels, speeding up all later steps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.