Waiting for a file and processing it

Similar documents
Oracle Data Integrator 12c: ETL Integration Bootcamp and New Features

Oracle Data Integrator: Administration and Development Volume I Student Guide

Oracle Data Integrator 12c: Integration and Administration

Using ODI for Teradata Dual-Loads

Oracle Data Integrator 12c: Integration and Administration

BASIC USER TRAINING PROGRAM Module 5: Test Case Development

Oracle Data Integrator 12c: Integration and Administration

Cross-Browser Functional Testing Best Practices

Adding Distribution Settings to a Job Profile (CLUI)

CO Java EE 7: Back-End Server Application Development

CS 450 Introduction to Networking Spring 2014 Homework Assignment 1 File Transfer and Data Bandwidth Analysis Tool

Makefile Brief Reference

HCA Tech Note 220: Using the SmartHome Insteon Hub

Routing EDIFACT Documents in Productions

ORACLE DATA INTEGRATOR (ODI) 10G INTEGRATION PART 1 AND SALESFORCE.COM. Written by: Christian Screen ArtOfBI.com (The Art of Business Intelligence)

Go to SQA Academy the website address is

Chapter 12 Visual Program Debugger

CAS 703 Software Design

Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02

Generic Interface Version NT832-ORACLE FCUBSV.UM [October] [2008] Oracle Part Number E

Software Testing Prof. Meenakshi D Souza Department of Computer Science and Engineering International Institute of Information Technology, Bangalore

Additional Connectivity Options

User s Manual. for. Diagram Consistency and Validation in agenttool III

ir*edi Clean-Up Procedures

Registering for classes Help

ACT-R Environment Manual

Project C: Genetic Algorithms

TABLES AND HASHING. Chapter 13

Revise Quick Start Guide

This document provides a concise, introductory lesson in HTML formatting.

Loading and Extracting HFM data with ODI Knowledge Modules

Starting to Program in C++ (Basics & I/O)

: the User (owner) for this file (your cruzid, when you do it) Position: directory flag. read Group.

Lab Exercise Test First using JUnit

Oracle Data Integrator 11g: Integration and Administration Student Guide - Volume I

Demo Lab Guide Compellent

ACS 5.x: LDAP Server Configuration Example

High Performance Computing Prof. Matthew Jacob Department of Computer Science and Automation Indian Institute of Science, Bangalore

Automating Essbase Outline Extracts to a Relational Database Using the Next Generation Outline Extractor

SonicWALL Security 6.0 Software

Manual Trigger Sql Server 2008 Examples Insert Update

SmartCVS Tutorial. Starting the putty Client and Setting Your CVS Password

About Gluent. we liberate enterprise data. We are long term Oracle Database & Data Warehousing guys long history of performance & scaling

Java EE 7: Back-End Server Application Development

Avaya Interaction Center Release Notes

This document contains information on fixed and known limitations for Test Data Management.

The print queue was too long. The print queue is always too long shortly before assignments are due. Print your documentation

AuraTester User Guide

Installing a Custom AutoCAD Toolbar (CUI interface)

introduction to records in touchdevelop

Ftp Connect Command Prompt To Sql Server 2008 Using Windows Authentication

MELLANOX MTD2000 NFS-RDMA SDK PERFORMANCE TEST REPORT

BIG-IQ Centralized Management: ADC. Version 5.0

Defining an ODBC data source

Ranger 0.5 Audit Configuration

F5 BIG-IQ Centralized Management: Local Traffic & Network. Version 5.2

Optimizing Performance for Partitioned Mappings

Application Server Release 2015

DocShuttle Administrator

Transaction Isolation Level in ODI

Using SQL Developer. Oracle University and Egabi Solutions use only

Configuring Cisco TelePresence Manager

Info 408 Distributed Applications Programming Exercise sheet nb. 4

Migrating from Connect To Image Center 2.0

Etasoft XT Server 1.x

Using Accommodate. Information for SAS Students at UofG

Introduction to Architecture. Introduction to Architecture 1

Get JAVA. I will just tell you what I did (on January 10, 2017). I went to:

Upgrading the Server Software

Several sets of parameters and configuration techniques affect communication performance:

Deep Learning for Visual Computing Prof. Debdoot Sheet Department of Electrical Engineering Indian Institute of Technology, Kharagpur

Getting Started User s Guide

Configuring the Oracle Network Environment. Copyright 2009, Oracle. All rights reserved.

Module 16: Distributed System Structures. Operating System Concepts 8 th Edition,

AppsRules Suite. Patch Installation Guide. Software Version 6.5

FieldView. Management Suite

Top Ten Best Practices in Oracle Data Integrator Projects

Relius Administration Version For Public Consumption Last Updated: May 16, 2017 Relius Technology Support

CMSC 332 Computer Networking Web and FTP

Physical-to-Virtual Migration with Portlock Storage Manager

LSSP Corporation 1 PinPoint Document Management Initial Setup Guide - Advanced

Cedar User manual. Last modified: 10/08/2005. Author: Johann Larusson

DocShuttle Dictator. by Bytescribe, Inc.

Online Demo Guide. Barracuda PST Enterprise. Introduction (Start of Demo) Logging into the PST Enterprise

Replication. Some uses for replication:

WEB ADI USER GUIDE. 1. The first step is to review and ensure you meet the following system requirements:

WebLogic JMS System Best Practices Daniel Joray Trivadis AG Bern

DB2 S-TAP, IMS S-TAP, VSAM S-TAP

ONLINE BOOKING GUIDE

06/02/ Local & Metropolitan Area Networks 0. INTRODUCTION. 1. History and Future of TCP/IP ACOE322

