Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

XML files containing one or more data fix sql statements, a sql statement to back up data, and validation statements used to determine whether the data fix should be committed or rolled back.

Object Type Identification

  • If a file with .xml extension is in the folder specified by the Data Fix Root Source Directory project property, then it is considered a data fix file

File Extensions 

NameDescription
.xmlExtensible Markup Language file format used to create common information formats and share both the format and the data using standard ASCII text.

Object Type

NameCode
Data FixDATA_FIX

Object Type Attributes

NameCodeDescriptionRequiredDefault ValueSupported Values
SourceSOURCEObject source location typeYes

SCM

SCM
Target LocationTARGET_LOCATIONPath to where the file should be deployed toNo



Database User PropertyDB_USERProperty name for database user nameNoFDEBS_DB_USER
Database Password PropertyDB_PASSWORDProperty name for database passwordNoFDEBS_DB_PASSWORD

Related Project Properties

NameCodeDescriptionDefault Value
Data Fix Root Source DirectoryFDEBS_DATA_FIX_ROOT_SOURCE_DIRThe source directory to recognize files as data fixesdatafix
Data Fix Root Destination DirectoryFDEBS_DATA_FIX_DESTINATION_DIRThe destination directory to copy file to.  Leave blank to not copy file anywhere

Sample Build Commands 

N/A - Build commands not supported for this type.

Sample Deploy Commands 

N/A - Deploy commands not supported for this type.

Data Fix Source Formatting

Tag NameRequiredDescription
DescriptionYesA description for the data fix being run
FixSQLYesThe SQL which implements the data fix. It can be multiple statements delimited by a semicolon or slash
BackupSQLYesSQL to perform necessary backup of data before executing FixSQL. This must be one valid SQL statement, not followed by a semicolon
ConnectStringPropertyNoThe JDBC connection string for the database. The APPS_JDBC_URL environment variable will be used if property is not specified in file
UserPropertyNoUser to connect to database with. Environment instance property FDEBS_DB_USER will be used if property is not specified in file
PasswordPropertyNoPassword for the database user. Environment instance property FDEBS_DB_PASSWORD will be used if property is not specified in file
ValidationsYesThe rule(s) used to validate the data fix before committing changes
       ValidationYesA single validation rule. See below for more details

...

If more than one of these elements are present, all must evaluate to true for the validation to pass.

Data Fix Source Template

Code Block
languagexml
themeRDark
titleBasic Data Fix Template
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>
<DataFix xmlns="http://flexagon.com/database/datafix">
    <Description></Description>
    <FixSQL></FixSQL>
    <BackupSQL></BackupSQL>
    <ConnectStringProperty></ConnectStringProperty>
    <UserProperty></UserProperty>
    <PasswordProperty></PasswordProperty>
    <Validations>
		<!-- Can be one or more -->
        <Validation>
            <Description></Description>
            <ValidationSQL></ValidationSQL>
			<!-- Can be one or more -->
            <Environment> 
                <EnvironmentCode></EnvironmentCode>
                <Before>
                    <Equals></Equals>
                    <NotEquals></NotEquals>
                    <GreaterThan></GreaterThan>
                    <GreaterThanEqual></GreaterThanEqual>
                    <LessThan></LessThan>
                    <LessThanEqual></LessThanEqual>
                </Before>
                <After>
                    <Equals></Equals>
                    <NotEquals></NotEquals>
                    <GreaterThan></GreaterThan>
                    <GreaterThanEqual></GreaterThanEqual>
                    <LessThan></LessThan>
                    <LessThanEqual></LessThanEqual>
                </After>
                <UpdateCount>
                    <Equals></Equals>
                    <NotEquals></NotEquals>
                    <GreaterThan></GreaterThan>
                    <GreaterThanEqual></GreaterThanEqual>
                    <LessThan></LessThan>
                    <LessThanEqual></LessThanEqual>
                </UpdateCount>
            </Environment>
        </Validation>
    </Validations>
</DataFix>

Data Fix Source Examples

The first example is a simple data fix that updates one row of a table, then verifies only the expected row is updated.

...