Wiki

Clone wiki

OYSTER / 2-_Source_Tag

The Source tag defines the type of source and all the connection information required for the source. There must be exactly one source defined via the Source tag in every OysterSourceDescriptor XML file.
The Source tag can define connections to sources stored in three different formats which are defined by the value of the Type attribute.

  • Type
    • Acceptable Values
      • "FileDelim"
      • "FileFixed"
      • "Database"

3.3.1 Type="FileDelim"

#!xml

<Source Type="FileDelim" Char="|" Qual="" Labels="Y">Absolute Path</Source>

The Source tag has four attributes, including the Type attribute, when Type is assigned the value of "FileDelim".

  • Type - must be assigned the value of "FileDelim"
  • Char - the value assigned must identify the character used as the delimiter for the attributes that form a reference in the source file.
    • Special characters used as delimiters:
      • Tab - specified as "\t", "[t]", or "\u0008"
      • Quotation - specified as """
  • Qual - the value assigned must identify the character used to qualify attributes in the source file.
  • Labels - identifies if the source file contains labels as the first line of the document.
    • Acceptable Values
      • "Y" - Causes OYSTER to ignore the first line in the source file.
      • "N" - Causes OYSTER to include the first line in the source file.

The start and end tag enclose character data that represents the absolute path to the delimited text file that contains the source data.

3.3.2 Type="FileFixed"

#!xml

<Source Type="FileFixed">Absolute Path</Source>

The Source tag has no additional attributes when the Type attribute is assigned the value of "FileFixed".

The start and end tag enclose character data that represents the absolute path to the fixed width text file that contains the source data.

3.3.3 Type="Database"

When the Type attribute is assigned the value "Database" there is three different formats available for the Source tag.

3.3.3a ODBC Connections

#!xml

<Source Type="Database" SID="Database_Name" UserID="User" Passwd="Pass" CType="odbc">Table Name</Source>

The Source tags that define ODBC connections have either three or five attributes including the Type attribute.

  • Type - Must be assigned the value of "Database"
  • SID - Must be assigned the name of the database in which the source data is stored on the server.
  • UserID - Must be assigned the name of the user with access to write to the desired table.
    • Optional - Only required if the UserID and Password are not defined during the creation of the actual ODBC connection
  • Passwd - Must be assigned the password associated to the user given as the values of the UserID attribute.
    • Optional - Only required if the UserID and Password are not defined during the creation of the actual ODBC connection
  • CType - Must be assigned the value of "odbc"

The start and end tag enclose character data that represents the name of the table that contains the source data.

3.3.3b Standard Database Connections

#!xml

<Source Type="Database" Server="123.123.123.123" Port="####" SID="Database_Name" UserID="User" Passwd="Pass" CType="Type_of_Database">Table Name</Source>

The Source tags that define standard database connections have seven attributes including the Type attribute.

  • Type - Must be assigned the value of "Database"
  • Server - Must be assigned the address of the database server to be used.
    • DNS Name
    • IP address
  • Port - Must be assigned the port number on which the database server will respond to requests.
  • SID - Must be assigned the name of the database in which the source data is stored on the server.
  • UserID - Must be assigned the name of the user with access to the desired table.
  • Passwd - Must be assigned the password associated to the user given as the value of the UserID attribute.
  • CType - Value is based on the type of database to which a connection is being made.
    • Possible values
      • "mysql"
      • "oracle"
      • "postgresql"
      • "sqlserver"

The start and end tag enclose character data that represents the table name in which the source data is located. This character data must represent a fully qualified table name. An example of a fully qualified table name is "DatabaseName.dbo.TableName" in SQL Server or "DatabaseName.TableName" in MySQL.

Back to OYSTER Reference Guide page

Click Prev OysterSourceDescriptor Tag page

Click Next ReferenceItems Tag page

Updated