airflow.providers.segment.operators.segment_track_event

Module Contents

Classes

SegmentTrackEventOperator

Send Track Event to Segment for a specified user_id and event.

class airflow.providers.segment.operators.segment_track_event.SegmentTrackEventOperator(*, user_id, event, properties=None, segment_conn_id='segment_default', segment_debug_mode=False, **kwargs)[source]

Bases: airflow.models.BaseOperator

Send Track Event to Segment for a specified user_id and event.

Parameters
  • user_id (str) – The ID for this user in your database. (templated)

  • event (str) – The name of the event you’re tracking. (templated)

  • properties (dict | None) – A dictionary of properties for the event. (templated)

  • segment_conn_id (str) – The connection ID to use when connecting to Segment.

  • segment_debug_mode (bool) – Determines whether Segment should run in debug mode. Defaults to False

template_fields: Sequence[str] = ('user_id', 'event', 'properties')[source]
ui_color = '#ffd700'[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?