Skip to content

Commit

Permalink
allow fact sources to always fully refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
petzel committed Oct 30, 2024
1 parent 9849482 commit 0081916
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions eppo_metrics_sync/eppo_metrics_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from eppo_metrics_sync.dbt_model_parser import DbtModelParser
from eppo_metrics_sync.helper import load_yaml

API_ENDPOINT = 'https://eppo.cloud/api/v1/metrics/sync'

host = os.getenv('EPPO_API_HOST', 'https://eppo.cloud')
API_ENDPOINT = f'{host}/api/v1/metrics/sync'

class EppoMetricsSync:
def __init__(
Expand Down
4 changes: 4 additions & 0 deletions eppo_metrics_sync/schema/eppo_metric_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
}
}
}
},
"always_full_refresh": {
"description": "If true, this fact source will always be fully refreshed (optional)",
"type": "boolean"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='eppo_metrics_sync',
version='0.0.8',
version='0.1.0',
packages=find_packages(),
install_requires=[
'PyYAML', 'jsonschema', 'requests'
Expand Down
1 change: 1 addition & 0 deletions tests/yaml/valid/global_kpis/upgrades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ fact_sources:
column: event_value
- name: upgrade_value
column: upgrade_value
always_full_refresh: true

metrics:
- name: Total Upgrades to Paid Plan
Expand Down

0 comments on commit 0081916

Please sign in to comment.