Skip to content

Registering

src.featureform.register.ResourceClient

Bases: Registrar

The resource client is used to retrieve information on specific resources (entities, providers, features, labels, training sets, models, users). If retrieved resources are needed to register additional resources (e.g. registering a feature from a source), use the Client functions instead.

Using the Resource Client:

definitions.py
import featureform as ff
from featureform import ResourceClient

rc = ResourceClient("localhost:8000")

# example query:
redis = rc.get_provider("redis-quickstart")

Source code in src/featureform/register.py
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
class ResourceClient(Registrar):
    """The resource client is used to retrieve information on specific resources (entities, providers, features, labels, training sets, models, users). If retrieved resources are needed to register additional resources (e.g. registering a feature from a source), use the [Client](client.md) functions instead.

    **Using the Resource Client:**
    ``` py title="definitions.py"
    import featureform as ff
    from featureform import ResourceClient

    rc = ResourceClient("localhost:8000")

    # example query:
    redis = rc.get_provider("redis-quickstart")
    ```
    """

    def __init__(self, host=None, local=False, insecure=False, cert_path=None, dry_run=False):
        """Initialise a Resource Client object.

        Args:
            host (str): The hostname of the Featureform instance. Exclude if using Localmode.
            local (bool): True if using Localmode.
            insecure (bool): True if connecting to an insecure Featureform endpoint. False if using a self-signed or public TLS certificate
            cert_path (str): The path to a public certificate if using a self-signed certificate.
        """
        super().__init__()
        self._dry_run = dry_run
        self._stub = None
        self.local = local

        if dry_run:
            return

        if local and host:
            raise ValueError("Cannot be local and have a host")
        elif not local:
            host = host or os.getenv('FEATUREFORM_HOST')
            if host is None:
                raise RuntimeError(
                    'If not in local mode then `host` must be passed or the environment'
                    ' variable FEATUREFORM_HOST must be set.'
                )
            if insecure:
                channel = insecure_channel(host)
            else:
                channel = secure_channel(host, cert_path)
            self._stub = ff_grpc.ApiStub(channel)
            self._host = host

    def apply(self):
        """Apply all definitions, creating and retrieving all specified resources.
        """

        if self._dry_run:
            print(state().sorted_list())
            return

        if self.local:
            state().create_all_local()
        else:
            state().create_all(self._stub)

    def get_user(self, name, local=False):
        """Get a user. Prints out name of user, and all resources associated with the user.

        **Examples:**

        ``` py title="Input"
        featureformer = rc.get_user("featureformer")
        ```

        ``` json title="Output"
        // get_user prints out formatted information on user
        USER NAME:                     featureformer
        -----------------------------------------------

        NAME                           VARIANT                        TYPE
        avg_transactions               quickstart                     feature
        fraudulent                     quickstart                     label
        fraud_training                 quickstart                     training set
        transactions                   kaggle                         source
        average_user_transaction       quickstart                     source
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(featureformer)
        ```

        ``` json title="Output"
        // get_user returns the User object

        name: "featureformer"
        features {
        name: "avg_transactions"
        variant: "quickstart"
        }
        labels {
        name: "fraudulent"
        variant: "quickstart"
        }
        trainingsets {
        name: "fraud_training"
        variant: "quickstart"
        }
        sources {
        name: "transactions"
        variant: "kaggle"
        }
        sources {
        name: "average_user_transaction"
        variant: "quickstart"
        }
        ```

        Args:
            name (str): Name of user to be retrieved

        Returns:
            user (User): User
        """
        if local:
            return get_user_info_local(name)
        return get_user_info(self._stub, name)

    def get_entity(self, name, local=False):
        """Get an entity. Prints out information on entity, and all resources associated with the entity.

        **Examples:**

        ``` py title="Input"
        entity = rc.get_entity("user")
        ```

        ``` json title="Output"
        // get_entity prints out formatted information on entity

        ENTITY NAME:                   user
        STATUS:                        NO_STATUS
        -----------------------------------------------

        NAME                           VARIANT                        TYPE
        avg_transactions               quickstart                     feature
        fraudulent                     quickstart                     label
        fraud_training                 quickstart                     training set
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(postgres)
        ```

        ``` json title="Output"
        // get_entity returns the Entity object

        name: "user"
        features {
        name: "avg_transactions"
        variant: "quickstart"
        }
        labels {
        name: "fraudulent"
        variant: "quickstart"
        }
        trainingsets {
        name: "fraud_training"
        variant: "quickstart"
        }
        ```
        """
        if local:
            return get_entity_info_local(name)
        return get_entity_info(self._stub, name)

    def get_model(self, name, local=False) -> Model:
        """Get a model. Prints out information on model, and all resources associated with the model.

        Args:
            name (str): Name of model to be retrieved

        Returns:
            model (Model): Model
        """
        if local:
            model = get_model_info_local(name)
        else:
            model_proto = get_resource_info(self._stub, "model", name)
            if model_proto is None:
                model = None
            else:
                # TODO: apply values from proto
                model = Model(model_proto.name, tags=[], properties={})

        return model

    def get_provider(self, name, local=False):
        """Get a provider. Prints out information on provider, and all resources associated with the provider.

        **Examples:**

        ``` py title="Input"
        postgres = rc.get_provider("postgres-quickstart")
        ```

        ``` json title="Output"
        // get_provider prints out formatted information on provider

        NAME:                          postgres-quickstart
        DESCRIPTION:                   A Postgres deployment we created for the Featureform quickstart
        TYPE:                          POSTGRES_OFFLINE
        SOFTWARE:                      postgres
        STATUS:                        NO_STATUS
        -----------------------------------------------
        SOURCES:
        NAME                           VARIANT
        transactions                   kaggle
        average_user_transaction       quickstart
        -----------------------------------------------
        FEATURES:
        NAME                           VARIANT
        -----------------------------------------------
        LABELS:
        NAME                           VARIANT
        fraudulent                     quickstart
        -----------------------------------------------
        TRAINING SETS:
        NAME                           VARIANT
        fraud_training                 quickstart
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(postgres)
        ```

        ``` json title="Output"
        // get_provider returns the Provider object

        name: "postgres-quickstart"
        description: "A Postgres deployment we created for the Featureform quickstart"
        type: "POSTGRES_OFFLINE"
        software: "postgres"
        serialized_config: "{\"Host\": \"quickstart-postgres\",
                            \"Port\": \"5432\",
                            \"Username\": \"postgres\",
                            \"Password\": \"password\",
                            \"Database\": \"postgres\"}"
        sources {
        name: "transactions"
        variant: "kaggle"
        }
        sources {
        name: "average_user_transaction"
        variant: "quickstart"
        }
        trainingsets {
        name: "fraud_training"
        variant: "quickstart"
        }
        labels {
        name: "fraudulent"
        variant: "quickstart"
        }
        ```

        Args:
            name (str): Name of provider to be retrieved

        Returns:
            provider (Provider): Provider
        """
        if local:
            return get_provider_info_local(name)
        return get_provider_info(self._stub, name)

    def get_feature(self, name, variant):
        name_variant = metadata_pb2.NameVariant(name=name, variant=variant)
        feature = None
        for x in self._stub.GetFeatureVariants(iter([name_variant])):
            feature = x
            break

        return Feature(
            name=feature.name,
            variant=feature.variant,
            source=(feature.source.name, feature.source.variant),
            value_type=feature.type,
            entity=feature.entity,
            owner=feature.owner,
            provider=feature.provider,
            location=ResourceColumnMapping("", "", ""),
            description=feature.description,
            status=feature.status.Status._enum_type.values[feature.status.status].name
        )

    def print_feature(self, name, variant=None, local=False):
        """Get a feature. Prints out information on feature, and all variants associated with the feature. If variant is included, print information on that specific variant and all resources associated with it.

        **Examples:**

        ``` py title="Input"
        avg_transactions = rc.get_feature("avg_transactions")
        ```

        ``` json title="Output"
        // get_feature prints out formatted information on feature

        NAME:                          avg_transactions
        STATUS:                        NO_STATUS
        -----------------------------------------------
        VARIANTS:
        quickstart                     default
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(avg_transactions)
        ```

        ``` json title="Output"
        // get_feature returns the Feature object

        name: "avg_transactions"
        default_variant: "quickstart"
        variants: "quickstart"
        ```

        ``` py title="Input"
        avg_transactions_variant = ff.get_feature("avg_transactions", "quickstart")
        ```

        ``` json title="Output"
        // get_feature with variant provided prints out formatted information on feature variant

        NAME:                          avg_transactions
        VARIANT:                       quickstart
        TYPE:                          float32
        ENTITY:                        user
        OWNER:                         featureformer
        PROVIDER:                      redis-quickstart
        STATUS:                        NO_STATUS
        -----------------------------------------------
        SOURCE:
        NAME                           VARIANT
        average_user_transaction       quickstart
        -----------------------------------------------
        TRAINING SETS:
        NAME                           VARIANT
        fraud_training                 quickstart
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(avg_transactions_variant)
        ```

        ``` json title="Output"
        // get_feature returns the FeatureVariant object

        name: "avg_transactions"
        variant: "quickstart"
        source {
        name: "average_user_transaction"
        variant: "quickstart"
        }
        type: "float32"
        entity: "user"
        created {
        seconds: 1658168552
        nanos: 142461900
        }
        owner: "featureformer"
        provider: "redis-quickstart"
        trainingsets {
        name: "fraud_training"
        variant: "quickstart"
        }
        columns {
        entity: "user_id"
        value: "avg_transaction_amt"
        }
        ```

        Args:
            name (str): Name of feature to be retrieved
            variant (str): Name of variant of feature

        Returns:
            feature (Union[Feature, FeatureVariant]): Feature or FeatureVariant
        """
        if local:
            if not variant:
                return get_resource_info_local("feature", name)
            return get_feature_variant_info_local(name, variant)
        if not variant:
            return get_resource_info(self._stub, "feature", name)
        return get_feature_variant_info(self._stub, name, variant)

    def get_label(self, name, variant):
        name_variant = metadata_pb2.NameVariant(name=name, variant=variant)
        label = None
        for x in self._stub.GetLabelVariants(iter([name_variant])):
            label = x
            break

        return Label(
            name=label.name,
            variant=label.variant,
            source=(label.source.name, label.source.variant),
            value_type=label.type,
            entity=label.entity,
            owner=label.owner,
            provider=label.provider,
            location=ResourceColumnMapping("", "", ""),
            description=label.description,
            status=label.status.Status._enum_type.values[label.status.status].name
        )

    def print_label(self, name, variant=None, local=False):
        """Get a label. Prints out information on label, and all variants associated with the label. If variant is included, print information on that specific variant and all resources associated with it.

        **Examples:**

        ``` py title="Input"
        fraudulent = rc.get_label("fraudulent")
        ```

        ``` json title="Output"
        // get_label prints out formatted information on label

        NAME:                          fraudulent
        STATUS:                        NO_STATUS
        -----------------------------------------------
        VARIANTS:
        quickstart                     default
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(fraudulent)
        ```

        ``` json title="Output"
        // get_label returns the Label object

        name: "fraudulent"
        default_variant: "quickstart"
        variants: "quickstart"
        ```

        ``` py title="Input"
        fraudulent_variant = ff.get_label("fraudulent", "quickstart")
        ```

        ``` json title="Output"
        // get_label with variant provided prints out formatted information on label variant

        NAME:                          fraudulent
        VARIANT:                       quickstart
        TYPE:                          bool
        ENTITY:                        user
        OWNER:                         featureformer
        PROVIDER:                      postgres-quickstart
        STATUS:                        NO_STATUS
        -----------------------------------------------
        SOURCE:
        NAME                           VARIANT
        transactions                   kaggle
        -----------------------------------------------
        TRAINING SETS:
        NAME                           VARIANT
        fraud_training                 quickstart
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(fraudulent_variant)
        ```

        ``` json title="Output"
        // get_label returns the LabelVariant object

        name: "fraudulent"
        variant: "quickstart"
        type: "bool"
        source {
        name: "transactions"
        variant: "kaggle"
        }
        entity: "user"
        created {
        seconds: 1658168552
        nanos: 154924300
        }
        owner: "featureformer"
        provider: "postgres-quickstart"
        trainingsets {
        name: "fraud_training"
        variant: "quickstart"
        }
        columns {
        entity: "customerid"
        value: "isfraud"
        }
        ```

        Args:
            name (str): Name of label to be retrieved
            variant (str): Name of variant of label

        Returns:
            label (Union[label, LabelVariant]): Label or LabelVariant
        """
        if local:
            if not variant:
                return get_resource_info_local("label", name)
            return get_label_variant_info_local(name, variant)
        if not variant:
            return get_resource_info(self._stub, "label", name)
        return get_label_variant_info(self._stub, name, variant)

    def get_training_set(self, name, variant):
        name_variant = metadata_pb2.NameVariant(name=name, variant=variant)
        ts = None
        for x in self._stub.GetTrainingSetVariants(iter([name_variant])):
            ts = x
            break

        return TrainingSet(
            name=ts.name,
            variant=ts.variant,
            owner=ts.owner,
            description=ts.description,
            status=ts.status.Status._enum_type.values[ts.status.status].name,
            label=(ts.label.name, ts.label.variant),
            features=[(f.name, f.variant) for f in ts.features],
            feature_lags=[],
            provider=ts.provider,
            # TODO: apply values from proto
            tags=[],
            properties={},
        )

    def print_training_set(self, name, variant=None, local=False):
        """Get a training set. Prints out information on training set, and all variants associated with the training set. If variant is included, print information on that specific variant and all resources associated with it.

        **Examples:**

        ``` py title="Input"
        fraud_training = rc.get_training_set("fraud_training")
        ```

        ``` json title="Output"
        // get_training_set prints out formatted information on training set

        NAME:                          fraud_training
        STATUS:                        NO_STATUS
        -----------------------------------------------
        VARIANTS:
        quickstart                     default
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(fraud_training)
        ```

        ``` json title="Output"
        // get_training_set returns the TrainingSet object

        name: "fraud_training"
        default_variant: "quickstart"
        variants: "quickstart"
        ```

        ``` py title="Input"
        fraudulent_variant = ff.get_training set("fraudulent", "quickstart")
        ```

        ``` json title="Output"
        // get_training_set with variant provided prints out formatted information on training set variant

        NAME:                          fraud_training
        VARIANT:                       quickstart
        OWNER:                         featureformer
        PROVIDER:                      postgres-quickstart
        STATUS:                        NO_STATUS
        -----------------------------------------------
        LABEL:
        NAME                           VARIANT
        fraudulent                     quickstart
        -----------------------------------------------
        FEATURES:
        NAME                           VARIANT
        avg_transactions               quickstart
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(fraudulent_variant)
        ```

        ``` json title="Output"
        // get_training_set returns the TrainingSetVariant object

        name: "fraud_training"
        variant: "quickstart"
        owner: "featureformer"
        created {
        seconds: 1658168552
        nanos: 157934800
        }
        provider: "postgres-quickstart"
        features {
        name: "avg_transactions"
        variant: "quickstart"
        }
        label {
        name: "fraudulent"
        variant: "quickstart"
        }
        ```

        Args:
            name (str): Name of training set to be retrieved
            variant (str): Name of variant of training set

        Returns:
            training_set (Union[TrainingSet, TrainingSetVariant]): TrainingSet or TrainingSetVariant
        """
        if local:
            if not variant:
                return get_resource_info_local("training-set", name)
            return get_training_set_variant_info_local(name, variant)
        if not variant:
            return get_resource_info(self._stub, "training-set", name)
        return get_training_set_variant_info(self._stub, name, variant)

    def get_source(self, name, variant):
        name_variant = metadata_pb2.NameVariant(name=name, variant=variant)
        source = None
        for x in self._stub.GetSourceVariants(iter([name_variant])):
            source = x
            break

        definition = self._get_source_definition(source)

        return Source(
            name=source.name,
            definition=definition,
            owner=source.owner,
            provider=source.provider,
            description=source.description,
            variant=source.variant,
            status=source.status.Status._enum_type.values[source.status.status].name,
        )

    def _get_source_definition(self, source):
        if source.primaryData.table.name:
            return PrimaryData(
                Location(source.primaryData.table.name)
            )
        elif source.transformation:
            return self._get_transformation_definition(source)
        else:
            raise Exception(f"Invalid source type {source}")

    def _get_transformation_definition(self, source):
        if source.transformation.DFTransformation.query != bytes():
            transformation = source.transformation.DFTransformation
            return DFTransformation(
                query=transformation.query,
                inputs=[(input.name, input.variant) for input in transformation.inputs]
            )
        elif source.transformation.SQLTransformation.query != "":
            return SQLTransformation(
                source.transformation.SQLTransformation.query
            )
        else:
            raise Exception(f"Invalid transformation type {source}")

    def print_source(self, name, variant=None, local=False):
        """Get a source. Prints out information on source, and all variants associated with the source. If variant is included, print information on that specific variant and all resources associated with it.

        **Examples:**

        ``` py title="Input"
        transactions = rc.get_transactions("transactions")
        ```

        ``` json title="Output"
        // get_source prints out formatted information on source

        NAME:                          transactions
        STATUS:                        NO_STATUS
        -----------------------------------------------
        VARIANTS:
        kaggle                         default
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(transactions)
        ```

        ``` json title="Output"
        // get_source returns the Source object

        name: "transactions"
        default_variant: "kaggle"
        variants: "kaggle"
        ```

        ``` py title="Input"
        transactions_variant = rc.get_source("transactions", "kaggle")
        ```

        ``` json title="Output"
        // get_source with variant provided prints out formatted information on source variant

        NAME:                          transactions
        VARIANT:                       kaggle
        OWNER:                         featureformer
        DESCRIPTION:                   Fraud Dataset From Kaggle
        PROVIDER:                      postgres-quickstart
        STATUS:                        NO_STATUS
        -----------------------------------------------
        DEFINITION:
        TRANSFORMATION

        -----------------------------------------------
        SOURCES
        NAME                           VARIANT
        -----------------------------------------------
        PRIMARY DATA
        Transactions
        FEATURES:
        NAME                           VARIANT
        -----------------------------------------------
        LABELS:
        NAME                           VARIANT
        fraudulent                     quickstart
        -----------------------------------------------
        TRAINING SETS:
        NAME                           VARIANT
        fraud_training                 quickstart
        -----------------------------------------------
        ```

        ``` py title="Input"
        print(transactions_variant)
        ```

        ``` json title="Output"
        // get_source returns the SourceVariant object

        name: "transactions"
        variant: "kaggle"
        owner: "featureformer"
        description: "Fraud Dataset From Kaggle"
        provider: "postgres-quickstart"
        created {
        seconds: 1658168552
        nanos: 128768000
        }
        trainingsets {
        name: "fraud_training"
        variant: "quickstart"
        }
        labels {
        name: "fraudulent"
        variant: "quickstart"
        }
        primaryData {
        table {
            name: "Transactions"
        }
        }
        ```

        Args:
            name (str): Name of source to be retrieved
            variant (str): Name of variant of source

        Returns:
            source (Union[Source, SourceVariant]): Source or SourceVariant
        """
        if local:
            if not variant:
                return get_resource_info_local("source", name)
            return get_source_variant_info_local(name, variant)
        if not variant:
            return get_resource_info(self._stub, "source", name)
        return get_source_variant_info(self._stub, name, variant)

    def list_features(self, local=False):
        """List all features.

        **Examples:**
        ``` py title="Input"
        features_list = rc.list_features()
        ```

        ``` json title="Output"
        // list_features prints out formatted information on all features

        NAME                           VARIANT                        STATUS
        user_age                       quickstart (default)           READY
        avg_transactions               quickstart (default)           READY
        avg_transactions               production                     CREATED
        ```

        ``` py title="Input"
        print(features_list)
        ```

        ``` json title="Output"
        // list_features returns a list of Feature objects

        [name: "user_age"
        default_variant: "quickstart"
        variants: "quickstart"
        , name: "avg_transactions"
        default_variant: "quickstart"
        variants: "quickstart"
        variants: "production"
        ]
        ```

        Returns:
            features (List[Feature]): List of Feature Objects
        """
        if local:
            return list_local("feature", [ColumnName.NAME, ColumnName.VARIANT, ColumnName.STATUS])
        return list_name_variant_status(self._stub, "feature")

    def list_labels(self, local=False):
        """List all labels.

        **Examples:**
        ``` py title="Input"
        features_list = rc.list_labels()
        ```

        ``` json title="Output"
        // list_labels prints out formatted information on all labels

        NAME                           VARIANT                        STATUS
        user_age                       quickstart (default)           READY
        avg_transactions               quickstart (default)           READY
        avg_transactions               production                     CREATED
        ```

        ``` py title="Input"
        print(label_list)
        ```

        ``` json title="Output"
        // list_features returns a list of Feature objects

        [name: "user_age"
        default_variant: "quickstart"
        variants: "quickstart"
        , name: "avg_transactions"
        default_variant: "quickstart"
        variants: "quickstart"
        variants: "production"
        ]
        ```

        Returns:
            labels (List[Label]): List of Label Objects
        """
        if local:
            return list_local("label", [ColumnName.NAME, ColumnName.VARIANT, ColumnName.STATUS])
        return list_name_variant_status(self._stub, "label")

    def list_users(self, local=False):
        """List all users. Prints a list of all users.

        **Examples:**
        ``` py title="Input"
        users_list = rc.list_users()
        ```

        ``` json title="Output"
        // list_users prints out formatted information on all users

        NAME                           STATUS
        featureformer                  NO_STATUS
        featureformers_friend          CREATED
        ```

        ``` py title="Input"
        print(features_list)
        ```

        ``` json title="Output"
        // list_features returns a list of Feature objects

        [name: "featureformer"
        features {
        name: "avg_transactions"
        variant: "quickstart"
        }
        labels {
        name: "fraudulent"
        variant: "quickstart"
        }
        trainingsets {
        name: "fraud_training"
        variant: "quickstart"
        }
        sources {
        name: "transactions"
        variant: "kaggle"
        }
        sources {
        name: "average_user_transaction"
        variant: "quickstart"
        },
        name: "featureformers_friend"
        features {
        name: "user_age"
        variant: "production"
        }
        sources {
        name: "user_profiles"
        variant: "production"
        }
        ]
        ```

        Returns:
            users (List[User]): List of User Objects
        """
        if local:
            return list_local("user", [ColumnName.NAME, ColumnName.STATUS])
        return list_name_status(self._stub, "user")

    def list_entities(self, local=False):
        """List all entities. Prints a list of all entities.

        **Examples:**
        ``` py title="Input"
        entities = rc.list_entities()
        ```

        ``` json title="Output"
        // list_entities prints out formatted information on all entities

        NAME                           STATUS
        user                           CREATED
        transaction                    CREATED
        ```

        ``` py title="Input"
        print(features_list)
        ```

        ``` json title="Output"
        // list_entities returns a list of Entity objects

        [name: "user"
        features {
        name: "avg_transactions"
        variant: "quickstart"
        }
        features {
        name: "avg_transactions"
        variant: "production"
        }
        features {
        name: "user_age"
        variant: "quickstart"
        }
        labels {
        name: "fraudulent"
        variant: "quickstart"
        }
        trainingsets {
        name: "fraud_training"
        variant: "quickstart"
        }
        ,
        name: "transaction"
        features {
        name: "amount_spent"
        variant: "production"
        }
        ]
        ```

        Returns:
            entities (List[Entity]): List of Entity Objects
        """
        if local:
            return list_local("entity", [ColumnName.NAME, ColumnName.STATUS])
        return list_name_status(self._stub, "entity")

    def list_sources(self, local=False):
        """List all sources. Prints a list of all sources.

        **Examples:**
        ``` py title="Input"
        sources_list = rc.list_sources()
        ```

        ``` json title="Output"
        // list_sources prints out formatted information on all sources

        NAME                           VARIANT                        STATUS                         DESCRIPTION
        average_user_transaction       quickstart (default)           NO_STATUS                      the average transaction amount for a user
        transactions                   kaggle (default)               NO_STATUS                      Fraud Dataset From Kaggle
        ```

        ``` py title="Input"
        print(sources_list)
        ```

        ``` json title="Output"
        // list_sources returns a list of Source objects

        [name: "average_user_transaction"
        default_variant: "quickstart"
        variants: "quickstart"
        , name: "transactions"
        default_variant: "kaggle"
        variants: "kaggle"
        ]
        ```

        Returns:
            sources (List[Source]): List of Source Objects
        """
        if local:
            return list_local("source",
                              [ColumnName.NAME, ColumnName.VARIANT, ColumnName.STATUS, ColumnName.DESCRIPTION])
        return list_name_variant_status_desc(self._stub, "source")

    def list_training_sets(self, local=False):
        """List all training sets. Prints a list of all training sets.

        **Examples:**
        ``` py title="Input"
        training_sets_list = rc.list_training_sets()
        ```

        ``` json title="Output"
        // list_training_sets prints out formatted information on all training sets

        NAME                           VARIANT                        STATUS                         DESCRIPTION
        fraud_training                 quickstart (default)           READY                          Training set for fraud detection.
        fraud_training                 v2                             CREATED                        Improved training set for fraud detection.
        recommender                    v1 (default)                   CREATED                        Training set for recommender system.
        ```

        ``` py title="Input"
        print(training_sets_list)
        ```

        ``` json title="Output"
        // list_training_sets returns a list of TrainingSet objects

        [name: "fraud_training"
        default_variant: "quickstart"
        variants: "quickstart", "v2",
        name: "recommender"
        default_variant: "v1"
        variants: "v1"
        ]
        ```

        Returns:
            training_sets (List[TrainingSet]): List of TrainingSet Objects
        """
        if local:
            return list_local("training-set", [ColumnName.NAME, ColumnName.VARIANT, ColumnName.STATUS])
        return list_name_variant_status_desc(self._stub, "training-set")

    def list_models(self, local=False) -> List[Model]:
        """List all models. Prints a list of all models.

        Returns:
            models (List[Model]): List of Model Objects
        """
        models = []
        if local:
            rows = list_local("model", [ColumnName.NAME])
            models = [Model(row["name"], tags=[], properties={}) for row in rows]
        else:
            model_protos = list_name(self._stub, "model")
            # TODO: apply values from proto
            models = [Model(proto.name, tags=[], properties={}) for proto in model_protos]

        return models

    def list_providers(self, local=False):
        """List all providers. Prints a list of all providers.

        **Examples:**
        ``` py title="Input"
        providers_list = rc.list_providers()
        ```

        ``` json title="Output"
        // list_providers prints out formatted information on all providers

        NAME                           STATUS                         DESCRIPTION
        redis-quickstart               CREATED                      A Redis deployment we created for the Featureform quickstart
        postgres-quickstart            CREATED                      A Postgres deployment we created for the Featureform quickst
        ```

        ``` py title="Input"
        print(providers_list)
        ```

        ``` json title="Output"
        // list_providers returns a list of Providers objects

        [name: "redis-quickstart"
        description: "A Redis deployment we created for the Featureform quickstart"
        type: "REDIS_ONLINE"
        software: "redis"
        serialized_config: "{\"Addr\": \"quickstart-redis:6379\", \"Password\": \"\", \"DB\": 0}"
        features {
        name: "avg_transactions"
        variant: "quickstart"
        }
        features {
        name: "avg_transactions"
        variant: "production"
        }
        features {
        name: "user_age"
        variant: "quickstart"
        }
        , name: "postgres-quickstart"
        description: "A Postgres deployment we created for the Featureform quickstart"
        type: "POSTGRES_OFFLINE"
        software: "postgres"
        serialized_config: "{\"Host\": \"quickstart-postgres\", \"Port\": \"5432\", \"Username\": \"postgres\", \"Password\": \"password\", \"Database\": \"postgres\"}"
        sources {
        name: "transactions"
        variant: "kaggle"
        }
        sources {
        name: "average_user_transaction"
        variant: "quickstart"
        }
        trainingsets {
        name: "fraud_training"
        variant: "quickstart"
        }
        labels {
        name: "fraudulent"
        variant: "quickstart"
        }
        ]
        ```

        Returns:
            providers (List[Provider]): List of Provider Objects
        """
        if local:
            return list_local("provider", [ColumnName.NAME, ColumnName.STATUS, ColumnName.DESCRIPTION])
        return list_name_status_desc(self._stub, "provider")

    def search(self, raw_query, local=False):
        """Search for registered resources. Prints a list of results.

        **Examples:**
        ``` py title="Input"
        providers_list = rc.search("transact")
        ```

        ``` json title="Output"
        // search prints out formatted information on all matches

        NAME                           VARIANT            TYPE
        avg_transactions               default            Source
        ```
        """
        if type(raw_query) != str or len(raw_query) == 0:
            raise Exception("query must be string and cannot be empty")
        processed_query = raw_query.translate({ ord(i): None for i in '.,-@!*#'})
        if local:
            return search_local(processed_query)
        else:
            return search(processed_query, self._host)

