-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from TasmanAnalytics/feature/mvp-package
Feature/mvp package
- Loading branch information
Showing
38 changed files
with
4,507 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This CODEOWNERS file defines ownership of specific folders within this repo | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, | ||
# these teams/reviewers will be requested for | ||
# review when someone opens a pull request. | ||
* @TasmanAnalytics/analytics-engineering | ||
|
||
|
||
# All files in the below directory and any of its | ||
# subdirectories will be owned by the specified team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
target/ | ||
dbt_modules/ | ||
dbt_packages/ | ||
logs/ | ||
.venv | ||
.env | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[sqlfluff] | ||
dialect = snowflake | ||
templater = dbt | ||
exclude_rules = structure.column_order, convention.not_equal, references.keywords, aliasing.unused | ||
max_line_length = 500 | ||
|
||
[sqlfluff:templater:dbt] | ||
project_dir = ./ | ||
profile = tasman_integration_tests | ||
|
||
[sqlfluff:templater:jinja] | ||
apply_dbt_builtins = True | ||
|
||
[sqlfluff:indentation] | ||
indented_on_contents = False | ||
template_blocks_indent = False | ||
tab_space_size = 4 | ||
indent_unit = space | ||
|
||
[sqlfluff:rules:capitalisation.keywords] | ||
# Keywords | ||
capitalisation_policy = lower | ||
|
||
[sqlfluff:rules:capitalisation.identifiers] | ||
# Unquoted identifiers | ||
extended_capitalisation_policy = lower | ||
|
||
[sqlfluff:rules:layout.long_lines] | ||
# Line length | ||
ignore_comment_lines = True | ||
ignore_comment_clauses = True | ||
|
||
[sqlfluff:rules:capitalisation.functions] | ||
# Function names | ||
extended_capitalisation_policy = lower | ||
|
||
[sqlfluff:rules:capitalisation.literals] | ||
# Null & Boolean Literals | ||
capitalisation_policy = lower | ||
|
||
[sqlfluff:rules:ambiguous.column_references] | ||
# GROUP BY/ORDER BY column references | ||
group_by_and_order_by_style = explicit | ||
|
||
[sqlfluff:rules:references.special_chars] | ||
# Special characters in identifiers | ||
unquoted_identifiers_policy = all | ||
quoted_identifiers_policy = none | ||
allow_space_in_identifier = False | ||
|
||
[sqlfluff:rules:capitalisation.types] | ||
# Data Types | ||
extended_capitalisation_policy = lower | ||
|
||
[sqlfluff:rules:convention.casting_style] | ||
# SQL type casting | ||
preferred_type_casting_style = shorthand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
target/ | ||
dbt_packages/ | ||
macros/ | ||
.venv/ |
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
name: 'tasman_dbt_revenuecat' | ||
version: '0.0.1' | ||
|
||
require-dbt-version: [">=1.3.0", "<2.0.0"] | ||
|
||
config-version: 2 | ||
require-dbt-version: [">=1.6.0", "<2.0.0"] | ||
|
||
target-path: "target" | ||
#clean-targets: ["target", "dbt_modules", "dbt_packages"] | ||
macro-paths: ["macros"] | ||
clean-targets: ["target", "dbt_modules", "dbt_packages"] | ||
log-path: "logs" | ||
|
||
models: | ||
tasman_dbt_revenuecat: | ||
+materialized: table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
target/ | ||
dbt_packages/ | ||
macros/ | ||
.venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!make | ||
.PHONY: help poetry dbt | ||
.DEFAULT_GOAL := help | ||
|
||
# Initialisation recipes | ||
poetry: ## Install poetry | ||
@if ! command -v poetry; then\ | ||
curl -sSL https://install.python-poetry.org | python3 -;\ | ||
fi | ||
poetry install --directory ../ | ||
|
||
# dbt Development recipes | ||
dbt: poetry ## Start a dbt shell | ||
export DBT_PROFILES_DIR=~/.dbt/ && export SHELL=/bin/zsh && poetry shell |
11 changes: 11 additions & 0 deletions
11
integration_tests/data/seed_revenuecat_transactions_mocked.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
rc_original_app_user_id,rc_last_seen_app_user_id_alias,country,product_identifier,start_time,end_time,store,is_auto_renewable,is_trial_period,is_in_intro_offer_period,is_sandbox,price_in_usd,takehome_percentage,store_transaction_id,original_store_transaction_id,refunded_at,unsubscribe_detected_at,billing_issues_detected_at,purchased_currency,price_in_purchased_currency,entitlement_identifiers,renewal_number,is_trial_conversion,presented_offering,reserved_subscriber_attributes,custom_subscriber_attributes,platform,tax_percentage,commission_percentage,effective_end_time,grace_period_end_time,ownership_type,country_source,experiment_id,experiment_variant,purchase_price_in_usd,purchase_price_in_purchased_currency,product_display_name,product_duration,updated_at,offer,offer_type,first_seen_time,auto_resume_time,_file_name | ||
7a33a09e3d8f44aa9030d4d9c1e17b57,7a33a09e3d8f44aa9030d4d9c1e17b57,US,ad44a251d1ff4af8a01cacea42dfdd55,2023-12-10 20:02:01,2023-12-12 1:35:31,app_store,TRUE,FALSE,FALSE,FALSE,0,0.85,8573956325,8573956325,2023-12-12 1:35:31,2023-12-11 2:58:16,,USD,0,[premium],1,FALSE,standard,{},{},iOS,0,0.15,2023-12-12 1:35:31,,PURCHASED,last_seen,,,9,9,banana_subscription,P1M,2024-01-16 7:49:01,,,,,tasman-dbt-revenuecat/2024-02-01/transactions_1706757920.csv.gz | ||
bade7e1ec94e418d9e5ac569db27dac2,bade7e1ec94e418d9e5ac569db27dac2,US,ad44a251d1ff4af8a01cacea42dfdd55,2022-11-01 14:10:31,2023-11-01 14:10:31,app_store,TRUE,FALSE,FALSE,FALSE,99,0.7,5481613729,5481613729,,,,USD,99,[premium],1,FALSE,standard,{},{},iOS,0,0.3,2023-10-18 19:40:13,,PURCHASED,from_sdk,,,99,99,banana_subscription,P1M,2024-01-16 7:49:01,,,,,tasman-dbt-revenuecat/2024-02-01/transactions_1706757920.csv.gz | ||
bade7e1ec94e418d9e5ac569db27dac2,bade7e1ec94e418d9e5ac569db27dac2,US,ad44a251d1ff4af8a01cacea42dfdd55,2023-11-01 14:10:31,2024-11-01 14:10:31,app_store,TRUE,FALSE,FALSE,FALSE,99,0.7,7799213102,5481613729,,,,USD,99,[premium],2,FALSE,standard,{},{},iOS,0,0.3,2024-10-18 19:40:13,,PURCHASED,from_sdk,,,99,99,banana_subscription,P1M,2024-01-16 7:49:01,,,,,tasman-dbt-revenuecat/2024-02-01/transactions_1706757920.csv.gz | ||
0c13ff8b80614616aa3ef2d649dc2d1e,0c13ff8b80614616aa3ef2d649dc2d1e,US,0c13ff8b80614616aa3ef2d649dc2d1e,2023-02-12 16:16:05,2024-02-12 16:16:05,app_store,TRUE,FALSE,FALSE,FALSE,99,0.7,9728104118,3225356759,,2023-02-12 13:08:25,,USD,99,,2,TRUE,standard,{},{},iOS,0,0.3,2024-02-12 16:16:05,,PURCHASED,last_seen,,,99,99,cherry_subscription,P1Y,2024-01-16 7:49:01,,,,,tasman-dbt-revenuecat/2024-02-01/transactions_1706757920.csv.gz | ||
0c13ff8b80614616aa3ef2d649dc2d1e,0c13ff8b80614616aa3ef2d649dc2d1e,US,0c13ff8b80614616aa3ef2d649dc2d1e,2023-02-05 16:16:05,2023-02-12 16:16:05,app_store,TRUE,TRUE,FALSE,FALSE,0,0.7,3225356759,3225356759,,2023-02-12 13:08:25,,USD,0,,1,FALSE,standard,{},{},iOS,0,0.3,2023-02-12 16:16:05,,PURCHASED,last_seen,,,0,0,cherry_subscription,P1Y,2024-01-16 7:49:01,,,,,tasman-dbt-revenuecat/2024-02-01/transactions_1706757920.csv.gz | ||
024ea3b3405c461a9e8cf6464ee8d15c,024ea3b3405c461a9e8cf6464ee8d15c,US,0c13ff8b80614616aa3ef2d649dc2d1e,2024-01-03 7:15:52,2024-01-05 7:21:58,play_store,TRUE,FALSE,FALSE,FALSE,0,0.85,GPA.720684291,GPA.720684291,,,2024-01-03 7:16:07,USD,0,[premium],1,FALSE,discount,{},{},android,0,0.15,2024-01-17 7:15:52,2024-01-17 7:15:52,PURCHASED,from_sdk,,,0,0,cherry_subscription,P1Y,2024-01-16 7:49:01,,,,,tasman-dbt-revenuecat/2024-02-01/transactions_1706757920.csv.gz | ||
107771c8cf144ebf99a124a97fe032e2,107771c8cf144ebf99a124a97fe032e2,US,ad44a251d1ff4af8a01cacea42dfdd55,2023-03-29 16:24:32,2023-04-29 18:24:24,play_store,TRUE,FALSE,FALSE,FALSE,9,0.85,GPA.3691355300,GPA.3691355300,,,,USD,9,[premium],1,FALSE,standard,{},{},android,0,0.15,2023-04-29 18:24:24,,PURCHASED,last_seen,,,9,9,banana_subscription,P1M,2024-01-16 7:49:01,,,,,tasman-dbt-revenuecat/2024-02-01/transactions_1706757920.csv.gz | ||
107771c8cf144ebf99a124a97fe032e2,107771c8cf144ebf99a124a97fe032e2,US,ad44a251d1ff4af8a01cacea42dfdd55,2023-04-29 18:24:24,2023-05-29 18:24:24,play_store,TRUE,FALSE,FALSE,FALSE,9,0.85,GPA.4157746541..0,GPA.3691355300,,,,USD,9,[premium],2,FALSE,standard,{},{},android,0,0.15,2023-05-29 18:24:24,,PURCHASED,last_seen,,,9,9,banana_subscription,P1M,2024-01-16 7:49:01,,,,,tasman-dbt-revenuecat/2024-02-01/transactions_1706757920.csv.gz | ||
107771c8cf144ebf99a124a97fe032e2,107771c8cf144ebf99a124a97fe032e2,US,ad44a251d1ff4af8a01cacea42dfdd55,2023-04-29 18:24:24,2023-05-29 18:24:24,play_store,TRUE,FALSE,FALSE,FALSE,9,0.85,GPA.4157746541..0,GPA.3691355300,,,,USD,9,[premium],2,FALSE,standard,{},{},android,0,0.15,2023-05-29 18:24:24,,PURCHASED,last_seen,,,9,9,banana_subscription,P1M,2024-01-16 7:49:01,,,,,tasman-dbt-revenuecat/2024-02-01/transactions_1706757920.csv.gz | ||
107771c8cf144ebf99a124a97fe032e2,107771c8cf144ebf99a124a97fe032e2,US,ad44a251d1ff4af8a01cacea42dfdd55,2023-04-29 18:24:24,2023-05-29 18:24:24,play_store,TRUE,FALSE,FALSE,TRUE,9,0.85,GPA.4157746541..0,GPA.3691355300,,,,USD,9,[premium],2,FALSE,standard,{},{},android,0,0.15,2023-05-29 18:24:24,,PURCHASED,last_seen,,,9,9,banana_subscription,P1M,2024-01-16 7:49:01,,,,,tasman-dbt-revenuecat/2024-02-01/transactions_1706757920.csv.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: 'tasman_dbt_revenuecat_integration_tests' | ||
version: '1.0' | ||
|
||
config-version: 2 | ||
|
||
profile: 'tasman_integration_tests' | ||
|
||
seed-paths: ["data"] | ||
macro-paths: ["macros"] | ||
target-path: "target" | ||
clean-targets: ["target", "dbt_modules", "dbt_packages"] | ||
log-path: "logs" | ||
|
||
vars: | ||
tasman_dbt_revenuecat: | ||
revenuecat_table: "SEED_REVENUECAT_TRANSACTIONS_MOCKED" | ||
revenuecat_filter: "is_sandbox = false" | ||
revenuecat_custom_subscriber_attributes: "" | ||
revenuecat_mrr_test_seed: "" | ||
|
||
seeds: | ||
tasman_dbt_revenuecat_integration_tests: | ||
seed_revenuecat_transactions_mocked: | ||
+column_types: | ||
rc_original_app_user_id: "string" | ||
rc_last_seen_app_user_id_alias: "string" | ||
country: "string" | ||
product_identifier: "string" | ||
start_time: "timestamp_ntz" | ||
end_time: "timestamp_ntz" | ||
store: "string" | ||
is_auto_renewable: "boolean" | ||
is_trial_period: "boolean" | ||
is_in_intro_offer_period: "boolean" | ||
is_sandbox: "boolean" | ||
price_in_usd: "integer" | ||
takehome_percentage: "float" | ||
store_transaction_id: "string" | ||
original_store_transaction_id: "string" | ||
refunded_at: "timestamp_ntz" | ||
unsubscribe_detected_at: "timestamp_ntz" | ||
billing_issues_detected_at: "timestamp_ntz" | ||
purchased_currency: "string" | ||
price_in_purchased_currency: "integer" | ||
entitlement_identifiers: "string" | ||
renewal_number: "integer" | ||
is_trial_conversion: "boolean" | ||
presented_offering: "string" | ||
reserved_subscriber_attributes: "string" | ||
custom_subscriber_attributes: "string" | ||
platform: "string" | ||
tax_percentage: "integer" | ||
commission_percentage: "float" | ||
effective_end_time: "timestamp_ntz" | ||
grace_period_end_time: "timestamp_ntz" | ||
ownership_type: "string" | ||
country_source: "string" | ||
experiment_id: "integer" | ||
experiment_variant: "integer" | ||
purchase_price_in_usd: "integer" | ||
purchase_price_in_purchased_currency: "integer" | ||
product_display_name: "string" | ||
product_duration: "string" | ||
updated_at: "timestamp_ntz" | ||
offer: "integer" | ||
offer_type: "integer" | ||
first_seen_time: "timestamp_ntz" | ||
auto_resume_time: "timestamp_ntz" | ||
_file_name: "string" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
packages: | ||
- local: ../ | ||
- package: dbt-labs/dbt_utils | ||
version: 1.1.1 | ||
sha1_hash: 7ddc9cc629d204960cdbec3d712481aace9ed5d3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
packages: | ||
- local: ../ | ||
|
||
- package: dbt-labs/dbt_utils | ||
version: 1.1.1 |
Oops, something went wrong.