Skip to content

Generic Object

Generic objects within the Constructor Platform data catalog can store byte strings of any format. They are ideal for storing unformatted data and for testing purposes. If you need to handle specific data types, you can implement your own object type and use it.

Creating a Generic Object

To create a Generic Object, you can use the following constructor:

[Copy Code](javascript:void(0)) Python
RawObject( name: [str] = "Object Name", description: Optional[str] = "Object description", native: bytes = b'XXXXX' )

where

  • name is the name of the object in the Data Catalog.
  • description is the description of the object in the Data Catalog.
  • native is the data represented as bytes.

Retrieving the object data

To retrieve the contents of the object from the Data Catalog, use the following method:

[Copy Code](javascript:void(0)) Python
def native(self) -> bytes

This method returns the contents of the object stored in the Data Catalog as bytes.