Skip to content

Commit

Permalink
[AP-345] Do not denest tap-mixpanel stream properties (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
koszti authored Oct 29, 2020
1 parent 86d8380 commit 52ad07f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/connectors/taps/mixpanel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ Example YAML for ``tap-mixpanel``:
project_timezone: "Europe/London" # Time zone in which integer date times are stored. The project timezone
# may be found in the project settings in the Mixpanel console.
user_agent: "tap-mixpanel <[email protected]>" # Optional: Process and email for API logging purposes.
#denest_properties: "false" # Optional: Do not denest JSON responses in `export` and `engage` streams
# to avoid very wide tables. If denesting is disabled then responses are
# loaded into one JSON column in the target.
# Default denest_properties is false.
#export_events: # Optional: List of event names to export
# - event_one
Expand Down
4 changes: 4 additions & 0 deletions pipelinewise/cli/samples/tap_mixpanel.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ db_conn:
project_timezone: "Europe/London" # Time zone in which integer date times are stored. The project timezone
# may be found in the project settings in the Mixpanel console.
user_agent: "tap-mixpanel <[email protected]>" # Optional: Process and email for API logging purposes.
#denest_properties: "false" # Optional: Do not denest JSON responses in `export` and `engage` streams
# to avoid very wide tables. If denesting is disabled then responses are
# loaded into one JSON column in the target.
# Default denest_properties is false.

#export_events: # Optional: List of event names to export
# - event_one
Expand Down
6 changes: 5 additions & 1 deletion pipelinewise/cli/tap_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,11 @@ def get_tap_properties(tap=None, temp_dir=None):
'default_data_flattening_max_level': 0
},
'tap-mixpanel': {
'tap_config_extras': {},
'tap_config_extras': {
'user_agent': 'PipelineWise - Tap Mixpanel',
# Do not denest properties by default
'denest_properties': tap.get('db_conn', {}).get('denest_properties', 'false') if tap else None
},
'tap_stream_id_pattern': '{{table_name}}',
'tap_stream_name_pattern': '{{table_name}}',
'tap_catalog_argument': '--catalog',
Expand Down
2 changes: 1 addition & 1 deletion singer-connectors/tap-mixpanel/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pipelinewise-tap-mixpanel==1.0.1
pipelinewise-tap-mixpanel==1.2.0

0 comments on commit 52ad07f

Please sign in to comment.