__init__(host=None, local=False, insecure=False, cert_path=None, dry_run=False)

Initialise a Resource Client object.

Parameters:

Name Type Description Default
host str

The hostname of the Featureform instance. Exclude if using Localmode.

None
local bool

True if using Localmode.

False
insecure bool

True if connecting to an insecure Featureform endpoint. False if using a self-signed or public TLS certificate

False
cert_path str

The path to a public certificate if using a self-signed certificate.

None
Source code in src/featureform/register.py
def __init__(self, host=None, local=False, insecure=False, cert_path=None, dry_run=False):
    """Initialise a Resource Client object.

    Args:
        host (str): The hostname of the Featureform instance. Exclude if using Localmode.
        local (bool): True if using Localmode.
        insecure (bool): True if connecting to an insecure Featureform endpoint. False if using a self-signed or public TLS certificate
        cert_path (str): The path to a public certificate if using a self-signed certificate.
    """
    super().__init__()
    self._dry_run = dry_run
    self._stub = None
    self.local = local

    if dry_run:
        return

    if local and host:
        raise ValueError("Cannot be local and have a host")
    elif not local:
        host = host or os.getenv('FEATUREFORM_HOST')
        if host is None:
            raise RuntimeError(
                'If not in local mode then `host` must be passed or the environment'
                ' variable FEATUREFORM_HOST must be set.'
            )
        if insecure:
            channel = insecure_channel(host)
        else:
            channel = secure_channel(host, cert_path)
        self._stub = ff_grpc.ApiStub(channel)
        self._host = host

