Skip to end of metadata
Go to start of metadata

Introduction

File schemas used in a transformation can be either inherited from activities adjacent to a transformation (as described on this page), or they can be defined directly in a transformation. Schemas defined in an activity are not considered part of the transformation but are instead inherited by the transformation when a schema is not directly defined in the transformation. Transformations with both a source and a target schema can be referenced in multiple operations.

Defining a Schema in an Activity

The ability for a user to provide a schema is included as a step in the configuration of a file-based activity. The interface for defining request and response schemas is the same among these connector activities and is covered on this page:

NOTE: API SOAP Request and Response activities and SOAP activities are also file-based activities but have unique configuration screens, as documented on the linked pages.

An example of defining a schema in a File Share Read activity is included below.

During configuration of the above file-based activities, you select one of three options in a section called Provide Response Schema or Provide Request Schema:

  • No: Choose this option to skip defining a schema in the activity. You may want to select this option if you plan to define the schema later directly within the transformation (see Schemas Defined in a Transformation), or if no schema is required for your use case (see When to Use a Schema).
  • Yes, Use Saved Schema: Choose this option to select an existing file schema that has previously been defined in the current project. When this option is selected, this section becomes available:

    • Saved Schemas: Use the dropdown to select from an existing schema to reuse.

    • View Schema: After an existing uploaded schema is selected, you can view the schema directly within the text area below the dropdown. To view the schema in a larger area, click the popout icon  (after opening that area, click the return icon  to come back to this screen).

      Though a saved schema is not editable, this text area can be copied using Control+C (Windows or Linux) or Command+C (macOS).

      This text area is only for the display of existing uploaded schemas and not for flat, hierarchical, or mirrored custom schemas.

    • Validation: Validation information is provided below the text area and is based on the file extension of the saved schema.

  • Yes, Provide New Schema: Choose this option to define a new schema by loading one from a URL, uploading a file, or manually entering one into the text area. When this option is selected, this section becomes available:

    • Schema Name: Enter a name for the schema into the upper text box, including the file extension (.json, .xml, .xsd, .csv, or .zip). If no file extension is provided, the file is treated as JSON by default. If you are loading the schema from a URL or uploading a file, you can leave this blank, as the name will be populated once the file is loaded. Once you upload a file in a selected format, manually changing the extension has no effect.

    • Load URL: Click to open a dialog where you can load a schema from a URL:

      • File Type: Use the dropdown to select from the supported file types, including JSONXML, XSDCSV, and ZIP. Take note:
        • XSD: An XSD provided by URL can import/include other XSD URLs by reference.

        • ZIP: A ZIP archive can contain a collection of XSDs, which can import/include each other by reference. Any non-XSD files in the archive are ignored. Multiple directory levels are supported.

      • URL: Enter a URL that is accessible without authentication. Files up to 5 MB in size can be uploaded.
      • Load: Click to load the schema from the URL. Note that the file is retrieved only a single time for schema generation. In addition, be aware that some data may be converted during processing as described in Schema Processing.

        NOTE: When uploading an XSD file that contains multiple top-level elements, on clicking Next to advance to the next step, you are prompted to select the desired root node. Select the desired element and then click Finish to upload the file:

      • Cancel: Click to close the Upload Schema URL dialog without saving.
    • Upload File: Click to open a dialog where you can load a schema from a file that is accessible from the current machine:

      • File Type: Use the dropdown to select from the supported file types, including JSONXML, XSDCSV, and ZIP.

        NOTE: A ZIP archive can contain a collection of XSDs, which can import/include each other by reference. Any non-XSD files in the archive are ignored. Multiple directory levels are supported.
      • File: Use the Browse button to the right to browse to a file that has not yet been used in the current project. Files up to 5 MB in size can be uploaded.

        WARNING: If you try to upload a file with the same name as an existing file already defined in the project, on clicking Next to advance to the next step, a dialog asks if you want to overwrite the existing file. If you click Continue, the file is replaced with the new file with the same name in all places where it is used in the project. If you don't want to overwrite the file, click Cancel. Then manually modify the file so it has a unique name and then try to upload it again.

      • Load: Click to load the schema from the file. Note that some data may be converted during processing as described in Schema Processing.

        NOTE: When uploading an XSD file that contains multiple top-level elements, you are prompted to select the desired root node. Select the desired element and then click Finish to upload the file:

      • Cancel: Click to close the Upload Schema File dialog without saving.
    • View/Edit Schema: If you are not uploading a schema, you can enter one manually into the text area below the Load URL and Upload File buttons. Otherwise, after uploading a schema, you can view or edit the schema directly within that text area.

      To view or edit the schema in a larger area, click the popout icon  (after opening that area, click the return icon  to come back to this screen).

      This text area can also be copied using Control+C (Windows or Linux) or Command+C (macOS).

    • Validation: As you edit a schema, validation information is provided below the text area, with any errors reported one line at a time. That is, after resolving an error on one line, additional syntax errors to resolve may be reported for subsequent lines. Validation is based on the file extension of the provided schema.

Schema Actions Menu

After a schema is defined in an activity, you can access additional menu options that are available for all schemas.

These include Delete, Rename, View Dependencies, Deploy, Configurable Deploy, and Add to Group, as well as Edit Schema and Clear Schema. For details on these actions, see Schema Actions Menu.

On This Page

Related Articles

Last updated:  Mar 29, 2021

  • No labels