_Test_Operations_Example

 

Test Operations Example

@Database(id: 'master')

@Database(id:'edw-pet')

class extract_master_to_edw_pet

{

      @Test

      colInOrder()

      {

            stage() 

            {                

                  source: 'EXT_MASTER_TO_EDW_PET_tPLANT_GEO_CODE',

                  target-table: 'tPlant_Geo_Code',

                  connection-id: 'master',

                  target-schema: 'dbo'

            }; 

            set()

            {

                  variable: 'population_time',

                  value: '2013-01-01 00:00:00'

            };

            execute()

            {

                  folder: 'TDN_ANALYTICS',

                  workflow: 'wkf_EXTRACT_MASTER_TO_EDW_PET'

            };

            assert()

            {

                  source-table: 'tPlant_geo_code',

                  connection-id: 'edw-pet',

                  source-schema: 'master_dbo',

                  target: 'EXT_MASTER_TO_EDW_PET_TPLANT_GEO_CODE_PET'

            };

 

 assert-log(

 

classifier: 'sessionLog',

 

log-name-pattern: '^s_m_EXTRACT_.*\\.log\\.[\\d]+\\.[\\d]+$',

 

expected-log-expression: 'The session completed with [0] row transformation errors.',

 

failure-id: 'LOG_ENTRY_NOT_FOUND'

 

);


      }

}

Â