apply()

Apply all definitions, creating and retrieving all specified resources.

Source code in src/featureform/register.py
def apply(self):
    """Apply all definitions, creating and retrieving all specified resources.
    """

    if self._dry_run:
        print(state().sorted_list())
        return

    if self.local:
        state().create_all_local()
    else:
        state().create_all(self._stub)

get_entity(name, local=False)

Get an entity. Prints out information on entity, and all resources associated with the entity.

Examples:

Input
entity = rc.get_entity("user")
Output
// get_entity prints out formatted information on entity

ENTITY NAME:                   user
STATUS:                        NO_STATUS
-----------------------------------------------

NAME                           VARIANT                        TYPE
avg_transactions               quickstart                     feature
fraudulent                     quickstart                     label
fraud_training                 quickstart                     training set
-----------------------------------------------
Input
print(postgres)
Output
// get_entity returns the Entity object

name: "user"
features {
name: "avg_transactions"
variant: "quickstart"
}
labels {
name: "fraudulent"
variant: "quickstart"
}
trainingsets {
name: "fraud_training"
variant: "quickstart"
}
Source code in src/featureform/register.py
def get_entity(self, name, local=False):
    """Get an entity. Prints out information on entity, and all resources associated with the entity.

    **Examples:**

    ``` py title="Input"
    entity = rc.get_entity("user")
    ```

    ``` json title="Output"
    // get_entity prints out formatted information on entity

    ENTITY NAME:                   user
    STATUS:                        NO_STATUS
    -----------------------------------------------

    NAME                           VARIANT                        TYPE
    avg_transactions               quickstart                     feature
    fraudulent                     quickstart                     label
    fraud_training                 quickstart                     training set
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(postgres)
    ```

    ``` json title="Output"
    // get_entity returns the Entity object

    name: "user"
    features {
    name: "avg_transactions"
    variant: "quickstart"
    }
    labels {
    name: "fraudulent"
    variant: "quickstart"
    }
    trainingsets {
    name: "fraud_training"
    variant: "quickstart"
    }
    ```
    """
    if local:
        return get_entity_info_local(name)
    return get_entity_info(self._stub, name)

get_model(name, local=False)

Get a model. Prints out information on model, and all resources associated with the model.

Parameters:

Name Type Description Default
name str

Name of model to be retrieved

required

Returns:

Name Type Description
model Model

Model

Source code in src/featureform/register.py
def get_model(self, name, local=False) -> Model:
    """Get a model. Prints out information on model, and all resources associated with the model.

    Args:
        name (str): Name of model to be retrieved

    Returns:
        model (Model): Model
    """
    if local:
        model = get_model_info_local(name)
    else:
        model_proto = get_resource_info(self._stub, "model", name)
        if model_proto is None:
            model = None
        else:
            # TODO: apply values from proto
            model = Model(model_proto.name, tags=[], properties={})

    return model

get_provider(name, local=False)

Get a provider. Prints out information on provider, and all resources associated with the provider.

Examples:

Input
postgres = rc.get_provider("postgres-quickstart")
Output
// get_provider prints out formatted information on provider

NAME:                          postgres-quickstart
DESCRIPTION:                   A Postgres deployment we created for the Featureform quickstart
TYPE:                          POSTGRES_OFFLINE
SOFTWARE:                      postgres
STATUS:                        NO_STATUS
-----------------------------------------------
SOURCES:
NAME                           VARIANT
transactions                   kaggle
average_user_transaction       quickstart
-----------------------------------------------
FEATURES:
NAME                           VARIANT
-----------------------------------------------
LABELS:
NAME                           VARIANT
fraudulent                     quickstart
-----------------------------------------------
TRAINING SETS:
NAME                           VARIANT
fraud_training                 quickstart
-----------------------------------------------
Input
print(postgres)
Output
// get_provider returns the Provider object

name: "postgres-quickstart"
description: "A Postgres deployment we created for the Featureform quickstart"
type: "POSTGRES_OFFLINE"
software: "postgres"
serialized_config: "{"Host": "quickstart-postgres",
                    "Port": "5432",
                    "Username": "postgres",
                    "Password": "password",
                    "Database": "postgres"}"
sources {
name: "transactions"
variant: "kaggle"
}
sources {
name: "average_user_transaction"
variant: "quickstart"
}
trainingsets {
name: "fraud_training"
variant: "quickstart"
}
labels {
name: "fraudulent"
variant: "quickstart"
}

Parameters:

Name Type Description Default
name str

Name of provider to be retrieved

required

Returns:

Name Type Description
provider Provider

Provider

Source code in src/featureform/register.py
def get_provider(self, name, local=False):
    """Get a provider. Prints out information on provider, and all resources associated with the provider.

    **Examples:**

    ``` py title="Input"
    postgres = rc.get_provider("postgres-quickstart")
    ```

    ``` json title="Output"
    // get_provider prints out formatted information on provider

    NAME:                          postgres-quickstart
    DESCRIPTION:                   A Postgres deployment we created for the Featureform quickstart
    TYPE:                          POSTGRES_OFFLINE
    SOFTWARE:                      postgres
    STATUS:                        NO_STATUS
    -----------------------------------------------
    SOURCES:
    NAME                           VARIANT
    transactions                   kaggle
    average_user_transaction       quickstart
    -----------------------------------------------
    FEATURES:
    NAME                           VARIANT
    -----------------------------------------------
    LABELS:
    NAME                           VARIANT
    fraudulent                     quickstart
    -----------------------------------------------
    TRAINING SETS:
    NAME                           VARIANT
    fraud_training                 quickstart
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(postgres)
    ```

    ``` json title="Output"
    // get_provider returns the Provider object

    name: "postgres-quickstart"
    description: "A Postgres deployment we created for the Featureform quickstart"
    type: "POSTGRES_OFFLINE"
    software: "postgres"
    serialized_config: "{\"Host\": \"quickstart-postgres\",
                        \"Port\": \"5432\",
                        \"Username\": \"postgres\",
                        \"Password\": \"password\",
                        \"Database\": \"postgres\"}"
    sources {
    name: "transactions"
    variant: "kaggle"
    }
    sources {
    name: "average_user_transaction"
    variant: "quickstart"
    }
    trainingsets {
    name: "fraud_training"
    variant: "quickstart"
    }
    labels {
    name: "fraudulent"
    variant: "quickstart"
    }
    ```

    Args:
        name (str): Name of provider to be retrieved

    Returns:
        provider (Provider): Provider
    """
    if local:
        return get_provider_info_local(name)
    return get_provider_info(self._stub, name)

get_user(name, local=False)

Get a user. Prints out name of user, and all resources associated with the user.

Examples:

Input
featureformer = rc.get_user("featureformer")
Output
// get_user prints out formatted information on user
USER NAME:                     featureformer
-----------------------------------------------

NAME                           VARIANT                        TYPE
avg_transactions               quickstart                     feature
fraudulent                     quickstart                     label
fraud_training                 quickstart                     training set
transactions                   kaggle                         source
average_user_transaction       quickstart                     source
-----------------------------------------------
Input
print(featureformer)
Output
// get_user returns the User object

name: "featureformer"
features {
name: "avg_transactions"
variant: "quickstart"
}
labels {
name: "fraudulent"
variant: "quickstart"
}
trainingsets {
name: "fraud_training"
variant: "quickstart"
}
sources {
name: "transactions"
variant: "kaggle"
}
sources {
name: "average_user_transaction"
variant: "quickstart"
}

Parameters:

Name Type Description Default
name str

Name of user to be retrieved

required

Returns:

Name Type Description
user User

User

Source code in src/featureform/register.py
def get_user(self, name, local=False):
    """Get a user. Prints out name of user, and all resources associated with the user.

    **Examples:**

    ``` py title="Input"
    featureformer = rc.get_user("featureformer")
    ```

    ``` json title="Output"
    // get_user prints out formatted information on user
    USER NAME:                     featureformer
    -----------------------------------------------

    NAME                           VARIANT                        TYPE
    avg_transactions               quickstart                     feature
    fraudulent                     quickstart                     label
    fraud_training                 quickstart                     training set
    transactions                   kaggle                         source
    average_user_transaction       quickstart                     source
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(featureformer)
    ```

    ``` json title="Output"
    // get_user returns the User object

    name: "featureformer"
    features {
    name: "avg_transactions"
    variant: "quickstart"
    }
    labels {
    name: "fraudulent"
    variant: "quickstart"
    }
    trainingsets {
    name: "fraud_training"
    variant: "quickstart"
    }
    sources {
    name: "transactions"
    variant: "kaggle"
    }
    sources {
    name: "average_user_transaction"
    variant: "quickstart"
    }
    ```

    Args:
        name (str): Name of user to be retrieved

    Returns:
        user (User): User
    """
    if local:
        return get_user_info_local(name)
    return get_user_info(self._stub, name)

list_entities(local=False)

List all entities. Prints a list of all entities.

Examples:

Input
entities = rc.list_entities()

Output
// list_entities prints out formatted information on all entities

NAME                           STATUS
user                           CREATED
transaction                    CREATED
Input
print(features_list)
Output
// list_entities returns a list of Entity objects

[name: "user"
features {
name: "avg_transactions"
variant: "quickstart"
}
features {
name: "avg_transactions"
variant: "production"
}
features {
name: "user_age"
variant: "quickstart"
}
labels {
name: "fraudulent"
variant: "quickstart"
}
trainingsets {
name: "fraud_training"
variant: "quickstart"
}
,
name: "transaction"
features {
name: "amount_spent"
variant: "production"
}
]

Returns:

Name Type Description
entities List[Entity]

List of Entity Objects

Source code in src/featureform/register.py
def list_entities(self, local=False):
    """List all entities. Prints a list of all entities.

    **Examples:**
    ``` py title="Input"
    entities = rc.list_entities()
    ```

    ``` json title="Output"
    // list_entities prints out formatted information on all entities

    NAME                           STATUS
    user                           CREATED
    transaction                    CREATED
    ```

    ``` py title="Input"
    print(features_list)
    ```

    ``` json title="Output"
    // list_entities returns a list of Entity objects

    [name: "user"
    features {
    name: "avg_transactions"
    variant: "quickstart"
    }
    features {
    name: "avg_transactions"
    variant: "production"
    }
    features {
    name: "user_age"
    variant: "quickstart"
    }
    labels {
    name: "fraudulent"
    variant: "quickstart"
    }
    trainingsets {
    name: "fraud_training"
    variant: "quickstart"
    }
    ,
    name: "transaction"
    features {
    name: "amount_spent"
    variant: "production"
    }
    ]
    ```

    Returns:
        entities (List[Entity]): List of Entity Objects
    """
    if local:
        return list_local("entity", [ColumnName.NAME, ColumnName.STATUS])
    return list_name_status(self._stub, "entity")

list_features(local=False)

List all features.

Examples:

Input
features_list = rc.list_features()

Output
// list_features prints out formatted information on all features

NAME                           VARIANT                        STATUS
user_age                       quickstart (default)           READY
avg_transactions               quickstart (default)           READY
avg_transactions               production                     CREATED
Input
print(features_list)
Output
// list_features returns a list of Feature objects

[name: "user_age"
default_variant: "quickstart"
variants: "quickstart"
, name: "avg_transactions"
default_variant: "quickstart"
variants: "quickstart"
variants: "production"
]

Returns:

Name Type Description
features List[Feature]

List of Feature Objects

