def src_to_badreferrer(g, data_src, node, options): only404s = jsapi.EqualsFilter(g, field= 1, targ=404) return g.chain([data_src, only404s, jsapi.Project(g, 5), jsapi.Project(g, 4), \ jsapi.Project(g, 2), jsapi.Project(g, 1), jsapi.URLToDomain(g, 1)])
def src_to_bad_doms(g, data_src, node, options): return g.chain([data_src, jsapi.Project(g, 5), jsapi.Project(g, 4), \ jsapi.Project(g, 3), jsapi.URLToDomain(g, 2)])
def src_to_bw(g, data_src, node, options): hostname_extend_op = jsapi.ExtendOperator(g, "s", ["${HOSTNAME}"]) return g.chain([data_src, jsapi.Project(g, 5), jsapi.Project(g, 4), \ jsapi.Project(g, 1), jsapi.Project(g, 1), hostname_extend_op])
def drop_time_from_doms(, data_src, node, options): return g.chain([raw_cube_sub, jsapi.Project(g, 4), jsapi.Project(g, 3), jsapi.Project(g, 1), jsapi.Project(g, 0)] )
def src_to_domain(g, data_src, node, options): url2dom = jsapi.URLToDomain(g, 2) g.chain([data_src, jsapi.Project(g, 3), url2dom]) return url2dom
def src_to_quant(g, raw_cube_sub, node, options): to_summary1 = jsapi.ToSummary(g, field=2, size=5000) to_summary2 = jsapi.ToSummary(g, field=3, size=5000) return g.chain([raw_cube_sub, jsapi.Project(g, 3), jsapi.Project(g, 2), to_summary1, to_summary2] )