Cube Designer User Guide SAP BusinessObjects Financial Consolidation, Cube Designer 10.0

Configuring the EN-4000 s Serial Ports

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements

Oracle Applications White Paper R12: Bank Reconciliation through a Case Study

P2P Programming Assignment

Distributed System Chapter 16 Issues in ch 17, ch 18

SAS Data Integration Studio 3.3. User s Guide

NetBeans IDE Field Guide

Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore

Module 15: Network Structures

Transcription:

Waiting for a file and processing it One of the perennial issues developers have is that they want to wait for incoming files in a directory, and when those files arrive, to process each one in a scenario. ODI provides tools to enable you to wait for files (OdiWaitForFile tool) and to take an action after that. The complexity comes when you want to wait for files (many of which may come in at a time) and process each individually. In order to address this issue, we need to add a little cunning to our approach. The starting point is to create a new ODI procedure, with a set of options: This procedure will be used in the package which we create. The package will have three steps: An OdiWaitForFile step, which polls the appropriate directory, waiting for files to be ready to process. (Note that it is best practice when moving files, especially when receiving files transmitted using FTP to actually move two files, the file you want and an associated marker file, which is moved AFTER the transmit of the actual file. This technique gets round the problem caused by files created with a slow write being processed before they are ready. The marker file may contain the name of the file you want, or be named similarly, or only be transmitted on completion of all files in the transmission) Process Waiting Files is the procedure we create to be able to deal with the file(s) which need to be processed. A Start Self step, which initiates the execution of the whole Wait and process package. (the reason we don t just loop is so that we can see that task has run, and potentially purge the log of completed executions)

In the Package this image shows the OdiFileWait parameters. In this case I am waiting on the d:/temp directory for all files with a.zip extension. I have told ODI not to do anything with the file ( Action: NONE ) although it may be an idea to move the file to a processing directory. In this case, I have not used any of the other options, where I can for instance specify the number of files to wait for (I might want to process batches).

When ODI has detected files which match the criteria specified, it will move on to the next step in the process, which is my procedure to process the incoming files. This process has the set of parameters shown below, which I need to fill in: Of the options shown on this one, the PATTERN is for the files that we actually want to process not those we are waiting on (which may be different). SCEN_NAME is the name of the scenario to be executed for each of the files SYNC_MODE is 1 for Synchronous and 2 for Asynchronous. Be careful with this one, as if you execute asynchronously, you will get as many concurrent executions of the scenario as there are files. If the tasks within the scenario have not been specifically modified to allow for concurrent execution, you may have problems. (by default for instance all the temporary tables for a particular interfaces will use the same name) INCOMING_DIRECTORY is where the files for processing are located. This will be the same as the first step, unless you chose the MOVE option, to move the files to a separate directory

The last step I have put in the package is the execution of itself, asynchronously. This is using the SESS_NAME as the name of the scenario to start. This may not be correct if the original scenario was started using a NAME= parameter.

Procedure Detail This is the detail of the procedure I created. As you can see it has only four steps. It could be done in less, but this makes the process more readable. Figure 1 The steps of the file processing procedure

The first of the steps is the one to create the temporary table I will use to store the names of the file to process. I have put this table in the Sunopsis Memory Engine, an inmemory database functionality which is part of the ODI product. In this first step, as I only have one command, I put it in the Command on Target tab. The first part of this gets us the JDBC connection we will use, and to get the parameters of that, on the Command on Source tab, I have set the parameters of the database I wish to use (see the following image) As the table will be created in memory in the execution agent, and it should be disposed of on completion of the session, there should be little chance of this taking up too much memory. I have also created it with the sessionid as well as the filename, in case. Figure 2 Command on target for the create table step of the procedure

Figure 3Command on Source for the create table step of the procedure

Next is the step to retrieve the list of files, and insert them into the newly created table (in memory). Here we are using some native functionality of the Jython scripting environment. The glob.glob(filepattern) will return a collection of the names, which we can then use to insert into the database with the INSERT statements. Figure 4Command on Source for the Retrieve file list step of the procedure

Command on Source for the step which retrieves the file names from the table. Note that we set the Technology and Schema here to match the memory engine, pre-defined in Topology. Figure 5 Execute Scenario for each file step "Command on Source"

For the Command on Target we execute the OdiTool command OdiStartScen once for each of the files retrieved on the Command on Source. Note that to get it to substitute the value of FILENAME in the resultset from the source command, we use the # prefix. Note also that the name of the variable I am passining in to each of the scenarios is here set as ORACLE.FileToBeProcessed. This implies that I have a project with a code ORACLE, and the variable is called FileToBeProcessed. It might be better to use a Global Variable, to eliminate the need to edit this in the procedure, and a variable FileToBeProcessed needs to be created. This does suppose that the scenario you are starting DECLARE s this variable, which may then be used in the scenario including in resource names (file names) etc Figure 6 Execute Scenario for each file step "Command on Target"

The last Step in the procedure is just a tidy-up step, to drop the table I created earlier. As there is only one command, this goes on the Command on Target tab. Figure 7 Last step, Drop Table, Clean up after yourself

Appendix 1: Getting the value of parameters passed to a scenario One last extra little tidbit which may be useful: if you are passing variables into a scenario and want to know that those variables have been set, by default these are not shown in the log. A couple of workarounds exist to get that information: 1) Put a tool step in your package, something like an OdiSleep, and modify the code to be executed as illustrated: The result of which will show in the log as follows:

2) The second option is to do a similar thing, but to put the code into a procedure as follows: As you can see, here I simply made a Java BeanShell step and put the commented (/* */) code into there, so it is ignored by the interpreter.