XML files containing one or more data fix sql statements, sql statements to back up data, and validation statements used to determine whether the data fix should be committed or rolled back.
Object Type Identification
...
Name | Code | Description | Default Value |
---|---|---|---|
Data Fix Root Source Directory | FDEBS_DATA_FIX_ROOT_SOURCE_DIR | The source directory to recognize files as data fixes | datafix |
Data Fix Root Destination Directory | FDEBS_DATA_FIX_DESTINATION_DIR | The destination directory to copy file to. Leave blank to not copy file anywhere |
Related Environment Instance Properties
Name | Code | Required | Description |
---|---|---|---|
JDBC Driver Path | FDEBS_DRIVER_PATH | Yes | Location of JDBC driver file required only for running data fix files. For example, /u01/app/oracle/product/12.1.0/dbhome_1/jdbc/lib/ojdbc6.jar |
Sample Build Commands
N/A - Build commands not supported for this type.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="UTF-8"?> <DataFix xmlns="http://flexagon.com/database/datafix"> <Description>Fix line items for product IDs 47809 and 45203</Description> <FixSQL>update XXHR.xxhr_order_items set unit_price = 100 where product_id = 47809; update XXHR.xxhr_order_items set unit_price = 75 where product_id = 45203; update XXHR.xxhr_product_list set list_price = 100 where product_id = 47809; update XXHR.xxhr_product_list set list_price = 75 where product_id = 45203;</FixSQL> <BackupSQL>create table xxhr.xxhr_order_items_bkp as (select * from xxhr.xxhr_order_items); create table xxhr.xxhr_product_list_bkp as (select * from xxhr.xxhr_product_list); </BackupSQL> <Validations> <Validation> <Description>Verify number of rows modified for product with id 47809</Description> <ValidationSQL>select count(*) from xxhr.xxhr_order_items where list_price = 100 and product_id = 47809</ValidationSQL> <Environment> <EnvironmentCode>DEV</EnvironmentCode> <UpdateCount> <GreaterThan>80</GreaterThan> <LessThan>100</LessThan> </UpdateCount> </Environment> <Environment> <EnvironmentCode>default</EnvironmentCode> <UpdateCount> <GreaterThan>87</GreaterThan> <LessThan>93</LessThan> </UpdateCount> </Environment> </Validation> <Validation> <Description>Verify number of rows modified for product with id 45203</Description> <ValidationSQL>select count(*) from xxhr.xxhr_order_items where list_price = 75 and product_id = 45203</ValidationSQL> <Environment> <EnvironmentCode>default</EnvironmentCode> <After> <GreaterThan>120</GreaterThan> <LessThan>125</LessThan> </After> </Environment> </Validation> <Validation> <Description>Verify total number of row updates</Description> <ValidationSQL></ValidationSQL> <Environment> <EnvironmentCode>default</EnvironmentCode> <After> <Equals>4</Equals><GreaterThan>200</GreaterThan> <LessThan>220</LessThan> </After> </Environment> </Validation> <Validation> <Description>Verify total number of row updates</Description> <ValidationSQL></ValidationSQL> <Environment> <EnvironmentCode>default</EnvironmentCode> <UpdateCount> <Equals>4</Equals> </UpdateCount> </Environment> </Validation> </Validations> </DataFix> |
...