CreateSchema
Generate schema files for specified tables or views for documentation or integration purposes.
CreateSchema
Creates a local schema file (.rsd) from an existing table or view in the data model.
The schema file is created in the directory set in the Location connection property when this procedure is executed. You can edit the file to include or exclude columns, rename columns, or adjust column datatypes.
The add-in checks the Location to determine if the names of any .rsd files match a table or view in the data model. If there is a duplicate, the schema file will take precedence over the default instance of this table in the data model. If a schema file is present in Location that does not match an existing table or view, a new table or view entry is added to the data model of the add-in.
Input
| Name | Type | Required | Description |
| TableName | String | True | Specifies the name of the target table or view for which the schema will be generated. This input determines the scope of the schema creation. |
| FileName | String | False | The absolute file path, including the file name, where the generated schema will be saved. Example: 'C:\\Users\\User\\Desktop\\SmartSheet\\sheet.rsd'. If left empty, FileStream is required. |
Result Set Columns
| Name | Type | Description |
| Result | String | Indicates the success or failure of the schema generation process. Returns 'Success' for successful execution or 'Failure' for errors. |
| FileData | String | Provides the schema file data encoded in Base64 format if neither FileName nor FileStream is specified as input. |