Source code in src/featureform/register.py
def list_features(self, local=False):
    """List all features.

    **Examples:**
    ``` py title="Input"
    features_list = rc.list_features()
    ```

    ``` json title="Output"
    // list_features prints out formatted information on all features

    NAME                           VARIANT                        STATUS
    user_age                       quickstart (default)           READY
    avg_transactions               quickstart (default)           READY
    avg_transactions               production                     CREATED
    ```

    ``` py title="Input"
    print(features_list)
    ```

    ``` json title="Output"
    // list_features returns a list of Feature objects

    [name: "user_age"
    default_variant: "quickstart"
    variants: "quickstart"
    , name: "avg_transactions"
    default_variant: "quickstart"
    variants: "quickstart"
    variants: "production"
    ]
    ```

    Returns:
        features (List[Feature]): List of Feature Objects
    """
    if local:
        return list_local("feature", [ColumnName.NAME, ColumnName.VARIANT, ColumnName.STATUS])
    return list_name_variant_status(self._stub, "feature")

list_labels(local=False)

List all labels.

Examples:

Input
features_list = rc.list_labels()

Output
// list_labels prints out formatted information on all labels

NAME                           VARIANT                        STATUS
user_age                       quickstart (default)           READY
avg_transactions               quickstart (default)           READY
avg_transactions               production                     CREATED
Input
print(label_list)
Output
// list_features returns a list of Feature objects

[name: "user_age"
default_variant: "quickstart"
variants: "quickstart"
, name: "avg_transactions"
default_variant: "quickstart"
variants: "quickstart"
variants: "production"
]

Returns:

Name Type Description
labels List[Label]

List of Label Objects

Source code in src/featureform/register.py
def list_labels(self, local=False):
    """List all labels.

    **Examples:**
    ``` py title="Input"
    features_list = rc.list_labels()
    ```

    ``` json title="Output"
    // list_labels prints out formatted information on all labels

    NAME                           VARIANT                        STATUS
    user_age                       quickstart (default)           READY
    avg_transactions               quickstart (default)           READY
    avg_transactions               production                     CREATED
    ```

    ``` py title="Input"
    print(label_list)
    ```

    ``` json title="Output"
    // list_features returns a list of Feature objects

    [name: "user_age"
    default_variant: "quickstart"
    variants: "quickstart"
    , name: "avg_transactions"
    default_variant: "quickstart"
    variants: "quickstart"
    variants: "production"
    ]
    ```

    Returns:
        labels (List[Label]): List of Label Objects
    """
    if local:
        return list_local("label", [ColumnName.NAME, ColumnName.VARIANT, ColumnName.STATUS])
    return list_name_variant_status(self._stub, "label")

list_models(local=False)

List all models. Prints a list of all models.

Returns:

Name Type Description
models List[Model]

List of Model Objects

Source code in src/featureform/register.py
def list_models(self, local=False) -> List[Model]:
    """List all models. Prints a list of all models.

    Returns:
        models (List[Model]): List of Model Objects
    """
    models = []
    if local:
        rows = list_local("model", [ColumnName.NAME])
        models = [Model(row["name"], tags=[], properties={}) for row in rows]
    else:
        model_protos = list_name(self._stub, "model")
        # TODO: apply values from proto
        models = [Model(proto.name, tags=[], properties={}) for proto in model_protos]

    return models

list_providers(local=False)

List all providers. Prints a list of all providers.

Examples:

Input
providers_list = rc.list_providers()

Output
// list_providers prints out formatted information on all providers

NAME                           STATUS                         DESCRIPTION
redis-quickstart               CREATED                      A Redis deployment we created for the Featureform quickstart
postgres-quickstart            CREATED                      A Postgres deployment we created for the Featureform quickst
Input
print(providers_list)
Output
// list_providers returns a list of Providers objects

[name: "redis-quickstart"
description: "A Redis deployment we created for the Featureform quickstart"
type: "REDIS_ONLINE"
software: "redis"
serialized_config: "{"Addr": "quickstart-redis:6379", "Password": "", "DB": 0}"
features {
name: "avg_transactions"
variant: "quickstart"
}
features {
name: "avg_transactions"
variant: "production"
}
features {
name: "user_age"
variant: "quickstart"
}
, name: "postgres-quickstart"
description: "A Postgres deployment we created for the Featureform quickstart"
type: "POSTGRES_OFFLINE"
software: "postgres"
serialized_config: "{"Host": "quickstart-postgres", "Port": "5432", "Username": "postgres", "Password": "password", "Database": "postgres"}"
sources {
name: "transactions"
variant: "kaggle"
}
sources {
name: "average_user_transaction"
variant: "quickstart"
}
trainingsets {
name: "fraud_training"
variant: "quickstart"
}
labels {
name: "fraudulent"
variant: "quickstart"
}
]

Returns:

Name Type Description
providers List[Provider]

List of Provider Objects

Source code in src/featureform/register.py
def list_providers(self, local=False):
    """List all providers. Prints a list of all providers.

    **Examples:**
    ``` py title="Input"
    providers_list = rc.list_providers()
    ```

    ``` json title="Output"
    // list_providers prints out formatted information on all providers

    NAME                           STATUS                         DESCRIPTION
    redis-quickstart               CREATED                      A Redis deployment we created for the Featureform quickstart
    postgres-quickstart            CREATED                      A Postgres deployment we created for the Featureform quickst
    ```

    ``` py title="Input"
    print(providers_list)
    ```

    ``` json title="Output"
    // list_providers returns a list of Providers objects

    [name: "redis-quickstart"
    description: "A Redis deployment we created for the Featureform quickstart"
    type: "REDIS_ONLINE"
    software: "redis"
    serialized_config: "{\"Addr\": \"quickstart-redis:6379\", \"Password\": \"\", \"DB\": 0}"
    features {
    name: "avg_transactions"
    variant: "quickstart"
    }
    features {
    name: "avg_transactions"
    variant: "production"
    }
    features {
    name: "user_age"
    variant: "quickstart"
    }
    , name: "postgres-quickstart"
    description: "A Postgres deployment we created for the Featureform quickstart"
    type: "POSTGRES_OFFLINE"
    software: "postgres"
    serialized_config: "{\"Host\": \"quickstart-postgres\", \"Port\": \"5432\", \"Username\": \"postgres\", \"Password\": \"password\", \"Database\": \"postgres\"}"
    sources {
    name: "transactions"
    variant: "kaggle"
    }
    sources {
    name: "average_user_transaction"
    variant: "quickstart"
    }
    trainingsets {
    name: "fraud_training"
    variant: "quickstart"
    }
    labels {
    name: "fraudulent"
    variant: "quickstart"
    }
    ]
    ```

    Returns:
        providers (List[Provider]): List of Provider Objects
    """
    if local:
        return list_local("provider", [ColumnName.NAME, ColumnName.STATUS, ColumnName.DESCRIPTION])
    return list_name_status_desc(self._stub, "provider")

list_sources(local=False)

List all sources. Prints a list of all sources.

Examples:

Input
sources_list = rc.list_sources()

Output
// list_sources prints out formatted information on all sources

NAME                           VARIANT                        STATUS                         DESCRIPTION
average_user_transaction       quickstart (default)           NO_STATUS                      the average transaction amount for a user
transactions                   kaggle (default)               NO_STATUS                      Fraud Dataset From Kaggle
Input
print(sources_list)
Output
// list_sources returns a list of Source objects

[name: "average_user_transaction"
default_variant: "quickstart"
variants: "quickstart"
, name: "transactions"
default_variant: "kaggle"
variants: "kaggle"
]

Returns:

Name Type Description
sources List[Source]

List of Source Objects

Source code in src/featureform/register.py
def list_sources(self, local=False):
    """List all sources. Prints a list of all sources.

    **Examples:**
    ``` py title="Input"
    sources_list = rc.list_sources()
    ```

    ``` json title="Output"
    // list_sources prints out formatted information on all sources

    NAME                           VARIANT                        STATUS                         DESCRIPTION
    average_user_transaction       quickstart (default)           NO_STATUS                      the average transaction amount for a user
    transactions                   kaggle (default)               NO_STATUS                      Fraud Dataset From Kaggle
    ```

    ``` py title="Input"
    print(sources_list)
    ```

    ``` json title="Output"
    // list_sources returns a list of Source objects

    [name: "average_user_transaction"
    default_variant: "quickstart"
    variants: "quickstart"
    , name: "transactions"
    default_variant: "kaggle"
    variants: "kaggle"
    ]
    ```

    Returns:
        sources (List[Source]): List of Source Objects
    """
    if local:
        return list_local("source",
                          [ColumnName.NAME, ColumnName.VARIANT, ColumnName.STATUS, ColumnName.DESCRIPTION])
    return list_name_variant_status_desc(self._stub, "source")

list_training_sets(local=False)

List all training sets. Prints a list of all training sets.

Examples:

Input
training_sets_list = rc.list_training_sets()

Output
// list_training_sets prints out formatted information on all training sets

NAME                           VARIANT                        STATUS                         DESCRIPTION
fraud_training                 quickstart (default)           READY                          Training set for fraud detection.
fraud_training                 v2                             CREATED                        Improved training set for fraud detection.
recommender                    v1 (default)                   CREATED                        Training set for recommender system.
Input
print(training_sets_list)
Output
// list_training_sets returns a list of TrainingSet objects

[name: "fraud_training"
default_variant: "quickstart"
variants: "quickstart", "v2",
name: "recommender"
default_variant: "v1"
variants: "v1"
]

Returns:

Name Type Description
training_sets List[TrainingSet]

List of TrainingSet Objects

Source code in src/featureform/register.py
def list_training_sets(self, local=False):
    """List all training sets. Prints a list of all training sets.

    **Examples:**
    ``` py title="Input"
    training_sets_list = rc.list_training_sets()
    ```

    ``` json title="Output"
    // list_training_sets prints out formatted information on all training sets

    NAME                           VARIANT                        STATUS                         DESCRIPTION
    fraud_training                 quickstart (default)           READY                          Training set for fraud detection.
    fraud_training                 v2                             CREATED                        Improved training set for fraud detection.
    recommender                    v1 (default)                   CREATED                        Training set for recommender system.
    ```

    ``` py title="Input"
    print(training_sets_list)
    ```

    ``` json title="Output"
    // list_training_sets returns a list of TrainingSet objects

    [name: "fraud_training"
    default_variant: "quickstart"
    variants: "quickstart", "v2",
    name: "recommender"
    default_variant: "v1"
    variants: "v1"
    ]
    ```

    Returns:
        training_sets (List[TrainingSet]): List of TrainingSet Objects
    """
    if local:
        return list_local("training-set", [ColumnName.NAME, ColumnName.VARIANT, ColumnName.STATUS])
    return list_name_variant_status_desc(self._stub, "training-set")

list_users(local=False)

List all users. Prints a list of all users.

Examples:

Input
users_list = rc.list_users()

Output
// list_users prints out formatted information on all users

NAME                           STATUS
featureformer                  NO_STATUS
featureformers_friend          CREATED
Input
print(features_list)
Output
// list_features returns a list of Feature objects

[name: "featureformer"
features {
name: "avg_transactions"
variant: "quickstart"
}
labels {
name: "fraudulent"
variant: "quickstart"
}
trainingsets {
name: "fraud_training"
variant: "quickstart"
}
sources {
name: "transactions"
variant: "kaggle"
}
sources {
name: "average_user_transaction"
variant: "quickstart"
},
name: "featureformers_friend"
features {
name: "user_age"
variant: "production"
}
sources {
name: "user_profiles"
variant: "production"
}
]

Returns:

Name Type Description
users List[User]

List of User Objects

Source code in src/featureform/register.py
def list_users(self, local=False):
    """List all users. Prints a list of all users.

    **Examples:**
    ``` py title="Input"
    users_list = rc.list_users()
    ```

    ``` json title="Output"
    // list_users prints out formatted information on all users

    NAME                           STATUS
    featureformer                  NO_STATUS
    featureformers_friend          CREATED
    ```

    ``` py title="Input"
    print(features_list)
    ```

    ``` json title="Output"
    // list_features returns a list of Feature objects

    [name: "featureformer"
    features {
    name: "avg_transactions"
    variant: "quickstart"
    }
    labels {
    name: "fraudulent"
    variant: "quickstart"
    }
    trainingsets {
    name: "fraud_training"
    variant: "quickstart"
    }
    sources {
    name: "transactions"
    variant: "kaggle"
    }
    sources {
    name: "average_user_transaction"
    variant: "quickstart"
    },
    name: "featureformers_friend"
    features {
    name: "user_age"
    variant: "production"
    }
    sources {
    name: "user_profiles"
    variant: "production"
    }
    ]
    ```

    Returns:
        users (List[User]): List of User Objects
    """
    if local:
        return list_local("user", [ColumnName.NAME, ColumnName.STATUS])
    return list_name_status(self._stub, "user")

print_feature(name, variant=None, local=False)

Get a feature. Prints out information on feature, and all variants associated with the feature. If variant is included, print information on that specific variant and all resources associated with it.

Examples:

Input
avg_transactions = rc.get_feature("avg_transactions")
Output
// get_feature prints out formatted information on feature

NAME:                          avg_transactions
STATUS:                        NO_STATUS
-----------------------------------------------
VARIANTS:
quickstart                     default
-----------------------------------------------
Input
print(avg_transactions)
Output
// get_feature returns the Feature object

name: "avg_transactions"
default_variant: "quickstart"
variants: "quickstart"
Input
avg_transactions_variant = ff.get_feature("avg_transactions", "quickstart")
Output
// get_feature with variant provided prints out formatted information on feature variant

NAME:                          avg_transactions
VARIANT:                       quickstart
TYPE:                          float32
ENTITY:                        user
OWNER:                         featureformer
PROVIDER:                      redis-quickstart
STATUS:                        NO_STATUS
-----------------------------------------------
SOURCE:
NAME                           VARIANT
average_user_transaction       quickstart
-----------------------------------------------
TRAINING SETS:
NAME                           VARIANT
fraud_training                 quickstart
-----------------------------------------------
Input
print(avg_transactions_variant)
Output
// get_feature returns the FeatureVariant object

