Skip to content

Filtering Datasources using the "In" Operator #826

Description

@tuse0708

When attempting to filter using the "In" operator on datasources, I am able to filter a single source using "Equals" but if I switch to "In" and supply a list, I get "400065: Bad Request. The filter query is missing a value for key 'name'."

Versions

Tableau Server Version: 2019.4.2 (20194.20.0119.2058) 64-bit Linux
Python 3.8.4
TSC library version - 0.15

To Reproduce

import tableauserverclient as TSC

username = ""
pw = ""
site = ""
tableau_auth = TSC.TableauAuth(username, pw, site)
server = TSC.Server('https://HOSTNAME/', use_server_version=True)
req_option = TSC.RequestOptions()

jobs_to_refresh = ['Example Job 1','Example Job 2']

with server.auth.sign_in(tableau_auth):
    req_option.filter.add(TSC.Filter(TSC.RequestOptions.Field.Name,
                                TSC.RequestOptions.Operator.In,
                                jobs_to_refresh))
    matching_datasources, pagination_item = server.datasources.get(req_options=req_option)
    print(matching_datasources[0].name, matching_datasources[0].id)

Results
400065: Bad Request. The filter query is missing a value for key 'name'.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedA user needs help, may be a mistake, a bug or a feature requeststale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions