m-kovalsky / fabric_cat_tools

Supercharge your Microsoft Fabric development with the fabric_cat_tools library
MIT License
110 stars 15 forks source link

Update incremental refresh policy #19

Closed sukumarbera closed 4 months ago

sukumarbera commented 6 months ago

Update the incremental refresh policy details for each table like

  1. How many periods of archival history?
  2. How many periods to refresh incrementally? At present I used Tabular editor c# script to update these details dynamically. Having this feature would really benefit the community.
m-kovalsky commented 5 months ago

I've actually already added functions to support managing incremental refresh policies in 0.4.1, I just have not advertised it yet as I am doing more testing. You can try them out (and find them using dir() and help(). Here is one for updating the policy. Any feedback is appreciated.

import fabric_cat_tools as fct
from fabric_cat_tools.TOM import connect_semantic_model

dataset = '' # Enter dataset name
workspace = None # Enter workspace name

with connect_semantic_model(dataset=dataset, readonly=False, workspace=workspace) as tom:

  tom.update_incremental_refresh_policy(table_name: str, incremental_granularity: str, incremental_periods: int, rolling_window_granularity: str, rolling_window_periods: int, only_refresh_complete_days: bool = False, detect_data_changes_column: str | None = None)