Skip to main content
Administrator Guide
Last Updated: 2023-06-23
Describe the Source CSV Data

Describe the Source CSV Data

Workday Studio's
PrismAnalytics
component requires a description of the source CSV data. You can create the JSON text in the tool of your choice and use it in Studio later. Example: paste it into a text message on the
Message Builder
tab of a
write
step.
  1. Create JSON text containing 2 main nodes:
    • parseOptions
      : information about the format of the CSV data, including the character set and the delimiter character.
    • fields
      : information about each field in the CSV data, including data type and formatting.
  2. In the
    parseOptions
    node, you can define these fields:
    Field Name
    Type
    Required
    Description
    charsetName
    Object
    Yes
    The CSV data file's character set. Example:
    "charset": { "id": "Encoding=UTF-8" }
    Currently, Workday supports the UTF-8 encoding format only. Workday ultimately stores the data in Unicode format. Characters with no Unicode equivalent are stored as the Unicode replacement character, a question mark on a black diamond background.
    fieldsEnclosedBy
    String
    No
    The character used to enclose fields in the CSV data. The default is double quote marks. If a double quote mark is used within a field, escape it by preceding it with another double quote mark. Example:
    "fieldsEnclosedBy": "\""
    fieldsDelimitedBy
    String
    Yes
    The character used to separate field values in the CSV data. Example:
    "fieldsDelimitedBy": ","
    headerLinesToIgnore
    Number
    No
    The number of lines for the parser to ignore as a header. Set to
    0
    if the CSV data doesn't have a header. Example:
    "headerLinesToIgnore": 1
    type
    Object
    Yes
    The input file's type. Currently, Workday supports delimited files only. Example:
    "type": { "id": "Schema_File_Type=Delimited" }
    This value is case-sensitive. Note the upper-case D in Delimited.
  3. In the
    fields
    node, you can define these fields:
    Field Name
    Type
    Required
    Description
    ordinal
    Number
    Yes
    The order of the field in the CSV dataset (index). The ordinal values:
    • Must start with 1.
    • Must be contiguous.
    • Can't skip any number.
    • Have a maximum of 1000.
    name
    String
    Yes
    The name of the CSV dataset field. Field names:
    • Must be unique in the dataset.
    • Can contain up to 255 characters.
    • Can only include alphanumeric and underscore characters.
    • Must start with a letter.
    • Can't end with an underscore character.
    • Can't begin with WPA_.
    description
    String
    No
    The field's description. Maximum 1000 characters. Example:
    "description": "The worker's full name."
    type
    Object
    Yes
    The field's type. Options are:
    • Text
    • Numeric
    • Boolean
    • Date
    Example:
    "type": { "id":"Schema_Field_Type=Date"}
    parseFormat
    String
    Yes (for Date types)
    The date's format. Example:
    "parseFormat": "dd-MM-yy HH24:mm:ss"
    precision
    Number
    Yes (for Numeric types)
    The maximum number of digits in a numeric value. Includes all numbers to the left and right of a decimal point but not the decimal point itself. Maximum value is 38. Example:
    "precision": 38
    scale
    Number
    Yes (for Numeric types)
    The number of digits to the right of the decimal point in a numeric value. Must be less than the
    precision
    value. Example:
    "scale": 2
    defaultValue
    Text
    No
    The default value for a field, if none is provided in the upload file.
    Express a default text value in double quotes. Example:
    “N/A”
    .
    Default numeric values must agree with the specified
    precision
    and
    scale
    .
    Default date values must be in this format: yyyy-MM-dd'T'HH:mm:ss'Z'.
    required
    Boolean
    No
    Specifies whether a field must contain a value. Set to
    True
    if a field is required, otherwise set to
    False
    . If a field is required, its value can't be null in any insert, update, and upsert data operation.
    externalID
    Boolean
    Yes (to take advantage of update, upsert, and delete operations).
    Specifies whether a field represents an External ID. Set to
    True
    to designate a field an External ID, otherwise set to
    False
    .
    Because External ID fields can't be null, you should specify that any External ID field is required. You can only specify 1 field as External ID.
    Specify an External ID in new tables if you want to take advantage of update, upsert, and delete functionality.
    To use update, upsert, and delete functionality with an existing table, you must modify it so it has a single field designated as External ID. The Prism public API doesn't support the modification of a table that contains data. In such cases, make the modification in Workday.
Your source CSV file describes this table:
Employee
Employee ID
Job Title
Hire Date
Annual Salary
Logan McNeil
21001
Vice President, Human Resources
1/1/2010
213298.00
Oliver Reynolds
21003
Chief Information Officer
1/1/2010
394935.00
Maximilian Schneider
21004
Chief Operating Officer
1/1/2010
255373.00
Teresa Serrano
21005
Controller
1/1/2010
291785.00
You describe it using JSON like this:
{ "parseOptions": { "fieldsDelimitedBy": ",", "fieldsEnclosedBy": "\"", "headerLinesToIgnore": 1, "charset": { "id": "Encoding=UTF-8" }, "type": { "id": "Schema_File_Type=Delimited" } }, "fields": [ { "ordinal": 1, "name": "Employee", "description": "Employee", "precision": 255, "scale": 0, "parseFormat": null, "type": { "id": "Schema_Field_Type=Text" } }, { "ordinal": 2, "name": "Employee_ID", "description": "Employee ID", "precision": 38, "scale": 0, "parseFormat": null, "type": { "id": "Schema_Field_Type=Numeric" } }, { "ordinal": 3, "name": "Job_Title", "description": "Job Title", "precision": 255, "scale": 0, "parseFormat": null, "type": { "id": "Schema_Field_Type=Text" } }, { "ordinal": 4, "name": "Hire_Date", "description": "Hire Date", "precision": 0, "scale": 0, "parseFormat": "MM/dd/yy", "type": { "id": "Schema_Field_Type=Date" } }, { "ordinal": 5, "name": "Annual_Salary", "description": "Annual Salary", "precision": 38, "scale": 2, "type": { "id": "Schema_Field_Type=Numeric" } } ], "schemaVersion": { "id": "Schema_Version=1.0" } }