publish.features()
Creates Rasgo Features from a dict
Parameters
features_dict
:dict:
Dictionary
to publish as Rasgo Features
{
"sourceTable": "mandatory DB.SCHEMA.TABLE where features are",
"features": [
{
"columnName": "mandatory_field_name_in_table",
"displayName": "Optional Pretty Name",
"dataType": "mandatory sql type",
"description": "optional display text",
"tags": [
"optional",
"list of strings",
"apply only to this feature"
],
"attributes": [
{ "key": "value"},
{"optional": "apply only to this features" }
]
}
],
"dimensions": [
{
"columnName": "mandatory_field_name_in_table",
"displayName": "Optional Pretty Name",
"dataType": "mandatory sql type",
"granularity": "mandatory noun ..."
}
],
"status": "Production | Sandbox",
"tags": [
"optional",
"list of strings",
"apply to all features"
],
"attributes": [
{"key": "value"},
{"optional": "apply to all features"}
],
"script": "OptionalFile.py",
"gitRepo": "Optional"
}
Return Object
Sample Usage
Create new features from a dict
Publish changes to an existing feature
Publish changes to all features in a FeatureSet
Columns in your DataSource table that are not referenced in either the "dimensions" or "features" list will be ignored
Best Practices / Tips
TIP: Feature name warning message
If you receive the error: "APIError: Failed to create Feature {___}. This name is already in use in your organization. Feature names must be unique." this is a sign that a feature already exists with this name.
Options to remedy are:
If the existing feature is named correctly and the feature you are trying to upload needs a new name: change the displayName attribute in your dict.
If the existing feature is simply an earlier run of this feature, instruct the function to overwrite it by passing in the param if_exists='edit'
If the existing feature is named incorrectly, navigate to the WebApp to change that feature's name, then re-upload
Last updated