@@ -281,16 +281,17 @@ def create(self, **kwargs) -> "Entity":
281
281
return self
282
282
283
283
def _build_feature_group (
284
- self ,
285
- primary_keys ,
286
- input_feature_details ,
287
- expectation_suite : ExpectationSuite = None ,
288
- expectation_type : ExpectationType = ExpectationType .NO_EXPECTATION ,
289
- statistics_config : Union [StatisticsConfig , bool ] = True ,
290
- transformation_id : str = None ,
291
- name : str = None ,
292
- description : str = None ,
293
- compartment_id : str = None ,
284
+ self ,
285
+ primary_keys ,
286
+ partition_keys ,
287
+ input_feature_details ,
288
+ expectation_suite : ExpectationSuite = None ,
289
+ expectation_type : ExpectationType = ExpectationType .NO_EXPECTATION ,
290
+ statistics_config : Union [StatisticsConfig , bool ] = True ,
291
+ transformation_id : str = None ,
292
+ name : str = None ,
293
+ description : str = None ,
294
+ compartment_id : str = None ,
294
295
):
295
296
feature_group_resource = (
296
297
FeatureGroup ()
@@ -302,6 +303,7 @@ def _build_feature_group(
302
303
)
303
304
.with_entity_id (self .id )
304
305
.with_transformation_id (transformation_id )
306
+ .with_partition_keys (partition_keys )
305
307
.with_primary_keys (primary_keys )
306
308
.with_input_feature_details (input_feature_details )
307
309
.with_statistics_config (statistics_config )
@@ -314,24 +316,27 @@ def _build_feature_group(
314
316
return feature_group_resource
315
317
316
318
def create_feature_group (
317
- self ,
318
- primary_keys : List [str ],
319
- input_feature_details : List [FeatureDetail ] = None ,
320
- schema_details_dataframe : Union [DataFrame , pd .DataFrame ] = None ,
321
- expectation_suite : ExpectationSuite = None ,
322
- expectation_type : ExpectationType = ExpectationType .NO_EXPECTATION ,
323
- statistics_config : Union [StatisticsConfig , bool ] = True ,
324
- transformation_id : str = None ,
325
- name : str = None ,
326
- description : str = None ,
327
- compartment_id : str = None ,
319
+ self ,
320
+ primary_keys : List [str ],
321
+ partition_keys : List [str ] = None ,
322
+ input_feature_details : List [FeatureDetail ] = None ,
323
+ schema_details_dataframe : Union [DataFrame , pd .DataFrame ] = None ,
324
+ expectation_suite : ExpectationSuite = None ,
325
+ expectation_type : ExpectationType = ExpectationType .NO_EXPECTATION ,
326
+ statistics_config : Union [StatisticsConfig , bool ] = True ,
327
+ transformation_id : str = None ,
328
+ name : str = None ,
329
+ description : str = None ,
330
+ compartment_id : str = None ,
328
331
) -> "FeatureGroup" :
329
332
"""Creates FeatureGroup resource.
330
333
331
334
Parameters
332
335
----------
333
336
primary_keys: List[str]
334
337
List of primary keys.
338
+ partition_keys: List[str]
339
+ List of partition_keys to partition the materialized data.
335
340
input_feature_details: List[FeatureDetail]
336
341
Raw feature schema for the input features.
337
342
schema_details_dataframe: Union[DataFrame, pd.DataFrame]
@@ -377,6 +382,7 @@ def create_feature_group(
377
382
378
383
self .oci_feature_group = self ._build_feature_group (
379
384
primary_keys ,
385
+ partition_keys ,
380
386
raw_feature_details ,
381
387
expectation_suite ,
382
388
expectation_type ,
@@ -405,7 +411,7 @@ def delete_feature_group(self):
405
411
406
412
@classmethod
407
413
def list_feature_group (
408
- cls , compartment_id : str = None , ** kwargs
414
+ cls , compartment_id : str = None , ** kwargs
409
415
) -> List ["FeatureGroup" ]:
410
416
"""Lists FeatureGroup resources in a given compartment.
411
417
@@ -426,7 +432,7 @@ def list_feature_group(
426
432
427
433
@classmethod
428
434
def list_feature_group_df (
429
- cls , compartment_id : str = None , ** kwargs
435
+ cls , compartment_id : str = None , ** kwargs
430
436
) -> "pandas.DataFrame" :
431
437
"""Lists FeatureGroup resources in a given compartment as pandas dataframe.
432
438
@@ -446,14 +452,14 @@ def list_feature_group_df(
446
452
return FeatureGroup .list_df (compartment_id , ** kwargs )
447
453
448
454
def _build_dataset (
449
- self ,
450
- query : str ,
451
- name : str = None ,
452
- description : str = None ,
453
- compartment_id : str = None ,
454
- expectation_suite : ExpectationSuite = None ,
455
- expectation_type : ExpectationType = ExpectationType .NO_EXPECTATION ,
456
- statistics_config : Union [StatisticsConfig , bool ] = True ,
455
+ self ,
456
+ query : str ,
457
+ name : str = None ,
458
+ description : str = None ,
459
+ compartment_id : str = None ,
460
+ expectation_suite : ExpectationSuite = None ,
461
+ expectation_type : ExpectationType = ExpectationType .NO_EXPECTATION ,
462
+ statistics_config : Union [StatisticsConfig , bool ] = True ,
457
463
):
458
464
dataset_resource = (
459
465
Dataset ()
@@ -477,14 +483,14 @@ def _build_dataset(
477
483
return dataset_resource
478
484
479
485
def create_dataset (
480
- self ,
481
- query : str ,
482
- name : str = None ,
483
- description : str = None ,
484
- compartment_id : str = None ,
485
- expectation_suite : ExpectationSuite = None ,
486
- expectation_type : ExpectationType = ExpectationType .NO_EXPECTATION ,
487
- statistics_config : Union [StatisticsConfig , bool ] = True ,
486
+ self ,
487
+ query : str ,
488
+ name : str = None ,
489
+ description : str = None ,
490
+ compartment_id : str = None ,
491
+ expectation_suite : ExpectationSuite = None ,
492
+ expectation_type : ExpectationType = ExpectationType .NO_EXPECTATION ,
493
+ statistics_config : Union [StatisticsConfig , bool ] = True ,
488
494
) -> "Dataset" :
489
495
"""Creates Dataset resource.
490
496
@@ -560,7 +566,7 @@ def list_dataset(cls, compartment_id: str = None, **kwargs) -> List["Dataset"]:
560
566
561
567
@classmethod
562
568
def list_dataset_df (
563
- cls , compartment_id : str = None , ** kwargs
569
+ cls , compartment_id : str = None , ** kwargs
564
570
) -> "pandas.DataFrame" :
565
571
"""Lists Dataset resources in a given compartment as pandas dataframe.
566
572
0 commit comments