View Source Plausible.DataMigration.AcquisitionChannel (Plausible v0.0.1)
Creates dictionaries and functions to calculate acquisition channel in ClickHouse
Creates acquisition_channel
columns in events_v2
and sessions_v2
tables.
Run via Plausible.DataMigration.AcquisitionChannel.run(options)
Options:
add_column
- creates the materialized column. Already done in a migrationupdate_column
- Updates the column definition to use new function definitions. Defaults to true. Note that historical data is only updated ifbackfill
is set to true or if it was never materialized.backfill
- backfills the data for the column. Speeds up calculations on historical data.
SQL files available at: priv/data_migrations/AcquisitionChannel/sql
Summary
Functions
Runs a single SQL query in a file.
Valid options:
quiet
- reduces output from running the SQLparams
- List of query parameters.query_options
- passed to Repo.query
Runs multiple SQL queries from a single file.
Note that each query must be separated by semicolons.