name: "avg_transactions"
variant: "quickstart"
source {
name: "average_user_transaction"
variant: "quickstart"
}
type: "float32"
entity: "user"
created {
seconds: 1658168552
nanos: 142461900
}
owner: "featureformer"
provider: "redis-quickstart"
trainingsets {
name: "fraud_training"
variant: "quickstart"
}
columns {
entity: "user_id"
value: "avg_transaction_amt"
}

Parameters:

Name Type Description Default
name str

Name of feature to be retrieved

required
variant str

Name of variant of feature

None

Returns:

Name Type Description
feature Union[Feature, FeatureVariant]

Feature or FeatureVariant

Source code in src/featureform/register.py
def print_feature(self, name, variant=None, local=False):
    """Get a feature. Prints out information on feature, and all variants associated with the feature. If variant is included, print information on that specific variant and all resources associated with it.

    **Examples:**

    ``` py title="Input"
    avg_transactions = rc.get_feature("avg_transactions")
    ```

    ``` json title="Output"
    // get_feature prints out formatted information on feature

    NAME:                          avg_transactions
    STATUS:                        NO_STATUS
    -----------------------------------------------
    VARIANTS:
    quickstart                     default
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(avg_transactions)
    ```

    ``` json title="Output"
    // get_feature returns the Feature object

    name: "avg_transactions"
    default_variant: "quickstart"
    variants: "quickstart"
    ```

    ``` py title="Input"
    avg_transactions_variant = ff.get_feature("avg_transactions", "quickstart")
    ```

    ``` json title="Output"
    // get_feature with variant provided prints out formatted information on feature variant

    NAME:                          avg_transactions
    VARIANT:                       quickstart
    TYPE:                          float32
    ENTITY:                        user
    OWNER:                         featureformer
    PROVIDER:                      redis-quickstart
    STATUS:                        NO_STATUS
    -----------------------------------------------
    SOURCE:
    NAME                           VARIANT
    average_user_transaction       quickstart
    -----------------------------------------------
    TRAINING SETS:
    NAME                           VARIANT
    fraud_training                 quickstart
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(avg_transactions_variant)
    ```

    ``` json title="Output"
    // get_feature returns the FeatureVariant object

    name: "avg_transactions"
    variant: "quickstart"
    source {
    name: "average_user_transaction"
    variant: "quickstart"
    }
    type: "float32"
    entity: "user"
    created {
    seconds: 1658168552
    nanos: 142461900
    }
    owner: "featureformer"
    provider: "redis-quickstart"
    trainingsets {
    name: "fraud_training"
    variant: "quickstart"
    }
    columns {
    entity: "user_id"
    value: "avg_transaction_amt"
    }
    ```

    Args:
        name (str): Name of feature to be retrieved
        variant (str): Name of variant of feature

    Returns:
        feature (Union[Feature, FeatureVariant]): Feature or FeatureVariant
    """
    if local:
        if not variant:
            return get_resource_info_local("feature", name)
        return get_feature_variant_info_local(name, variant)
    if not variant:
        return get_resource_info(self._stub, "feature", name)
    return get_feature_variant_info(self._stub, name, variant)

print_label(name, variant=None, local=False)

Get a label. Prints out information on label, and all variants associated with the label. If variant is included, print information on that specific variant and all resources associated with it.

Examples:

Input
fraudulent = rc.get_label("fraudulent")
Output
// get_label prints out formatted information on label

NAME:                          fraudulent
STATUS:                        NO_STATUS
-----------------------------------------------
VARIANTS:
quickstart                     default
-----------------------------------------------
Input
print(fraudulent)
Output
// get_label returns the Label object

name: "fraudulent"
default_variant: "quickstart"
variants: "quickstart"
Input
fraudulent_variant = ff.get_label("fraudulent", "quickstart")
Output
// get_label with variant provided prints out formatted information on label variant

NAME:                          fraudulent
VARIANT:                       quickstart
TYPE:                          bool
ENTITY:                        user
OWNER:                         featureformer
PROVIDER:                      postgres-quickstart
STATUS:                        NO_STATUS
-----------------------------------------------
SOURCE:
NAME                           VARIANT
transactions                   kaggle
-----------------------------------------------
TRAINING SETS:
NAME                           VARIANT
fraud_training                 quickstart
-----------------------------------------------
Input
print(fraudulent_variant)
Output
// get_label returns the LabelVariant object

name: "fraudulent"
variant: "quickstart"
type: "bool"
source {
name: "transactions"
variant: "kaggle"
}
entity: "user"
created {
seconds: 1658168552
nanos: 154924300
}
owner: "featureformer"
provider: "postgres-quickstart"
trainingsets {
name: "fraud_training"
variant: "quickstart"
}
columns {
entity: "customerid"
value: "isfraud"
}

Parameters:

Name Type Description Default
name str

Name of label to be retrieved

required
variant str

Name of variant of label

None

Returns:

Name Type Description
label Union[label, LabelVariant]

Label or LabelVariant

Source code in src/featureform/register.py
def print_label(self, name, variant=None, local=False):
    """Get a label. Prints out information on label, and all variants associated with the label. If variant is included, print information on that specific variant and all resources associated with it.

    **Examples:**

    ``` py title="Input"
    fraudulent = rc.get_label("fraudulent")
    ```

    ``` json title="Output"
    // get_label prints out formatted information on label

    NAME:                          fraudulent
    STATUS:                        NO_STATUS
    -----------------------------------------------
    VARIANTS:
    quickstart                     default
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(fraudulent)
    ```

    ``` json title="Output"
    // get_label returns the Label object

    name: "fraudulent"
    default_variant: "quickstart"
    variants: "quickstart"
    ```

    ``` py title="Input"
    fraudulent_variant = ff.get_label("fraudulent", "quickstart")
    ```

    ``` json title="Output"
    // get_label with variant provided prints out formatted information on label variant

    NAME:                          fraudulent
    VARIANT:                       quickstart
    TYPE:                          bool
    ENTITY:                        user
    OWNER:                         featureformer
    PROVIDER:                      postgres-quickstart
    STATUS:                        NO_STATUS
    -----------------------------------------------
    SOURCE:
    NAME                           VARIANT
    transactions                   kaggle
    -----------------------------------------------
    TRAINING SETS:
    NAME                           VARIANT
    fraud_training                 quickstart
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(fraudulent_variant)
    ```

    ``` json title="Output"
    // get_label returns the LabelVariant object

    name: "fraudulent"
    variant: "quickstart"
    type: "bool"
    source {
    name: "transactions"
    variant: "kaggle"
    }
    entity: "user"
    created {
    seconds: 1658168552
    nanos: 154924300
    }
    owner: "featureformer"
    provider: "postgres-quickstart"
    trainingsets {
    name: "fraud_training"
    variant: "quickstart"
    }
    columns {
    entity: "customerid"
    value: "isfraud"
    }
    ```

    Args:
        name (str): Name of label to be retrieved
        variant (str): Name of variant of label

    Returns:
        label (Union[label, LabelVariant]): Label or LabelVariant
    """
    if local:
        if not variant:
            return get_resource_info_local("label", name)
        return get_label_variant_info_local(name, variant)
    if not variant:
        return get_resource_info(self._stub, "label", name)
    return get_label_variant_info(self._stub, name, variant)

print_source(name, variant=None, local=False)

Get a source. Prints out information on source, and all variants associated with the source. If variant is included, print information on that specific variant and all resources associated with it.

Examples:

Input
transactions = rc.get_transactions("transactions")
Output
// get_source prints out formatted information on source

NAME:                          transactions
STATUS:                        NO_STATUS
-----------------------------------------------
VARIANTS:
kaggle                         default
-----------------------------------------------
Input
print(transactions)
Output
// get_source returns the Source object

name: "transactions"
default_variant: "kaggle"
variants: "kaggle"
Input
transactions_variant = rc.get_source("transactions", "kaggle")
Output
// get_source with variant provided prints out formatted information on source variant

NAME:                          transactions
VARIANT:                       kaggle
OWNER:                         featureformer
DESCRIPTION:                   Fraud Dataset From Kaggle
PROVIDER:                      postgres-quickstart
STATUS:                        NO_STATUS
-----------------------------------------------
DEFINITION:
TRANSFORMATION

-----------------------------------------------
SOURCES
NAME                           VARIANT
-----------------------------------------------
PRIMARY DATA
Transactions
FEATURES:
NAME                           VARIANT
-----------------------------------------------
LABELS:
NAME                           VARIANT
fraudulent                     quickstart
-----------------------------------------------
TRAINING SETS:
NAME                           VARIANT
fraud_training                 quickstart
-----------------------------------------------
Input
print(transactions_variant)
Output
// get_source returns the SourceVariant object

name: "transactions"
variant: "kaggle"
owner: "featureformer"
description: "Fraud Dataset From Kaggle"
provider: "postgres-quickstart"
created {
seconds: 1658168552
nanos: 128768000
}
trainingsets {
name: "fraud_training"
variant: "quickstart"
}
labels {
name: "fraudulent"
variant: "quickstart"
}
primaryData {
table {
    name: "Transactions"
}
}

Parameters:

Name Type Description Default
name str

Name of source to be retrieved

required
variant str

Name of variant of source

None

Returns:

Name Type Description
source Union[Source, SourceVariant]

Source or SourceVariant

Source code in src/featureform/register.py
def print_source(self, name, variant=None, local=False):
    """Get a source. Prints out information on source, and all variants associated with the source. If variant is included, print information on that specific variant and all resources associated with it.

    **Examples:**

    ``` py title="Input"
    transactions = rc.get_transactions("transactions")
    ```

    ``` json title="Output"
    // get_source prints out formatted information on source

    NAME:                          transactions
    STATUS:                        NO_STATUS
    -----------------------------------------------
    VARIANTS:
    kaggle                         default
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(transactions)
    ```

    ``` json title="Output"
    // get_source returns the Source object

    name: "transactions"
    default_variant: "kaggle"
    variants: "kaggle"
    ```

    ``` py title="Input"
    transactions_variant = rc.get_source("transactions", "kaggle")
    ```

    ``` json title="Output"
    // get_source with variant provided prints out formatted information on source variant

    NAME:                          transactions
    VARIANT:                       kaggle
    OWNER:                         featureformer
    DESCRIPTION:                   Fraud Dataset From Kaggle
    PROVIDER:                      postgres-quickstart
    STATUS:                        NO_STATUS
    -----------------------------------------------
    DEFINITION:
    TRANSFORMATION

    -----------------------------------------------
    SOURCES
    NAME                           VARIANT
    -----------------------------------------------
    PRIMARY DATA
    Transactions
    FEATURES:
    NAME                           VARIANT
    -----------------------------------------------
    LABELS:
    NAME                           VARIANT
    fraudulent                     quickstart
    -----------------------------------------------
    TRAINING SETS:
    NAME                           VARIANT
    fraud_training                 quickstart
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(transactions_variant)
    ```

    ``` json title="Output"
    // get_source returns the SourceVariant object

    name: "transactions"
    variant: "kaggle"
    owner: "featureformer"
    description: "Fraud Dataset From Kaggle"
    provider: "postgres-quickstart"
    created {
    seconds: 1658168552
    nanos: 128768000
    }
    trainingsets {
    name: "fraud_training"
    variant: "quickstart"
    }
    labels {
    name: "fraudulent"
    variant: "quickstart"
    }
    primaryData {
    table {
        name: "Transactions"
    }
    }
    ```

    Args:
        name (str): Name of source to be retrieved
        variant (str): Name of variant of source

    Returns:
        source (Union[Source, SourceVariant]): Source or SourceVariant
    """
    if local:
        if not variant:
            return get_resource_info_local("source", name)
        return get_source_variant_info_local(name, variant)
    if not variant:
        return get_resource_info(self._stub, "source", name)
    return get_source_variant_info(self._stub, name, variant)

print_training_set(name, variant=None, local=False)

Get a training set. Prints out information on training set, and all variants associated with the training set. If variant is included, print information on that specific variant and all resources associated with it.

Examples:

Input
fraud_training = rc.get_training_set("fraud_training")
Output
// get_training_set prints out formatted information on training set

NAME:                          fraud_training
STATUS:                        NO_STATUS
-----------------------------------------------
VARIANTS:
quickstart                     default
-----------------------------------------------
Input
print(fraud_training)
Output
// get_training_set returns the TrainingSet object

name: "fraud_training"
default_variant: "quickstart"
variants: "quickstart"
Input
fraudulent_variant = ff.get_training set("fraudulent", "quickstart")
Output
// get_training_set with variant provided prints out formatted information on training set variant

NAME:                          fraud_training
VARIANT:                       quickstart
OWNER:                         featureformer
PROVIDER:                      postgres-quickstart
STATUS:                        NO_STATUS
-----------------------------------------------
LABEL:
NAME                           VARIANT
fraudulent                     quickstart
-----------------------------------------------
FEATURES:
NAME                           VARIANT
avg_transactions               quickstart
-----------------------------------------------
Input
print(fraudulent_variant)
Output
// get_training_set returns the TrainingSetVariant object

name: "fraud_training"
variant: "quickstart"
owner: "featureformer"
created {
seconds: 1658168552
nanos: 157934800
}
provider: "postgres-quickstart"
features {
name: "avg_transactions"
variant: "quickstart"
}
label {
name: "fraudulent"
variant: "quickstart"
}

Parameters:

Name Type Description Default
name str

Name of training set to be retrieved

required
variant str

Name of variant of training set

None

Returns:

Name Type Description
training_set Union[TrainingSet, TrainingSetVariant]

TrainingSet or TrainingSetVariant

