Skip to content

Commit

Permalink
[ci skip] Deployed 73b8696 with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Nov 21, 2023
1 parent a6a5b72 commit cf68943
Show file tree
Hide file tree
Showing 12 changed files with 1,716 additions and 1,116 deletions.
158 changes: 79 additions & 79 deletions mozfun/bits28/index.html

Large diffs are not rendered by default.

386 changes: 193 additions & 193 deletions mozfun/event_analysis/index.html

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions mozfun/glean/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2960,11 +2960,11 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#legacy_compatible_experiments-udf" class="md-nav__link">
legacy_compatible_experiments (UDF)
<a href="#timespan_seconds-udf" class="md-nav__link">
timespan_seconds (UDF)
</a>

<nav class="md-nav" aria-label="legacy_compatible_experiments (UDF)">
<nav class="md-nav" aria-label="timespan_seconds (UDF)">
<ul class="md-nav__list">

<li class="md-nav__item">
Expand All @@ -2980,11 +2980,11 @@
</li>

<li class="md-nav__item">
<a href="#timespan_seconds-udf" class="md-nav__link">
timespan_seconds (UDF)
<a href="#legacy_compatible_experiments-udf" class="md-nav__link">
legacy_compatible_experiments (UDF)
</a>

<nav class="md-nav" aria-label="timespan_seconds (UDF)">
<nav class="md-nav" aria-label="legacy_compatible_experiments (UDF)">
<ul class="md-nav__list">

<li class="md-nav__item">
Expand Down Expand Up @@ -3522,11 +3522,11 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#legacy_compatible_experiments-udf" class="md-nav__link">
legacy_compatible_experiments (UDF)
<a href="#timespan_seconds-udf" class="md-nav__link">
timespan_seconds (UDF)
</a>

<nav class="md-nav" aria-label="legacy_compatible_experiments (UDF)">
<nav class="md-nav" aria-label="timespan_seconds (UDF)">
<ul class="md-nav__list">

<li class="md-nav__item">
Expand All @@ -3542,11 +3542,11 @@
</li>

<li class="md-nav__item">
<a href="#timespan_seconds-udf" class="md-nav__link">
timespan_seconds (UDF)
<a href="#legacy_compatible_experiments-udf" class="md-nav__link">
legacy_compatible_experiments (UDF)
</a>

<nav class="md-nav" aria-label="timespan_seconds (UDF)">
<nav class="md-nav" aria-label="legacy_compatible_experiments (UDF)">
<ul class="md-nav__list">

<li class="md-nav__item">
Expand Down Expand Up @@ -3618,30 +3618,30 @@

