Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update Slice Filters Documentation #519

Merged
merged 3 commits into from
Jul 18, 2023
Merged
Changes from 1 commit
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
19 changes: 10 additions & 9 deletions docs-src/modules/developing/pages/slices.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ entity_filter = EntityPercentFilter(filter_percentage)
----

The example above creates a new `EntityPercentFilter` from the Kaskada
Compute module with a filtering percentage of 12.34%.
Slice Filters module with a filtering percentage of 12.34%.
kevinjnguyen marked this conversation as resolved.
Show resolved Hide resolved

=== Entity Key Percent Filter Additional Details

Expand Down Expand Up @@ -71,10 +71,11 @@ filter on the same session.
[source,python]
----
from kaskada.slice_filters import EntityPercentFilter
from kaskada.client import set_default_slice

filter_percentage = 12.34
entity_filter = EntityPercentFilter(filter_percentage)
kda.set_default_slice(entity_filter)
set_default_slice(entity_filter)
----


Expand All @@ -93,15 +94,13 @@ kda.set_default_slice(entity_filter)

[source,python]
----
from kaskada import compute
from kaskada.api.session import LocalBuilder
from kaskada import query
from kaskada.slice_filters import EntityPercentFilter

session = LocalBuilder().build()
from kaskada.client import set_default_slice

filter_percentage = 12.34
entity_filter = EntityPercentFilter(filter_percentage)
kda.set_default_slice(entity_filter)
set_default_slice(entity_filter)

query = '''
{
Expand All @@ -111,7 +110,7 @@ query = '''
}
'''

compute.query(query=query)
query.create_query(expression=query)
----

== Entity Keys Filter
Expand All @@ -126,12 +125,14 @@ Here is an example of creating an entity key filter:
[source,python]
----
from kaskada.slice_filters import EntityFilter
from kaskada.client import set_default_slice

entity_keys = ["customer_01", "customer_03"]
entity_filter = EntityFilter(entity_keys)
set_default_slice(entity_filter)
----

The example above creates a new `EntityFilter` from the Kaskada Compute
The example above creates a new `EntityFilter` from the Kaskada Slice Filters
module with entity key filters for "customer_01" and "customer_03".

=== Entity Key Filter Additional Details
Expand Down
Loading