Looker API: Created_Scheduled_Plan() filters_string not working

I have a dashboard that contains a table and four line graphs. Within the table, there is a categorical variable column with the names of team members who are responsible for each row - one name (or null) per row. I am trying to schedule send this dashboard to each of the team members, but filter the table such that only the relevant rows are shown for each person when they receive the dashboard PDF and link via email. 

Using the Looker API, I am able to schedule send the entire dashboard to myself but cannot figure out the filters_string parameter within the create_schedule_plan() method to send filtered dashboard views.  I understand that eventually I will need to loop through all the teams members and thus create separated schedules for each person, but I can’t even test with one person. 

The code is roughly as follows:

#Set up Connection

# Save client_id and client_secret

base_url = 'https://my_company.cloud.looker.com:443'

#initialize the SDK

sdk = looker_sdk.init40()

schedule_name = "test17"

crontab = "33 16 * * *"

body = models.WriteScheduledPlan(

name = schedule_name,

user_id = 4,

dashboard_id = 100,

run_as_recipient = False,

enabled = True,

filters_string = "?table.team_member=John",

#eventually, filters_string will have to be something like: filters_string = f“?table.team_member={member_name}” 

require_results = False,

require_no_results = False,

require_change = False,

send_all_results = False,

crontab = crontab,

run_once= True,

timezone = "America/Los_Angeles",

scheduled_plan_destination = [models.ScheduledPlanDestination(

format = "wysiwyg_pdf",

apply_formatting = True,

apply_vis = True,

address = "my_email@domain.com",

type = "email",

message = "Hey, please work!",

)

],

include_links = True

)

sdk.create_scheduled_plan(body=body)

print(f"Successfully scheduled job {schedule_name} at time {crontab}")

I have read just about everything I can find on create_schedule_plan() online, including the Looker API documentation, this filtered scheduled send tutorial from Looker, a manage_schedules.py example, Medium articles, and Looker forum posts. However, all these resources (I think) either show a deprecated use filters_string, omit filters_string altogether, or are unresolved. 

If someone can explain how to get the filters_string to match a name OR a null value, that would be wonderful. As a bonus, I also would like to keep the default filters on the dashboard when I schedule send them (such as a date filter). Do I need to code these filters as well, or will they remain by default?

Thanks.

0 1 1,097
1 REPLY 1

I'm with the same problem, did you found any solution?