Naming Requirements for Schemas, Tables, and Columns

Follow these requirements to name schemas, tables, and columns:
  • Use alphanumeric characters in the names of schemas, tables, and columns.
    • Use underscore characters, but do not use an underscore character as the leading character in the name.
    • Do not use double-byte character sets in names.
    • Do not use Hive quoted identifiers ( ) in column names.
  • Limit the length of the names of schemas, tables, and columns to 32 characters. This limit is required in the following directives and transformations:
    • Profile directive
    • Transpose directive
    • Summarize Rows transformation (a task in multiple directives)
  • Do not use a DS2 reserved keyword for the name of a column that is the target of any directive that is DS2 based. Using a DS2 reserved keyword for the name of a column that is the target of any DS2-based directive can result in a runtime error.
    These DS2-based directives can be affected:
    • Match-Merge data directive
    • Transform Data directive
    • Transpose Data directive
    • Cleanse Data directive (except the Summarize Rows transformation)
    • Run a SAS program
    For example, if a source column named OTHER is transposed in a Transpose Data directive, a runtime error is generated. OTHER is a DS2 reserved keyword.
    For more information about DS2 keywords, see SAS 9.4 DS2 Language Reference.
  • For column names, avoid using words that are reserved keywords for your DBMS.
    These directives can be affected:
    • Sort Data directive
    • Query or Join Data directive
    For example, DATE and DATABASE are SQL reserved keywords. If a Sort Data directive has a target table with a column called DATE, the sort fails. For more information about DBMS keywords, see the user’s guide for your DBMS.
If an individual directive has any additional naming or other usage requirements, those requirements are documented in a separate “Usage Notes” section for that directive.