CreateSchema
Generates a schema file for a specified table or view in Salesforce Marketing Cloud. The schema file describes field names, data types, and relationships, supporting integration or documentation 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 connector 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 connector.
Input
| Name | Type | Required | Description |
| TableName | String | True | Specifies the name of the table or view for which the schema file should be generated. This value determines the structure that the stored procedure exports into the resulting schema. |
| FileName | String | False | Specifies the full file path and the name of the schema file to generate. The path must include the parent directory configured in the Location property, the directory that corresponds to the schema type such as SOAP, and the .rsd file name that represents the target table or view. For example, a valid Windows path might be 'C:\\Users\\User\\Desktop\\SalesforceMarketingCloud\\SOAP\\table.rsd'. |
Result Set Columns
| Name | Type | Description |
| Result | String | Returns a value of 'Success' when the schema is generated without errors. It returns a value of 'Failure' when the stored procedure encounters a problem during schema creation. |
| FileData | String | Specifies the generated schema that is returned as a Base64-encoded string. This value is provided only when neither the FileName nor FileStream input is supplied, and it enables callers to capture the schema directly within the API response. |