<h1 id="glean">glean</h1>
<p>Functions for working with Glean data.</p>
<h2 id="legacy_compatible_experiments-udf">legacy_compatible_experiments (UDF)</h2>
<p>Formats a Glean experiments field into a Legacy Telemetry experiments field by dropping the extra information that Glean collects</p>
<p>This UDF transforms the <code>ping_info.experiments</code> field from Glean pings into the format for <code>experiments</code> used by Legacy Telemetry pings. In particular, it drops the exta information that Glean pings collect.</p>
<p>If you need to combine Glean data with Legacy Telemetry data, then you can use this UDF to transform a Glean experiments field into the structure of a Legacy Telemetry one.</p>
<h3 id="parameters">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>ping_info__experiments ARRAY&lt;STRUCT&lt;key STRING, value STRUCT&lt;branch STRING, extra STRUCT&lt;type STRING, enrollment_id STRING&gt;&gt;&gt;&gt;
</code></pre></div>
<p><strong>OUTPUTS</strong></p>
<div class="highlight"><pre><span></span><code>ARRAY&lt;STRUCT&lt;key STRING, value STRING&gt;&gt;
</code></pre></div>
<p><a href="https://github.com/mozilla/bigquery-etl/blob/generated-sql/sql//mozfun/glean/legacy_compatible_experiments">Source</a> | <a href="https://github.com/mozilla/bigquery-etl/edit/generated-sql/sql//mozfun/glean/legacy_compatible_experiments/metadata.yaml">Edit</a></p>
<h2 id="timespan_seconds-udf">timespan_seconds (UDF)</h2>
<p>Returns the number of seconds represented by a Glean timespan struct,
rounded down to full seconds.</p>
<p>See <a href="https://mozilla.github.io/glean/book/user/metrics/timespan.html">https://mozilla.github.io/glean/book/user/metrics/timespan.html</a></p>
<h3 id="parameters_1">Parameters</h3>
<h3 id="parameters">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>timespan STRUCT&lt;time_unit STRING, value INT64&gt;
</code></pre></div>
<p><strong>OUTPUTS</strong></p>
<div class="highlight"><pre><span></span><code>INT64
</code></pre></div>
<p><a href="https://github.com/mozilla/bigquery-etl/blob/generated-sql/sql//mozfun/glean/timespan_seconds">Source</a> | <a href="https://github.com/mozilla/bigquery-etl/edit/generated-sql/sql//mozfun/glean/timespan_seconds/metadata.yaml">Edit</a></p>
<h2 id="legacy_compatible_experiments-udf">legacy_compatible_experiments (UDF)</h2>
<p>Formats a Glean experiments field into a Legacy Telemetry experiments field by dropping the extra information that Glean collects</p>
<p>This UDF transforms the <code>ping_info.experiments</code> field from Glean pings into the format for <code>experiments</code> used by Legacy Telemetry pings. In particular, it drops the exta information that Glean pings collect.</p>
<p>If you need to combine Glean data with Legacy Telemetry data, then you can use this UDF to transform a Glean experiments field into the structure of a Legacy Telemetry one.</p>
<h3 id="parameters_1">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>ping_info__experiments ARRAY&lt;STRUCT&lt;key STRING, value STRUCT&lt;branch STRING, extra STRUCT&lt;type STRING, enrollment_id STRING&gt;&gt;&gt;&gt;
</code></pre></div>
<p><strong>OUTPUTS</strong></p>
<div class="highlight"><pre><span></span><code>ARRAY&lt;STRUCT&lt;key STRING, value STRING&gt;&gt;
</code></pre></div>
<p><a href="https://github.com/mozilla/bigquery-etl/blob/generated-sql/sql//mozfun/glean/legacy_compatible_experiments">Source</a> | <a href="https://github.com/mozilla/bigquery-etl/edit/generated-sql/sql//mozfun/glean/legacy_compatible_experiments/metadata.yaml">Edit</a></p>
<h2 id="parse_datetime-udf">parse_datetime (UDF)</h2>
<p>Parses a Glean datetime metric string value as a BigQuery timestamp.</p>
<p>See <a href="https://mozilla.github.io/glean/book/reference/metrics/datetime.html">https://mozilla.github.io/glean/book/reference/metrics/datetime.html</a></p>
Expand Down
102 changes: 71 additions & 31 deletions mozfun/hist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2980,8 +2980,28 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#extract_keyed_hist_sum-udf" class="md-nav__link">
extract_keyed_hist_sum (UDF)
<a href="#string_to_json-udf" class="md-nav__link">
string_to_json (UDF)
</a>

<nav class="md-nav" aria-label="string_to_json (UDF)">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#parameters" class="md-nav__link">
Parameters
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
<a href="#extract_histogram_sum-udf" class="md-nav__link">
extract_histogram_sum (UDF)
</a>

</li>
Expand Down Expand Up @@ -3449,8 +3469,28 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#extract_keyed_hist_sum-udf" class="md-nav__link">
extract_keyed_hist_sum (UDF)
<a href="#string_to_json-udf" class="md-nav__link">
string_to_json (UDF)
</a>

<nav class="md-nav" aria-label="string_to_json (UDF)">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#parameters" class="md-nav__link">
Parameters
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
<a href="#extract_histogram_sum-udf" class="md-nav__link">
extract_histogram_sum (UDF)
</a>

</li>
Expand All @@ -3472,27 +3512,9 @@

