keenex v1.0.1 Keenex
This module defines the Keenex API
looks for application variables in the :keenex
app named :project_id
, :write_key
, :read_key
or if any of those aren’t available, it looks for environment variables named KEEN_PROJECT_ID
, KEEN_WRITE_KEY
, KEEN_READ_KEY
Add it to your applications:
def application do
[applications: [:keenex]]
end
and then call functions
{status, response} = Keenex.add_event("dinner.tacos", %{test: "tacos"})
status is either :ok
or :error
response is a Map converted from the json response from Keen.
Info about the contents can be found here
Summary
Functions
Publishes an event into the event collection
Publishes multiple events to one or more event collections
Calculate the average value for a target property, among all events in a collection matching given criteria
Returns the number of events in a collection matching the given criteria
Return the number of events with unique values, for a target property in a collection matching given criteria
Creates an extraction request for full-form event data with all property values
Returns the number of unique actors that successfully (or unsuccessfully) make it through a series of steps
Returns schema for a single event collection
Returns schema for all event collections
Return the maximum numeric value for a target property, among all events in a collection matching given criteria
Calculate the median value for a target property, among all events in a collection matching given criteria
Return the minimum numeric value for a target property, among all events in a collection matching given criteria
Runs multiple types of analyses over the same data
Calculate a specified percentile value for a target property, among all events in a collection matching given criteria
Return a list of unique property values for a target property, among all events in a collection matching given criteria
Starts Keenex app
Calculate the sum of all numeric values for a target property, among all events in a collection matching given criteria
Types
Functions
Specs
add_event(binary, map) :: Keenex.response
Publishes an event into the event collection
Keenex.add_event("dinner.tacos", %{data: "data"})
Specs
add_events(map) :: Keenex.response
Publishes multiple events to one or more event collections
Keenex.add_events(%{event_collection1: [%{data: "data"}], event_collection2: [%{data: "data"}, %{more_data: "data"}]})
Specs
average(binary, binary, map) :: Keenex.response
Calculate the average value for a target property, among all events in a collection matching given criteria.
Specs
count(binary, map) :: Keenex.response
Returns the number of events in a collection matching the given criteria
Specs
count_unique(binary, binary, map) :: Keenex.response
Return the number of events with unique values, for a target property in a collection matching given criteria
Specs
extraction(binary, map) :: Keenex.response
Creates an extraction request for full-form event data with all property values.
Returns the number of unique actors that successfully (or unsuccessfully) make it through a series of steps
Specs
inspect(binary) :: Keenex.response
Returns schema for a single event collection
Keenex.inspect("dinner.tacos")
Specs
inspect_all :: Keenex.response
Returns schema for all event collections
Keenex.inspect_all()
Specs
maximum(binary, binary, map) :: Keenex.response
Return the maximum numeric value for a target property, among all events in a collection matching given criteria.
Specs
median(binary, binary, map) :: Keenex.response
Calculate the median value for a target property, among all events in a collection matching given criteria.
Specs
minimum(binary, binary, map) :: Keenex.response
Return the minimum numeric value for a target property, among all events in a collection matching given criteria.
Specs
multi_analysis(binary, map, map) :: Keenex.response
Runs multiple types of analyses over the same data
Specs
percentile(binary, binary, integer, map) :: Keenex.response
Calculate a specified percentile value for a target property, among all events in a collection matching given criteria.
Specs
select_unique(binary, binary, map) :: Keenex.response
Return a list of unique property values for a target property, among all events in a collection matching given criteria.
Starts Keenex app.
Looks for application variables in the :keenex
app named :project_id
, :write_key
, :read_key
or if any of those aren’t available, it looks for environment variables named KEEN_PROJECT_ID
, KEEN_WRITE_KEY
, KEEN_READ_KEY
Specs
sum(binary, binary, map) :: Keenex.response
Calculate the sum of all numeric values for a target property, among all events in a collection matching given criteria.