Skip to main content Skip to complementary content
Close announcements banner

Defining a schema in a Job script

Use the addSchema {} function to define a schema in a Job script.

addSchema {} properties

Function/parameter Description Mandatory?

NAME

Give a name to the schema.

Yes

CONNECTOR

Type in the connection type of the schema, for example: FLOW, REJECT, and so on.

Yes

addColumn {}

Add a column to your schema and define its parameters:

  • NAME: Type in the label of the column.
  • TYPE: Type in the type of data contained in this column.
  • KEY (optional): Define the column as the primary key by setting this parameter to true.
  • NULLABLE (optional): Define the column as nullable by setting this parameter to true.
  • DEFAULTVALUE (optional): Type in the default value of the column if no value is retrieved at Job execution.
  • LENGTH (optional): Type in the length of the column.
  • PRECISION (optional): Defines the number of digits to the right of the decimal point.
  • COMMENT (optional): Type in any useful comment.

You can use this function to add as many columns as your schema needs.

Yes

Example

The following Job script example defines a schema for component tFileInputDelimited_1, which contains two columns: firstName and lastName, both of type String.

	addSchema {
		NAME: "tFileInputDelimited_1",
		CONNECTOR: "FLOW"
		addColumn {
			NAME: "firstName",
			TYPE: "id_String"
		}
		addColumn {
			NAME: "lastName",
			TYPE: "id_String"
		}
	}

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!