Source code in src/featureform/register.py
def print_training_set(self, name, variant=None, local=False):
    """Get a training set. Prints out information on training set, and all variants associated with the training set. If variant is included, print information on that specific variant and all resources associated with it.

    **Examples:**

    ``` py title="Input"
    fraud_training = rc.get_training_set("fraud_training")
    ```

    ``` json title="Output"
    // get_training_set prints out formatted information on training set

    NAME:                          fraud_training
    STATUS:                        NO_STATUS
    -----------------------------------------------
    VARIANTS:
    quickstart                     default
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(fraud_training)
    ```

    ``` json title="Output"
    // get_training_set returns the TrainingSet object

    name: "fraud_training"
    default_variant: "quickstart"
    variants: "quickstart"
    ```

    ``` py title="Input"
    fraudulent_variant = ff.get_training set("fraudulent", "quickstart")
    ```

    ``` json title="Output"
    // get_training_set with variant provided prints out formatted information on training set variant

    NAME:                          fraud_training
    VARIANT:                       quickstart
    OWNER:                         featureformer
    PROVIDER:                      postgres-quickstart
    STATUS:                        NO_STATUS
    -----------------------------------------------
    LABEL:
    NAME                           VARIANT
    fraudulent                     quickstart
    -----------------------------------------------
    FEATURES:
    NAME                           VARIANT
    avg_transactions               quickstart
    -----------------------------------------------
    ```

    ``` py title="Input"
    print(fraudulent_variant)
    ```

    ``` json title="Output"
    // get_training_set returns the TrainingSetVariant object

    name: "fraud_training"
    variant: "quickstart"
    owner: "featureformer"
    created {
    seconds: 1658168552
    nanos: 157934800
    }
    provider: "postgres-quickstart"
    features {
    name: "avg_transactions"
    variant: "quickstart"
    }
    label {
    name: "fraudulent"
    variant: "quickstart"
    }
    ```

    Args:
        name (str): Name of training set to be retrieved
        variant (str): Name of variant of training set

    Returns:
        training_set (Union[TrainingSet, TrainingSetVariant]): TrainingSet or TrainingSetVariant
    """
    if local:
        if not variant:
            return get_resource_info_local("training-set", name)
        return get_training_set_variant_info_local(name, variant)
    if not variant:
        return get_resource_info(self._stub, "training-set", name)
    return get_training_set_variant_info(self._stub, name, variant)

search(raw_query, local=False)

Search for registered resources. Prints a list of results.

Examples:

Input
providers_list = rc.search("transact")

Output
// search prints out formatted information on all matches

NAME                           VARIANT            TYPE
avg_transactions               default            Source
Source code in src/featureform/register.py
def search(self, raw_query, local=False):
    """Search for registered resources. Prints a list of results.

    **Examples:**
    ``` py title="Input"
    providers_list = rc.search("transact")
    ```

    ``` json title="Output"
    // search prints out formatted information on all matches

    NAME                           VARIANT            TYPE
    avg_transactions               default            Source
    ```
    """
    if type(raw_query) != str or len(raw_query) == 0:
        raise Exception("query must be string and cannot be empty")
    processed_query = raw_query.translate({ ord(i): None for i in '.,-@!*#'})
    if local:
        return search_local(processed_query)
    else:
        return search(processed_query, self._host)

src.featureform.register.Registrar

These functions are used to register new resources and retrieving existing resources. Retrieved resources can be used to register additional resources. If information on these resources is needed (e.g. retrieve the names of all variants of a feature), use the Resource Client instead.

definitions.py
import featureform as ff

