From 562dd562b12fb6e4155f486b1a72c73d73098b96 Mon Sep 17 00:00:00 2001 From: Kevin J Nguyen Date: Mon, 17 Jul 2023 08:23:06 -0500 Subject: [PATCH 1/3] docs: Update Slice Filters Documentation --- docs-src/modules/developing/pages/slices.adoc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs-src/modules/developing/pages/slices.adoc b/docs-src/modules/developing/pages/slices.adoc index 2209731f2..f1aa97746 100644 --- a/docs-src/modules/developing/pages/slices.adoc +++ b/docs-src/modules/developing/pages/slices.adoc @@ -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%. === Entity Key Percent Filter Additional Details @@ -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) ---- @@ -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 = ''' { @@ -111,7 +110,7 @@ query = ''' } ''' -compute.query(query=query) +query.create_query(expression=query) ---- == Entity Keys Filter @@ -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 From fc93b26cd378e412cc46de7c1a49a4ae99b2b971 Mon Sep 17 00:00:00 2001 From: Kevin J Nguyen Date: Mon, 17 Jul 2023 09:24:58 -0500 Subject: [PATCH 2/3] Update slices.adoc --- docs-src/modules/developing/pages/slices.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-src/modules/developing/pages/slices.adoc b/docs-src/modules/developing/pages/slices.adoc index f1aa97746..6c46b57d1 100644 --- a/docs-src/modules/developing/pages/slices.adoc +++ b/docs-src/modules/developing/pages/slices.adoc @@ -38,7 +38,7 @@ entity_filter = EntityPercentFilter(filter_percentage) ---- The example above creates a new `EntityPercentFilter` from the Kaskada -Slice Filters module with a filtering percentage of 12.34%. +Slicing module with a filtering percentage of 12.34%. === Entity Key Percent Filter Additional Details From 788ef24f34e79c9c52b988940e19dca5206951be Mon Sep 17 00:00:00 2001 From: Kevin J Nguyen Date: Mon, 17 Jul 2023 09:25:24 -0500 Subject: [PATCH 3/3] Update slices.adoc --- docs-src/modules/developing/pages/slices.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-src/modules/developing/pages/slices.adoc b/docs-src/modules/developing/pages/slices.adoc index 6c46b57d1..5e8f9fe15 100644 --- a/docs-src/modules/developing/pages/slices.adoc +++ b/docs-src/modules/developing/pages/slices.adoc @@ -132,7 +132,7 @@ entity_filter = EntityFilter(entity_keys) set_default_slice(entity_filter) ---- -The example above creates a new `EntityFilter` from the Kaskada Slice Filters +The example above creates a new `EntityFilter` from the Kaskada Slicing module with entity key filters for "customer_01" and "customer_03". === Entity Key Filter Additional Details