A Schema is an object that defines data. This includes metadata qualities like data type, field length, decimal places, and EDI message ID. It also includes descriptions of fields, cells, or elements, such as order number, unit price, etc.
Schemas basically determine how a document should be read or written.
There are different types of Schemas:
- Database Schema: Studio helps you populate the Schema with the tables and columns specified in a Data Source, and then reads the database's metadata to create the table and column properties.
- EDI Schema: You choose a message ID (ex. 850 purchase order), and Studio populates the Schema with all segments and elements. You can then customize as needed. Studio supports X12, EDIFACT, and TRADACOMS standards. See Uploading EDI Standards to the CIC Studio.
- Flat File Schema: If you have a sample flat file, Studio determines whether it's fixed-length or delimited. It then reads the data and allows you to create field headings (ex. first name) and specify data types (ex. string). Or you can create a Schema from scratch, detailing each field one at a time.
- JSON Schema: JSON is a text format that facilitates structured data interchange between all programming languages. JSON is a syntax of braces, brackets, colons, and commas that is useful in profiles, applications, and additional contexts. Studio gives you options to build a Schema manually, or to import or paste content directly from a JSON document.
- Spreadsheet Schema: A Schema wizard helps you to create a Schema based on a sample spreadsheet, and then guides you through the process of selecting cells, creating headings (ex. first name), and specifying data types (such as String, Number, Boolean, or DateTime). The sample spreadsheet, stored as a template file, can be reused to build and maintain multiple Spreadsheet Schemas. You can also create a Schema from scratch, detailing each cell one at a time. Another option is to use an existing spreadsheet Schema to easily create a new one.
- XML Schema: This Schema (xml.objSchema) handles complex XML data structures using an XML Schema Definition (XSD). The XML Schema wizard helps you build binding files that can be used repeatedly to create and define XML Schemas.
- Connector Schema: This specialized Schema (NetSuite/Salesforce.ObjSchema) also handles complex data structures from XML, and is generated by Studio as part of its Cloud Connector support for Salesforce and NetSuite applications. The Connector Schema is read-only. Use the Cloud Connector Wizard to create this Schema type.
Business Use
Typically, each transformation requires two Schemas: one for the source document and one for the target document. Without a source Schema, Studio would not know how to format the data when creating a file.
For example, if your data is housed in flat files and you want to send an EDI message to your trading partner, you would create a Flat File Schema tailored to your source document and an EDI Schema specifying the target message you are sending to your trading partner.
The Data Analysis Rulesets (DARS) is a type of Ruleset that does not use a target Schema, as it considered targetless. This specialized Ruleset analyzes source data to determine the next step in the data integration process, or to perform a specific action.
Related Topic: Rulesets
How the Object Works
A Schema is referenced in a Ruleset. When you are creating a Ruleset, you'll need to provide the source and target Schema types, and you specify the specific Schemas for each. Then you use the pieces of the blueprint (fields, cells, elements, etc.) in the Schemas as input and output for rules within the Ruleset.
For example, if you create a move Rule, you can assign a Flat File field called Date in the Schema as input for a Date cell in a Spreadsheet Schema. During transformation, the Integration Engine uses that Rule to move the actual date data from your flat file's field into a newly-created spreadsheet file's cell. A Transformation Settings object is automatically created for you when creating a Flat File Schema with delimited data.
Process Summary
To use Schemas, you must:
- Create two Schemas, one that corresponds with the source format type and one that corresponds with the target format. It is ideal to use sample data to create a Schema if using flat files, spreadsheets, or XML.
- Define or customize each Schema, if necessary.
- Create a Ruleset and assign the Schemas.
Comments
1 comment
This is a test comment.
Please sign in to leave a comment.