# e.g. registering a new provider
redis = ff.register_redis(
    name="redis-quickstart",
    host="quickstart-redis",  # The internal dns name for redis
    port=6379,
    description="A Redis deployment we created for the Featureform quickstart"
)
Source code in src/featureform/register.py
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
class Registrar:
    """These functions are used to register new resources and retrieving existing resources. Retrieved resources can be used to register additional resources. If information on these resources is needed (e.g. retrieve the names of all variants of a feature), use the [Resource Client](resource_client.md) instead.

    ``` py title="definitions.py"
    import featureform as ff

    # e.g. registering a new provider
    redis = ff.register_redis(
        name="redis-quickstart",
        host="quickstart-redis",  # The internal dns name for redis
        port=6379,
        description="A Redis deployment we created for the Featureform quickstart"
    )
    ```
    """

    def __init__(self):
        self.__state = ResourceState()
        self.__resources = []
        self.__default_owner = ""

    def add_resource(self, resource):
        self.__resources.append(resource)

    def get_resources(self):
        return self.__resources

    def register_user(self, name: str, tags: List[str] = [], properties: dict = {}) -> UserRegistrar:
        """Register a user.

        Args:
            name (str): User to be registered.

        Returns:
            UserRegistrar: User
        """
        user = User(name, tags, properties)
        self.__resources.append(user)
        return UserRegistrar(self, user)

    def set_default_owner(self, user: str):
        """Set default owner.

        Args:
            user (str): User to be set as default owner of resources.
        """
        self.__default_owner = user

    def default_owner(self) -> str:
        return self.__default_owner

    def must_get_default_owner(self) -> str:
        owner = self.default_owner()
        if owner == "":
            raise ValueError(
                "Owner must be set or a default owner must be specified.")
        return owner

    def get_source(self, name, variant, local=False):
        """Get a source. The returned object can be used to register additional resources.

        **Examples**:
        ``` py
        transactions = ff.get_source("transactions","kaggle")
        transactions.register_resources(
            entity=user,
            entity_column="customerid",
            labels=[
                {"name": "fraudulent", "variant": "quickstart", "column": "isfraud", "type": "bool"},
            ],
        )
        ```
        Args:
            name (str): Name of source to be retrieved
            variant (str): Name of variant of source to be retrieved
            local (bool): If localmode is being used

        Returns:
            source (ColumnSourceRegistrar): Source
        """
        get = SourceReference(name=name, variant=variant, obj=None)
        self.__resources.append(get)
        if local:
            return LocalSource(self,
                               name=name,
                               owner="",
                               variant=variant,
                               provider="",
                               description="",
                               path="")
        else:
            fakeDefinition = PrimaryData(location=SQLTable(name=""))
            fakeSource = Source(name=name,
                                variant=variant,
                                definition=fakeDefinition,
                                owner="",
                                provider="",
                                description="")
            return ColumnSourceRegistrar(self, fakeSource)

    def get_local_provider(self, name="local-mode"):
        get = ProviderReference(name=name, provider_type="local", obj=None)
        self.__resources.append(get)
        fakeConfig = LocalConfig()
        fakeProvider = Provider(name=name, function="LOCAL_ONLINE", description="", team="", config=fakeConfig)
        return LocalProvider(self, fakeProvider)

    def get_redis(self, name):
        """Get a Redis provider. The returned object can be used to register additional resources.

        **Examples**:
        ``` py
        redis = ff.get_redis("redis-quickstart")
        // Defining a new transformation source with retrieved Redis provider
        average_user_transaction.register_resources(
            entity=user,
            entity_column="user_id",
            inference_store=redis,
            features=[
                {"name": "avg_transactions", "variant": "quickstart", "column": "avg_transaction_amt", "type": "float32"},
            ],
        )
        ```
        Args:
            name (str): Name of Redis provider to be retrieved

        Returns:
            redis (OnlineProvider): Provider
        """
        get = ProviderReference(name=name, provider_type="redis", obj=None)
        self.__resources.append(get)
        fakeConfig = RedisConfig(host="", port=123, password="", db=123)
        fakeProvider = Provider(name=name, function="ONLINE", description="", team="", config=fakeConfig)
        return OnlineProvider(self, fakeProvider)

    def get_mongodb(self, name):
        """Get a MongoDB provider. The returned object can be used to register additional resources.

        **Examples**:
        ``` py
        mongodb = ff.get_mongodb("mongodb-quickstart")
        // Defining a new transformation source with retrieved MongoDB provider
        average_user_transaction.register_resources(
            entity=user,
            entity_column="user_id",
            inference_store=mongodb,
            features=[
                {"name": "avg_transactions", "variant": "quickstart", "column": "avg_transaction_amt", "type": "float32"},
            ],
        )
        ```
        Args:
            name (str): Name of MongoDB provider to be retrieved

        Returns:
            mongodb (OnlineProvider): Provider
        """
        get = ProviderReference(name=name, provider_type="mongodb", obj=None)
        self.__resources.append(get)
        mock_config = MongoDBConfig()
        mock_provider = Provider(name=name, function="ONLINE", description="", team="", config=mock_config)
        return OnlineProvider(self, mock_provider)

    def get_blob_store(self, name):
        """Get a Azure Blob provider. The returned object can be used to register additional resources.

        **Examples**:
        ``` py
        azure_blob = ff.get_blob_store("azure-blob-quickstart")
        // Defining a new transformation source with retrieved Azure blob provider
        average_user_transaction.register_resources(
            entity=user,
            entity_column="user_id",
            inference_store=azure_blob,
            features=[
                {"name": "avg_transactions", "variant": "quickstart", "column": "avg_transaction_amt", "type": "float32"},
            ],
        )
        ```
        Args:
            name (str): Name of Azure blob provider to be retrieved

        Returns:
            azure_blob (FileStoreProvider): Provider
        """
        get = ProviderReference(name=name, provider_type="AZURE", obj=None)
        self.__resources.append(get)
        fake_azure_config = AzureFileStoreConfig(account_name="", account_key="", container_name="", root_path="")
        fake_config = OnlineBlobConfig(store_type="AZURE", store_config=fake_azure_config.config())
        fakeProvider = Provider(name=name, function="ONLINE", description="", team="", config=fake_config)
        return FileStoreProvider(self, fakeProvider, fake_config, "AZURE")

    def get_postgres(self, name):
        """Get a Postgres provider. The returned object can be used to register additional resources.

        **Examples**:
        ``` py
        postgres = ff.get_postgres("postgres-quickstart")
        transactions = postgres.register_table(
            name="transactions",
            variant="kaggle",
            description="Fraud Dataset From Kaggle",
            table="Transactions",  # This is the table's name in Postgres
        )
        ```
        Args:
            name (str): Name of Postgres provider to be retrieved

        Returns:
            postgres (OfflineSQLProvider): Provider
        """
        get = ProviderReference(name=name, provider_type="postgres", obj=None)
        self.__resources.append(get)
        fakeConfig = PostgresConfig(host="", port="", database="", user="", password="")
        fakeProvider = Provider(name=name, function="OFFLINE", description="", team="", config=fakeConfig)
        return OfflineSQLProvider(self, fakeProvider)

    def get_snowflake(self, name):
        """Get a Snowflake provider. The returned object can be used to register additional resources.

        **Examples**:
        ``` py
        snowflake = ff.get_snowflake("snowflake-quickstart")
        transactions = snowflake.register_table(
            name="transactions",
            variant="kaggle",
            description="Fraud Dataset From Kaggle",
            table="Transactions",  # This is the table's name in Postgres
        )
        ```
        Args:
            name (str): Name of Snowflake provider to be retrieved

        Returns:
            snowflake (OfflineSQLProvider): Provider
        """
        get = ProviderReference(name=name, provider_type="snowflake", obj=None)
        self.__resources.append(get)
        fakeConfig = SnowflakeConfig(account="", database="", organization="", username="", password="", schema="")
        fakeProvider = Provider(name=name, function="OFFLINE", description="", team="", config=fakeConfig)
        return OfflineSQLProvider(self, fakeProvider)

    def get_redshift(self, name):
        """Get a Redshift provider. The returned object can be used to register additional resources.

        **Examples**:
        ``` py
        redshift = ff.get_redshift("redshift-quickstart")
        transactions = redshift.register_table(
            name="transactions",
            variant="kaggle",
            description="Fraud Dataset From Kaggle",
            table="Transactions",  # This is the table's name in Postgres
        )
        ```
        Args:
            name (str): Name of Redshift provider to be retrieved

        Returns:
            redshift (OfflineSQLProvider): Provider
        """
        get = ProviderReference(name=name, provider_type="redshift", obj=None)
        self.__resources.append(get)
        fakeConfig = RedshiftConfig(host="", port="", database="", user="", password="")
        fakeProvider = Provider(name=name, function="OFFLINE", description="", team="", config=fakeConfig)
        return OfflineSQLProvider(self, fakeProvider)

    def get_bigquery(self, name):
        """Get a BigQuery provider. The returned object can be used to register additional resources.

        **Examples**:
        ``` py
        bigquery = ff.get_bigquery("bigquery-quickstart")
        transactions = bigquery.register_table(
            name="transactions",
            variant="kaggle",
            description="Fraud Dataset From Kaggle",
            table="Transactions",  # This is the table's name in BigQuery
        )
        ```
        Args:
            name (str): Name of BigQuery provider to be retrieved

        Returns:
            bigquery (OfflineSQLProvider): Provider
        """
        get = ProviderReference(name=name, provider_type="bigquery", obj=None)
        self.__resources.append(get)
        fakeConfig = BigQueryConfig(project_id="", dataset_id="", credentials_path="")
        fakeProvider = Provider(name=name, function="OFFLINE", description="", team="", config=fakeConfig)
        return OfflineSQLProvider(self, fakeProvider)

    def get_spark(self, name):
        """Get a Spark provider. The returned object can be used to register additional resources.
        **Examples**:
        ``` py
        spark = ff.get_spark("spark-quickstart")
        transactions = spark.register_file(
            name="transactions",
            variant="kaggle",
            description="Fraud Dataset From Kaggle",
            file_path="s3://bucket/path/to/file/transactions.parquet",  # This is the path to file
        )
        ```
        Args:
            name (str): Name of Spark provider to be retrieved
        Returns:
            spark (OfflineSQLProvider): Provider
        """
        get = ProviderReference(name=name, provider_type="spark", obj=None)
        self.__resources.append(get)
        fakeConfig = SparkConfig(executor_type="", executor_config={}, store_type="", store_config={})
        fakeProvider = Provider(name=name, function="OFFLINE", description="", team="", config=fakeConfig)
        return OfflineSparkProvider(self, fakeProvider)

    def get_kubernetes(self, name):
        """
        Get a k8s Azure provider. The returned object can be used to register additional resources.
        **Examples**:
        ``` py

        k8s_azure = ff.get_kubernetes("k8s-azure-quickstart")
        transactions = k8s_azure.register_file(
            name="transactions",
            variant="kaggle",
            description="Fraud Dataset From Kaggle",
            path="path/to/blob",
        )
        ```
        Args:
            name (str): Name of k8s Azure provider to be retrieved
        Returns:
            k8s_azure (OfflineK8sProvider): Provider
        """
        get = ProviderReference(name=name, provider_type="k8s-azure", obj=None)
        self.__resources.append(get)

        fakeConfig = K8sConfig(store_type="", store_config={})
        fakeProvider = Provider(name=name, function="OFFLINE", description="", team="", config=fakeConfig)
        return OfflineK8sProvider(self, fakeProvider)

    def get_s3(self, name):
        """
        Get a S3 provider. The returned object can be used with other providers such as Spark and Databricks.
        **Examples**:
        ``` py

        s3 = ff.get_s3("s3-quickstart")
        spark = ff.register_spark(
            name=f"spark-emr-s3",
            description="A Spark deployment we created for the Featureform quickstart",
            team="featureform-team",
            executor=emr,
            filestore=s3,
        )
        ```
        Args:
            name (str): Name of S3 to be retrieved
        Returns:
            s3 (FileStore): Provider
        """
        get = ProviderReference(name=name, provider_type="S3", obj=None)
        self.__resources.append(get)

        fake_creds = AWSCredentials("id", "secret")
        fakeConfig = S3StoreConfig(bucket_path="", bucket_region="", credentials=fake_creds)
        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=s3_config)
        return FileStoreProvider(provider, s3_config, s3_config.type())

    def get_gcs(self, name):
        get = ProviderReference(name=name, provider_type="GCS", obj=None)
        self.__resources.append(get)

        filename = "fake_secrets.json"
        if not exists(filename):
            self._create_mock_creds_file(filename, {"test": "creds"})

        fake_creds = GCPCredentials("id", filename)
        fakeConfig = GCSStoreConfig(bucket_name="", bucket_path="", credentials=fake_creds)
        fakeProvider = Provider(name=name, function="OFFLINE", description="", team="", config=fakeConfig)
        return OfflineK8sProvider(self, fakeProvider)

    def _create_mock_creds_file(self, filename, json_data):
        with open(filename, "w") as f:
            json.dumps(json_data, f)

    def get_entity(self, name, local=False):
        """Get an entity. The returned object can be used to register additional resources.

        **Examples**:
        ``` py
        entity = get_entity("user")
        transactions.register_resources(
            entity=entity,
            entity_column="customerid",
            labels=[
                {"name": "fraudulent", "variant": "quickstart", "column": "isfraud", "type": "bool"},
            ],
        )
        ```
        Args:
            name (str): Name of entity to be retrieved
            local (bool): If localmode is being used

        Returns:
            entity (EntityRegistrar): Entity
        """
        get = EntityReference(name=name, obj=None)
        self.__resources.append(get)
        fakeEntity = Entity(name=name, description="")
        return EntityRegistrar(self, fakeEntity)

    def register_redis(self,
                       name: str,
                       description: str = "",
                       team: str = "",
                       host: str = "0.0.0.0",
                       port: int = 6379,
                       password: str = "",
                       db: int = 0,
                       tags: List[str] = [],
                       properties: dict = {}):
        """Register a Redis provider.

        **Examples**:
        ```
        redis = ff.register_redis(
            name="redis-quickstart",
            host="quickstart-redis",  # The internal dns name for redis
            port=6379,
            description="A Redis deployment we created for the Featureform quickstart"
        )
        ```
        Args:
            name (str): Name of Redis provider to be registered
            description (str): Description of Redis provider to be registered
            team (str): Name of team
            host (str): Internal DNS name for Redis
            port (int): Redis port
            password (str): Redis password
            db (str): Redis database
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            redis (OnlineProvider): Provider
        """
        config = RedisConfig(host=host, port=port, password=password, db=db)
        provider = Provider(name=name,
                            function="ONLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OnlineProvider(self, provider)

    def register_blob_store(self,
                            name: str,
                            account_name: str,
                            account_key: str,
                            container_name: str,
                            root_path: str,
                            description: str = "",
                            team: str = "",
                            tags: List[str] = [],
                            properties: dict = {}):

        """Register an azure blob store provider.

        This has the functionality of an online store and can be used as a parameter
        to a k8s or spark provider

        **Examples**:
        ```
        blob = ff.register_blob_store(
            name="azure-quickstart",
            container_name="my_company_container"
            root_path="custom/path/in/container"
            account_name=<azure_account_name>
            account_key=<azure_account_key> 
            description="An azure blob store provider to store offline and inference data"
        )
        ```
        Args:
            name (str): Name of Azure blob store to be registered
            container_name (str): Azure container name
            root_path (str): custom path in container to store data
            description (str): Description of Azure Blob provider to be registered
            team (str): the name of the team registering the filestore
            account_name (str): Azure account name
            account_key (str): Secret azure account key
            config (AzureConfig): an azure config object (can be used in place of container name and account name)
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources
        Returns:
            blob (StorageProvider): Provider
                has all the functionality of OnlineProvider
        """

        azure_config = AzureFileStoreConfig(account_name=account_name, account_key=account_key,
                                            container_name=container_name, root_path=root_path)
        config = OnlineBlobConfig(store_type="AZURE", store_config=azure_config.config())

        provider = Provider(name=name,
                            function="ONLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return FileStoreProvider(self, provider, azure_config, "AZURE")

    def register_s3(self,
                    name: str,
                    credentials: AWSCredentials,
                    bucket_path: str,
                    bucket_region: str,
                    description: str = "",
                    team: str = "",
                    tags: List[str] = [],
                    properties: dict = {}):
        """Register a S3 store provider.

        This has the functionality of an offline store and can be used as a parameter
        to a k8s or spark provider

        **Examples**:
        ```
        s3 = ff.register_s3(
            name="s3-quickstart",
            credentials=aws_creds,
            bucket_path="bucket_name/path",
            bucket_region=<bucket_region>,
            description="An s3 store provider to store offline"
        )
        ```
        Args:
            name (str): Name of S3 store to be registered
            credentials (AWSCredentials): AWS credentials to access the bucket
            bucket_path (str): custom path including the bucket name
            bucket_region (str): aws region the bucket is located in
            description (str): Description of S3 provider to be registered
            team (str): the name of the team registering the filestore
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources
        Returns:
            s3 (FileStoreProvider): Provider
                has all the functionality of OfflineProvider
        """

        s3_config = S3StoreConfig(bucket_path=bucket_path, bucket_region=bucket_region, credentials=credentials)

        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=s3_config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return FileStoreProvider(self, provider, s3_config, s3_config.type())


    def register_gcs(self,
                    name: str,
                    credentials: GCPCredentials,
                    bucket_name: str,
                    bucket_path: str = "",
                    description: str = "",
                    team: str = "",
                    tags: List[str] = [],
                    properties: dict = {}):
        """Register a GCS store provider.
                **Examples**:
        ```
        gcs = ff.register_gcs(
            name="gcs-quickstart",
            credentials=gcp_creds,
            bucket_name="bucket_name",
            bucket_path="featureform/path/",
            description="An gcs store provider to store offline"
        )
        ```
        Args:
            name (str): Name of GCS store to be registered
            credentials (GCPCredentials): GCP credentials to access the bucket
            bucket_name (str): The bucket name
            bucket_path (str): Custom path to be used by featureform
            description (str): Description of GCS provider to be registered
            team (str): The name of the team registering the filestore
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources
        Returns:
            gcs (FileStoreProvider): Provider
                has all the functionality of OfflineProvider
        """

        gcs_config = GCSFileStoreConfig(bucket_name=bucket_name, bucket_path=bucket_path, credentials=credentials)
        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=gcs_config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return FileStoreProvider(self, provider, gcs_config, gcs_config.type())

    def register_hdfs(self,
                      name: str,
                      host: str,
                      port: str,
                      username: str = "",
                      path: str = "",
                      description: str = "",
                      team: str = "", ):
        """Register a HDFS store provider.

        This has the functionality of an offline store and can be used as a parameter
        to a k8s or spark provider

        **Examples**:
        ```
        hdfs = ff.register_hdfs(
            name="hdfs-quickstart",
            host=<port>,
            port=<port>,
            path=<path>,
            username=<username>
            description="An hdfs store provider to store offline"
        )
        ```
        Args:
            name (str): Name of HDFS store to be registered
            host (str): The hostname for HDFS
            port (str): The port for the namenode for HDFS
            path (str): A storage path within HDFS
            username (str): A Username for HDFS
            description (str): Description of HDFS provider to be registered
            team (str): The name of the team registering HDFS
        Returns:
            hdfs (FileStoreProvider): Provider
        """

        hdfs_config = HDFSConfig(host=host, port=port, path=path, username=username)

        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=hdfs_config)
        self.__resources.append(provider)
        return FileStoreProvider(self, provider, hdfs_config, hdfs_config.type())

    def register_firestore(self,
                           name: str,
                           collection: str,
                           project_id: str,
                           credentials_path: str,
                           description: str = "",
                           team: str = "",
                           tags: List[str] = [],
                           properties: dict = {}):
        """Register a Firestore provider.

        **Examples**:
        ```
        firestore = ff.register_firestore(
            name="firestore-quickstart",
            description="A Firestore deployment we created for the Featureform quickstart",
            project_id="quickstart-project",
            collection="quickstart-collection",
        )
        ```
        Args:
            name (str): Name of Firestore provider to be registered
            description (str): Description of Firestore provider to be registered
            team (str): The name of the team registering the filestore
            project_id (str): The Project name in GCP
            collection (str): The Collection name in Firestore under the given project ID
            credentials_path (str): A path to a Google Credentials file with access permissions for Firestore
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources
        Returns:
            firestore (OfflineSQLProvider): Provider
        """
        config = FirestoreConfig(collection=collection, project_id=project_id, credentials_path=credentials_path)
        provider = Provider(name=name,
                            function="ONLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OnlineProvider(self, provider)

    def register_cassandra(self,
                           name: str,
                           description: str = "",
                           team: str = "",
                           host: str = "0.0.0.0",
                           port: int = 9042,
                           username: str = "cassandra",
                           password: str = "cassandra",
                           keyspace: str = "",
                           consistency: str = "THREE",
                           replication: int = 3,
                           tags: List[str] = [],
                           properties: dict = {}):
        """Register a Cassandra provider.

        **Examples**:
        ```
        cassandra = ff.register_cassandra(
                name = "cassandra",
                description = "Example inference store",
                team = "Featureform",
                host = "0.0.0.0",
                port = 9042,
                username = "cassandra",
                password = "cassandra",
                consistency = "THREE",
                replication = 3
            )
        ```
        Args:
            name (str): Name of Cassandra provider to be registered
            description (str): Description of Cassandra provider to be registered
            team (str): Name of team
            host (str): DNS name of Cassandra
            port (str): Port
            user (str): User
            password (str): Password
            consistency (str): Consistency
            replication (int): Replication
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            cassandra (OnlineProvider): Provider
        """
        config = CassandraConfig(host=host, port=port, username=username, password=password, keyspace=keyspace,
                                 consistency=consistency, replication=replication)
        provider = Provider(name=name,
                            function="ONLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OnlineProvider(self, provider)

    def register_dynamodb(self,
                          name: str,
                          description: str = "",
                          team: str = "",
                          access_key: str = None,
                          secret_key: str = None,
                          region: str = None,
                          tags: List[str] = [],
                          properties: dict = {}):
        """Register a DynamoDB provider.

        **Examples**:
        ```
        dynamodb = ff.register_dynamodb(
            name="dynamodb-quickstart",
            description="A Dynamodb deployment we created for the Featureform quickstart",
            access_key="$ACCESS_KEY",
            secret_key="$SECRET_KEY",
            region="us-east-1"
        )
        ```
        Args:
            name (str): Name of DynamoDB provider to be registered
            description (str): Description of DynamoDB provider to be registered
            team (str): Name of team
            access_key (str): Access key
            secret_key (str): Secret key
            region (str): Region
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            dynamodb (OnlineProvider): Provider
        """
        config = DynamodbConfig(access_key=access_key, secret_key=secret_key, region=region)
        provider = Provider(name=name,
                            function="ONLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OnlineProvider(self, provider)

    def register_mongodb(self,
                         name: str,
                         description: str = "",
                         team: str = "",
                         username: str = None,
                         password: str = None,
                         database: str = None,
                         host: str = None,
                         port: str = None,
                         throughput: int = 1000,
                         tags: List[str] = [],
                         properties: dict = {}
                         ):
        """Register a MongoDB provider.

        **Examples**:
        ```
        mongodb = ff.register_mongodb(
            name="mongodb-quickstart",
            description="A MongoDB deployment",
            team="myteam"
            username="my_username",
            password="myPassword",
            database="featureform_database"
            host="my-mongodb.host.com",
            port="10225"
            throughput=10000
        )
        ```
        Args:
            name (str): Name of MongoDB provider to be registered
            description (str): Description of MongoDB provider to be registered
            team (str): Name of team
            username (str): MongoDB username
            password (str): MongoDB password
            database (str): MongoDB database
            host (str): MongoDB hostname
            port (str): MongoDB port
            throughput (int): The maximum RU limit for autoscaling
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            mongodb (OnlineProvider): Provider
        """
        config = MongoDBConfig(username=username, password=password, host=host, port=port, database=database,
                               throughput=throughput)
        provider = Provider(name=name,
                            function="ONLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OnlineProvider(self, provider)

    def register_snowflake_legacy(
                self,
                name: str,
                username: str,
                password: str,
                account_locator: str,
                database: str,
                schema: str = "PUBLIC",
                description: str = "",
                team: str = "",
                warehouse: str = "",
                role: str = "",
                tags: List[str] = [],
                properties: dict = {}):
        """Register a Snowflake provider using legacy credentials.

        **Examples**:
        ```
        snowflake = ff.register_snowflake_legacy(
            name="snowflake-quickstart",
            username="snowflake",
            password="password", #pragma: allowlist secret
            account_locator="account-locator",
            database="snowflake",
            schema="PUBLIC",
            description="A Snowflake deployment we created for the Featureform quickstart"
        )
        ```
        Args:
            name (str): Name of Snowflake provider to be registered
            username (str): Username
            password (str): Password
            account_locator (str): Account Locator
            database (str): Database
            schema (str): Schema
            description (str): Description of Snowflake provider to be registered
            team (str): Name of team
            warehouse (str): Specifies the virtual warehouse to use by default for queries, loading, etc.
            role (str): Specifies the role to use by default for accessing Snowflake objects in the client session
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            snowflake (OfflineSQLProvider): Provider
        """
        config = SnowflakeConfig(account_locator=account_locator,
                                 database=database,
                                 username=username,
                                 password=password,
                                 schema=schema,
                                 warehouse=warehouse,
                                 role=role)
        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OfflineSQLProvider(self, provider)

    def register_snowflake(
            self,
            name: str,
            username: str,
            password: str,
            account: str,
            organization: str,
            database: str,
            schema: str = "PUBLIC",
            description: str = "",
            team: str = "",
            warehouse: str = "",
            role: str = "",
            tags: List[str] = [],
            properties: dict = {}):
        """Register a Snowflake provider.

        **Examples**:
        ```
        snowflake = ff.register_snowflake(
            name="snowflake-quickstart",
            username="snowflake",
            password="password", #pragma: allowlist secret
            account="account",
            organization="organization",
            database="snowflake",
            schema="PUBLIC",
            description="A Snowflake deployment we created for the Featureform quickstart"
        )
        ```
        Args:
            name (str): Name of Snowflake provider to be registered
            username (str): Username
            password (str): Password
            account (str): Account
            organization (str): Organization
            database (str): Database
            schema (str): Schema
            description (str): Description of Snowflake provider to be registered
            team (str): Name of team
            warehouse (str): Specifies the virtual warehouse to use by default for queries, loading, etc.
            role (str): Specifies the role to use by default for accessing Snowflake objects in the client session
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            snowflake (OfflineSQLProvider): Provider
        """
        config = SnowflakeConfig(account=account,
                                 database=database,
                                 organization=organization,
                                 username=username,
                                 password=password,
                                 schema=schema,
                                 warehouse=warehouse,
                                 role=role)
        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OfflineSQLProvider(self, provider)

    def register_postgres(self,
                          name: str,
                          description: str = "",
                          team: str = "",
                          host: str = "0.0.0.0",
                          port: str = "5432",
                          user: str = "postgres",
                          password: str = "password",
                          database: str = "postgres",
                          tags: List[str] = [],
                          properties: dict = {}):
        """Register a Postgres provider.

        **Examples**:
        ```
        postgres = ff.register_postgres(
            name="postgres-quickstart",
            description="A Postgres deployment we created for the Featureform quickstart",
            host="quickstart-postgres",  # The internal dns name for postgres
            port="5432",
            user="postgres",
            password="password", #pragma: allowlist secret
            database="postgres"
        )
        ```
        Args:
            name (str): Name of Postgres provider to be registered
            description (str): Description of Postgres provider to be registered
            team (str): Name of team
            host (str): Internal DNS name of Postgres
            port (str): Port
            user (str): User
            password (str): Password
            database (str): Database
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            postgres (OfflineSQLProvider): Provider
        """
        config = PostgresConfig(host=host,
                                port=port,
                                database=database,
                                user=user,
                                password=password)
        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OfflineSQLProvider(self, provider)

    def register_redshift(self,
                          name: str,
                          description: str = "",
                          team: str = "",
                          host: str = "",
                          port: int = 5432,
                          user: str = "redshift",
                          password: str = "password",
                          database: str = "dev",
                          tags: List[str] = [],
                          properties: dict = {}):
        """Register a Redshift provider.

        **Examples**:
        ```
        redshift = ff.register_redshift(
            name="redshift-quickstart",
            description="A Redshift deployment we created for the Featureform quickstart",
            host="quickstart-redshift",  # The internal dns name for postgres
            port="5432",
            user="redshift",
            password="password", #pragma: allowlist secret
            database="dev"
        )
        ```
        Args:
            name (str): Name of Redshift provider to be registered
            description (str): Description of Redshift provider to be registered
            team (str): Name of team
            host (str): Internal DNS name of Redshift
            port (str): Port
            user (str): User
            password (str): Password
            database (str): Database
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            redshift (OfflineSQLProvider): Provider
        """
        config = RedshiftConfig(host=host,
                                port=port,
                                database=database,
                                user=user,
                                password=password)
        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OfflineSQLProvider(self, provider)

    def register_bigquery(self,
                          name: str,
                          description: str = "",
                          team: str = "",
                          project_id: str = "",
                          dataset_id: str = "",
                          credentials_path: str = "",
                          tags: List[str] = [],
                          properties: dict = {}):
        """Register a BigQuery provider.

        **Examples**:
        ```
        bigquery = ff.register_bigquery(
            name="bigquery-quickstart",
            description="A BigQuery deployment we created for the Featureform quickstart",
            project_id="quickstart-project",
            dataset_id="quickstart-dataset",
        )
        ```
        Args:
            name (str): Name of BigQuery provider to be registered
            description (str): Description of BigQuery provider to be registered
            team (str): Name of team
            project_id (str): The Project name in GCP
            dataset_id (str): The Dataset name in GCP under the Project Id
            credentials_path (str): A path to a Google Credentials file with access permissions for BigQuery
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            bigquery (OfflineSQLProvider): Provider
        """
        config = BigQueryConfig(project_id=project_id,
                                dataset_id=dataset_id,
                                credentials_path=credentials_path, )
        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OfflineSQLProvider(self, provider)

    def register_spark(self,
                       name: str,
                       executor: ExecutorCredentials,
                       filestore: FileStoreProvider,
                       description: str = "",
                       team: str = "",
                       tags: List[str] = [],
                       properties: dict = {}):
        """Register a Spark on Executor provider.
        **Examples**:
        ```
        spark = ff.register_spark(
            name="spark-quickstart",
            description="A Spark deployment we created for the Featureform quickstart",
            team="featureform-team",
            executor=databricks,
            filestore=azure_blob_store
        )
        ```
        Args:
            name (str): Name of Spark provider to be registered
            executor (ExecutorCredentials): an Executor Provider used for the compute power
            filestore: (FileStoreProvider): a FileStoreProvider used for storage of data
            description (str): Description of Spark provider to be registered
            team (str): Name of team
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            spark (OfflineSparkProvider): Provider
        """

        config = SparkConfig(
            executor_type=executor.type(),
            executor_config=executor.config(),
            store_type=filestore.store_type(),
            store_config=filestore.config())

        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OfflineSparkProvider(self, provider)

    def register_k8s(self,
                     name: str,
                     store: FileStoreProvider,
                     description: str = "",
                     team: str = "",
                     docker_image: str = "",
                     tags: List[str] = [],
                     properties: dict = {}):
        """
        Register an offline store provider to run on featureform's own k8s deployment

        Args:
            name (str): Name of provider
            store (FileStoreProvider): Reference to registered file store provider
            description (str): Description of primary data to be registered
            team (str): A string parameter describing the team that owns the provider
            docker_image (str): A custom docker image using the base image featureformcom/k8s_runner
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources
        **Examples**:
        ```
        k8s = ff.register_k8s(
            name="k8s",
            description="Native featureform kubernetes compute",
            store=azure_blob,
            team="featureform-team",
            docker_image="my-repo/image:version"
        )
        ```
        """
        config = K8sConfig(
            store_type=store.store_type(),
            store_config=store.config(),
            docker_image=docker_image
        )

        provider = Provider(name=name,
                            function="OFFLINE",
                            description=description,
                            team=team,
                            config=config,
                            tags=tags,
                            properties=properties)
        self.__resources.append(provider)
        return OfflineK8sProvider(self, provider)

    def register_local(self):
        """Register a Local provider.

        **Examples**:
        ```
            local = register_local()
        ```
        Returns:
            local (LocalProvider): Provider
        """
        config = LocalConfig()
        provider = Provider(name="local-mode",
                            function="LOCAL_ONLINE",
                            description="This is local mode",
                            team="team",
                            config=config,
                            tags=['local-mode'],
                            properties={"resource_type": "Provider"})
        self.__resources.append(provider)
        local_provider = LocalProvider(self, provider)
        local_provider.insert_provider()
        return local_provider

    def register_primary_data(self,
                              name: str,
                              variant: str,
                              location: Location,
                              provider: Union[str, OfflineProvider],
                              tags: List[str],
                              properties: dict,
                              owner: Union[str, UserRegistrar] = "",
                              description: str = ""):
        """Register a primary data source.

        Args:
            name (str): Name of source
            variant (str): Name of variant
            location (Location): Location of primary data
            provider (Union[str, OfflineProvider]): Provider
            owner (Union[str, UserRegistrar]): Owner
            description (str): Description of primary data to be registered

        Returns:
            source (ColumnSourceRegistrar): Source
        """
        if not isinstance(owner, str):
            owner = owner.name()
        if owner == "":
            owner = self.must_get_default_owner()
        if not isinstance(provider, str):
            provider = provider.name()
        source = Source(name=name,
                        variant=variant,
                        definition=PrimaryData(location=location),
                        owner=owner,
                        provider=provider,
                        description=description,
                        tags=tags,
                        properties=properties)
        self.__resources.append(source)
        return ColumnSourceRegistrar(self, source)

    def register_sql_transformation(self,
                                    name: str,
                                    variant: str,
                                    query: str,
                                    provider: Union[str, OfflineProvider],
                                    owner: Union[str, UserRegistrar] = "",
                                    description: str = "",
                                    schedule: str = "",
                                    args: K8sArgs = None,
                                    tags: List[str] = [],
                                    properties: dict = {}):
        """Register a SQL transformation source.

        Args:
            name (str): Name of source
            variant (str): Name of variant
            query (str): SQL query
            provider (Union[str, OfflineProvider]): Provider
            owner (Union[str, UserRegistrar]): Owner
            description (str): Description of primary data to be registered
            schedule (str): Kubernetes CronJob schedule string ("* * * * *")
            args (K8sArgs): Additional transformation arguments
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            source (ColumnSourceRegistrar): Source
        """
        if not isinstance(owner, str):
            owner = owner.name()
        if owner == "":
            owner = self.must_get_default_owner()
        if not isinstance(provider, str):
            provider = provider.name()
        source = Source(
            name=name,
            variant=variant,
            definition=SQLTransformation(query, args),
            owner=owner,
            schedule=schedule,
            provider=provider,
            description=description,
            tags=tags,
            properties=properties
        )
        self.__resources.append(source)
        return ColumnSourceRegistrar(self, source)

    def sql_transformation(self,
                           variant: str,
                           provider: Union[str, OfflineProvider],
                           name: str = "",
                           schedule: str = "",
                           owner: Union[str, UserRegistrar] = "",
                           description: str = "",
                           args: K8sArgs = None,
                           tags: List[str] = [],
                           properties: dict = {}):
        """SQL transformation decorator.

        Args:
            variant (str): Name of variant
            provider (Union[str, OfflineProvider]): Provider
            name (str): Name of source
            schedule (str): Kubernetes CronJob schedule string ("* * * * *")
            owner (Union[str, UserRegistrar]): Owner
            description (str): Description of SQL transformation
            args (K8sArgs): Additional transformation arguments
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            decorator (SQLTransformationDecorator): decorator
        """
        if not isinstance(owner, str):
            owner = owner.name()
        if owner == "":
            owner = self.must_get_default_owner()
        if not isinstance(provider, str):
            provider = provider.name()
        decorator = SQLTransformationDecorator(
            registrar=self,
            name=name,
            variant=variant,
            provider=provider,
            schedule=schedule,
            owner=owner,
            description=description,
            args=args,
            tags=tags,
            properties=properties
        )
        self.__resources.append(decorator)
        return decorator

    def register_df_transformation(self,
                                   name: str,
                                   query: str,
                                   provider: Union[str, OfflineProvider],
                                   variant: str = "default",
                                   owner: Union[str, UserRegistrar] = "",
                                   description: str = "",
                                   inputs: list = [],
                                   schedule: str = "",
                                   args: K8sArgs = None,
                                   tags: List[str] = [],
                                   properties: dict = {}):
        """Register a Dataframe transformation source.

        Args:
            name (str): Name of source
            variant (str): Name of variant
            query (str): SQL query
            provider (Union[str, OfflineProvider]): Provider
            name (str): Name of source
            owner (Union[str, UserRegistrar]): Owner
            description (str): Description of SQL transformation
            inputs (list): Inputs to transformation
            schedule (str): Kubernetes CronJob schedule string ("* * * * *")
            args (K8sArgs): Additional transformation arguments
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            source (ColumnSourceRegistrar): Source
        """
        if not isinstance(owner, str):
            owner = owner.name()
        if owner == "":
            owner = self.must_get_default_owner()
        if not isinstance(provider, str):
            provider = provider.name()
        for i, nv in enumerate(inputs):
            if not isinstance(nv, tuple):
                inputs[i] = nv.name_variant()
        source = Source(
            name=name,
            variant=variant,
            definition=DFTransformation(query, inputs, args),
            owner=owner,
            schedule=schedule,
            provider=provider,
            description=description,
            tags=tags,
            properties=properties
        )
        self.__resources.append(source)
        return ColumnSourceRegistrar(self, source)

    def df_transformation(self,
                          provider: Union[str, OfflineProvider],
                          tags: List[str],
                          properties: dict,
                          variant: str = "default",
                          name: str = "",
                          owner: Union[str, UserRegistrar] = "",
                          description: str = "",
                          inputs: list = [],
                          args: K8sArgs = None
                          ):
        """Dataframe transformation decorator.

        Args:
            variant (str): Name of variant
            provider (Union[str, OfflineProvider]): Provider
            name (str): Name of source
            owner (Union[str, UserRegistrar]): Owner
            description (str): Description of SQL transformation
            inputs (list): Inputs to transformation
            args (K8sArgs): Additional transformation arguments
            tags (List[str]): Optional grouping mechanism for resources
            properties (dict): Optional grouping mechanism for resources

        Returns:
            decorator (DFTransformationDecorator): decorator
        """

        if not isinstance(owner, str):