@@ -29,7 +29,10 @@ def main():
2929 help = "desired logging level (set to error by default)" ,
3030 )
3131 # Options specific to this sample:
32- # This sample has no additional options, yet. If you add some, please add them here
32+ # Options specific to this sample
33+ parser .add_argument ("resource_type" , choices = ["workbook" , "datasource" ])
34+ parser .add_argument ("resource_id" )
35+ parser .add_argument ("--incremental" , default = False )
3336
3437 args = parser .parse_args ()
3538
@@ -45,6 +48,7 @@ def main():
4548 # Monthly Schedule
4649 # This schedule will run on the 15th of every month at 11:30PM
4750 monthly_interval = TSC .MonthlyInterval (start_time = time (23 , 30 ), interval_value = 15 )
51+ print (monthly_interval )
4852 monthly_schedule = TSC .ScheduleItem (
4953 None ,
5054 None ,
@@ -53,9 +57,7 @@ def main():
5357 monthly_interval ,
5458 )
5559
56- # Default to using first workbook found in server - note that this workbook may not be valid
57- all_workbook_items , pagination_item = server .workbooks .get ()
58- my_workbook : TSC .WorkbookItem = all_workbook_items [0 ]
60+ my_workbook : TSC .WorkbookItem = server .workbooks .get_by_id (args .resource_id )
5961
6062 target_item = TSC .Target (
6163 my_workbook .id , # the id of the workbook or datasource
0 commit comments