Database Reference
In-Depth Information
2. Start gpfdist on an available port against that directory, for ex-
ample, gpfdist -d /path/to/new/dir -p 8081 -l /path/
to/log/dir/gpfdist.log .
3. Create a named pipe in the directory, for example, mkfifo /path/
to/new/dir/data.fifo .
2. Execute SQL commands against the Greenplum database (perhaps in
simple mappings using a SQLT):
1. First create a writable external table, for example, gpin-
fa.unload_us_person (like gpinfa.us_person) .
2. The location is gpfdist://<InformaticaServer>:8081/
us_person1.out .
3. The format is 'TEXT' (DELIMITER ',') .
4. It is distributed by person_id .
5. Insert records from the table to be sourced into the writable external
table, for example, insert into gpinfa.unload_us_person se-
lect * from gpinfa.us_person .
3. At this point Greenplum will start sending data to the gpfdist process on
the Informatica server, which in turn will write the data to the named pipe.
This process will be blocked and will not complete until another process
reads from the named pipe. At this point, the Informatica session can begin
reading the data from the named pipe and processing it as desired.
4. Once the session has been completed, the preceding insert statement will
complete. Additional SQL commands can be executed to drop the file-based
writable external table. Again this could perhaps be done using a mapping
that executes after the main load and uses a SQLT to execute the SQL, for
example, drop external table gpinfa.unload_us_person .
5. Final cleanup on the file system can be done using command tasks:
1. Delete the named pipe, for example, rm /path/to/new/dir/
data.fifo .
2. Stop gpfdist . There are many ways to do this, but an easy way is to
pass part or all of the command executed earlier to the pkill com-
mand, for example, pkill -f -u <user> " gpfdist -d /path/to/new/dir -p
8081 -l /path/to/log/dir/gpfdist.log "
3. Remove the directory that was created, e.g. rmdir /path/to/new/dir
Search WWH ::




Custom Search