<h1 id="hist">hist</h1>
<p>Functions for working with string encodings of histograms from desktop telemetry.</p>
<h2 id="extract_keyed_hist_sum-udf">extract_keyed_hist_sum (UDF)</h2>
<p>Sum of a keyed histogram, across all keys it contains.</p>
<h1 id="extract-keyed-histogram-sum">Extract Keyed Histogram Sum</h1>
<p>Takes a keyed histogram and returns a single number:
the sum of all keys it contains. The expected input
type is <code>ARRAY&lt;STRUCT&lt;key STRING, value STRING&gt;&gt;</code></p>
<p>The return type is <code>INT64</code>.</p>
<p>The <code>key</code> field will be ignored, and
the `value is expected to be the compact
histogram representation.</p>
<h3 id="parameters">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>keyed_histogram ARRAY&lt;STRUCT&lt;key STRING, value STRING&gt;&gt;
</code></pre></div>
<p><strong>OUTPUTS</strong></p>
<div class="highlight"><pre><span></span><code>INT64
</code></pre></div>
<p><a href="https://github.com/mozilla/bigquery-etl/blob/generated-sql/sql//mozfun/hist/extract_keyed_hist_sum">Source</a> | <a href="https://github.com/mozilla/bigquery-etl/edit/generated-sql/sql//mozfun/hist/extract_keyed_hist_sum/metadata.yaml">Edit</a></p>
<h2 id="string_to_json-udf">string_to_json (UDF)</h2>
<p>Convert a histogram string (in JSON or compact format) to a full histogram JSON blob.</p>
<h3 id="parameters_1">Parameters</h3>
<h3 id="parameters">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>input STRING
</code></pre></div>
Expand All @@ -3503,7 +3525,7 @@ <h3 id="parameters_1">Parameters</h3>
<h2 id="extract_histogram_sum-udf">extract_histogram_sum (UDF)</h2>
<p>Extract a histogram sum from a JSON str representation</p>
<h1 id="extract-histogram-sum">Extract Histogram Sum</h1>
<h3 id="parameters_2">Parameters</h3>
<h3 id="parameters_1">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>input STRING
</code></pre></div>
Expand All @@ -3513,7 +3535,7 @@ <h3 id="parameters_2">Parameters</h3>
<p><a href="https://github.com/mozilla/bigquery-etl/blob/generated-sql/sql//mozfun/hist/extract_histogram_sum">Source</a> | <a href="https://github.com/mozilla/bigquery-etl/edit/generated-sql/sql//mozfun/hist/extract_histogram_sum/metadata.yaml">Edit</a></p>
<h2 id="percentiles-udf">percentiles (UDF)</h2>
<p>Given histogram and list of percentiles,calculate what those percentiles are for the histogram. If the histogram is empty, returns NULL.</p>
<h3 id="parameters_3">Parameters</h3>
<h3 id="parameters_2">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>histogram ANY TYPE, percentiles ARRAY&lt;FLOAT64&gt;
</code></pre></div>
Expand Down Expand Up @@ -3548,7 +3570,7 @@ <h2 id="extract-udf">extract (UDF)</h2>
<span class="w"> </span><span class="n">mozfun</span><span class="p">.</span><span class="n">hist</span><span class="p">.</span><span class="k">extract</span><span class="p">(</span><span class="s1">&#39;5&#39;</span><span class="p">).</span><span class="k">sum</span>
<span class="c1">-- 5</span>
</code></pre></div>
<h3 id="parameters_4">Parameters</h3>
<h3 id="parameters_3">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>input STRING
</code></pre></div>
Expand All @@ -3558,7 +3580,7 @@ <h3 id="parameters_4">Parameters</h3>
<p><a href="https://github.com/mozilla/bigquery-etl/blob/generated-sql/sql//mozfun/hist/extract">Source</a> | <a href="https://github.com/mozilla/bigquery-etl/edit/generated-sql/sql//mozfun/hist/extract/metadata.yaml">Edit</a></p>
<h2 id="normalize-udf">normalize (UDF)</h2>
<p>Normalize a histogram. Set sum to 1, and normalize to 1 the histogram bucket counts.</p>
<h3 id="parameters_5">Parameters</h3>
<h3 id="parameters_4">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>histogram STRUCT&lt;bucket_count INT64, `sum` INT64, histogram_type INT64, `range` ARRAY&lt;INT64&gt;, `values` ARRAY&lt;STRUCT&lt;key INT64, value INT64&gt;&gt;&gt;
</code></pre></div>
Expand All @@ -3573,7 +3595,7 @@ <h2 id="merge-udf">merge (UDF)</h2>
<li>The count will be summed</li>
<li>Other fields will take the mode_last</li>
</ul>
<h3 id="parameters_6">Parameters</h3>
<h3 id="parameters_5">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>histogram_list ANY TYPE
</code></pre></div>
Expand All @@ -3582,7 +3604,7 @@ <h2 id="count-udf">count (UDF)</h2>
<p>Given histogram h, return the count of all measurements across all buckets.</p>
<p>Given histogram h, return the count of all measurements across all buckets.</p>
<p>Extracts the values from the histogram and sums them, returning the total_count.</p>
<h3 id="parameters_7">Parameters</h3>
<h3 id="parameters_6">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>histogram STRING
</code></pre></div>
Expand All @@ -3594,7 +3616,7 @@ <h2 id="mean-udf">mean (UDF)</h2>
<p>Given histogram h, return floor(mean) of the measurements in the bucket.
That is, the histogram sum divided by the number of measurements taken.</p>
<p><a href="https://github.com/mozilla/telemetry-batch-view/blob/ea0733c/src/main/scala/com/mozilla/telemetry/utils/MainPing.scala#L292-L307">https://github.com/mozilla/telemetry-batch-view/blob/ea0733c/src/main/scala/com/mozilla/telemetry/utils/MainPing.scala#L292-L307</a></p>
<h3 id="parameters_8">Parameters</h3>
<h3 id="parameters_7">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>histogram ANY TYPE
</code></pre></div>
Expand All @@ -3609,11 +3631,29 @@ <h2 id="threshold_count-udf">threshold_count (UDF)</h2>
not be counted for a threshold of 2. Use threshold that are not bucket
boundaries with caution.</p>
<p><a href="https://github.com/mozilla/telemetry-batch-view/blob/ea0733c/src/main/scala/com/mozilla/telemetry/utils/MainPing.scala#L213-L239">https://github.com/mozilla/telemetry-batch-view/blob/ea0733c/src/main/scala/com/mozilla/telemetry/utils/MainPing.scala#L213-L239</a></p>
<h3 id="parameters_9">Parameters</h3>
<h3 id="parameters_8">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>histogram STRING, threshold INT64
</code></pre></div>
<p><a href="https://github.com/mozilla/bigquery-etl/blob/generated-sql/sql//mozfun/hist/threshold_count">Source</a> | <a href="https://github.com/mozilla/bigquery-etl/edit/generated-sql/sql//mozfun/hist/threshold_count/metadata.yaml">Edit</a></p>
<h2 id="extract_keyed_hist_sum-udf">extract_keyed_hist_sum (UDF)</h2>
<p>Sum of a keyed histogram, across all keys it contains.</p>
<h1 id="extract-keyed-histogram-sum">Extract Keyed Histogram Sum</h1>
<p>Takes a keyed histogram and returns a single number:
the sum of all keys it contains. The expected input
type is <code>ARRAY&lt;STRUCT&lt;key STRING, value STRING&gt;&gt;</code></p>
<p>The return type is <code>INT64</code>.</p>
<p>The <code>key</code> field will be ignored, and
the `value is expected to be the compact
histogram representation.</p>
<h3 id="parameters_9">Parameters</h3>
<p><strong>INPUTS</strong></p>
<div class="highlight"><pre><span></span><code>keyed_histogram ARRAY&lt;STRUCT&lt;key STRING, value STRING&gt;&gt;
</code></pre></div>
<p><strong>OUTPUTS</strong></p>
<div class="highlight"><pre><span></span><code>INT64
</code></pre></div>
<p><a href="https://github.com/mozilla/bigquery-etl/blob/generated-sql/sql//mozfun/hist/extract_keyed_hist_sum">Source</a> | <a href="https://github.com/mozilla/bigquery-etl/edit/generated-sql/sql//mozfun/hist/extract_keyed_hist_sum/metadata.yaml">Edit</a></p>



Expand Down
Loading

0 comments on commit cf68943

Please sign in to comment.