Creating a New Data Schema using the Rhino SDK
This article explains how to create a new data schema or data schema version using the Rhino SDK.
Creating a New Data Schema using the Rhino SDK
Prerequisites
Before starting this process, you should have already created a Project using the Rhino SDK or UI.
Import your Python Dependencies
import rhino_health as rh
from rhino_health.lib.endpoints.data_schema.data_schema_dataclass import (
DataSchemaCreateInput,
SchemaVariables
)
import getpassNOTE: Remember to change all lines with CHANGE_ME comments above them in all the blocks below!
Log into the Rhino SDK using your FCP Credentials
Your username will be the email address you log into the Rhino FCP platform with.
print("Logging In")
# CHANGE_ME: MY_USERNAME
my_username = "MY_USERNAME"
session = rh.login(username=my_username, password=getpass.getpass())
print("Logged In")Get Supporting FCP Information Needed to Create Your Dataset
At this point, you will need the name of your Project, any dataset's name you would like to use as input, and your previously created Code Object's name. You can also retrieve each object's UUID by following the instructions here: Frequently Asked Questions (FAQs)
[Option 1] Create Your Schema From a File
To create your Data S chema you will need to change several different pieces of information in the code block below. The paths for file_path will be a local path in your development environment.
Last updated
Was this helpful?