Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions decorators.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,21 +354,6 @@ def data_used_in_multiple_ways() -> pd.DataFrame:
In the case above, `common_tag` would resolve to `foo` for `column_a` and `bar` for `column_b`.
Attempting an override in the reverse direction is currently undefined behavior.

### How do I query by tags?
Right now, we don't have a specific interface to query by tags, however we do expose them via the driver.
Using the `list_available_variables()` capability exposes tags along with their names & types,
enabling querying of the available outputs for specific tag matches.
E.g.
```python

from hamilton import driver
dr = driver.Driver(...) # create driver as required
all_possible_outputs = dr.list_available_variables()
desired_outputs = [o.name for o in all_possible_outputs
if 'my_tag_value' == o.tags.get('my_tag_key')]
output = dr.execute(desired_outputs)
```

## @check_output

The `@check_output` decorator enables you to add simple data quality checks to your code.
Expand Down
14 changes: 1 addition & 13 deletions docs/reference/decorators/tag.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,7 @@ For instance:

**How do I query by tags?**

Right now, we don't have a specific interface to query by tags, however we do expose them via the driver. Using the
``list_available_variables()`` capability exposes tags along with their names & types, enabling querying of the
available outputs for specific tag matches. E.g.

.. code-block:: python

from hamilton import driver
dr = driver.Driver(...) # create driver as required
all_possible_outputs = dr.list_available_variables()
desired_outputs = [o.name for o in all_possible_outputs
if 'my_tag_value' == o.tags.get('my_tag_key')]
output = dr.execute(desired_outputs)

The `list_available_variables <../../drivers/Driver/#hamilton.driver.Driver.list_available_variables>`_ method accepts in a tag query, enabling search over the tags for specific matches.

----

Expand Down