dropdown_data_sources

class virtualitics_sdk.elements.dropdown_data_sources.DataSourceDropdown(user_id, options, selected=None, include_nulls_visible=True, include_nulls_value=False, title='', description='', show_title=True, show_description=True, required=True, label='', placeholder='')

Bases: Dropdown

Used to configure data source drop down options that have been set up in the Connections tab.

Parameters:
  • user_id (str) – str, the user_id of the owner of the connections, usually done via StoreInterface(**flow_metadata).user.

  • options (List[ConnectionType]) – List[ConnectionType], a list of ConnectionTypes, for example ConnectionType.mssql.

  • selected (Optional[List[str]]) – Optional[List[str]] = None, used if you want a default selection.

  • include_nulls_visible (bool) – bool = True, whether null values will be visible.

  • include_nulls_value (bool) – bool = False, whether to include null values.

  • title (str) – str = “”, the title of the drop-down element.

  • description (str) – str = “”, the description of the drop-down element.

  • show_title (bool) – bool = True, whether to show the title.

  • show_description (bool) – bool = True, whether to show the description.

  • required (bool) – bool = True, whether selecting an item from the dropdown is required to proceed.

  • label (str) – str = “”, the label of the element.

  • placeholder (str) – str = “” the placeholder of the element.

static conn2dropdown_str(filter_options, user_id)
static dropdown_str2conn(user_id, connection_str)
get_value()

Get the value of an element. If the user has interacted with the value, the default will be updated.

Return type:

Union[str, dict]