This collector is for Informatica versions prior to Informatica Intelligent Cloud Services (IICS)
About Collectors
Pre-requisites
Collector Server Minimum Requirements
Informatica Requirements
-
Informatica 9.1+ with repository hosted in Oracle.
-
Access to Informatica Repository (see section below)
-
Establish Informatica Repository Access
-
Create an Oracle user with read access to all tables in the Informatica repository database.
-
-
Establish Informatica Server Access
-
Create a user that has read access to the Informatica Server.
-
-
Step 1: Create the Source in K
Create a Informatica source in K
-
Go to Settings, Select Sources and click Add Source
-
Select "Load from File" option
-
Give the source a Name - e.g. Informatica Production
-
Add the Host name for the Informatica Server
-
Click Finish Setup
Step 2: Getting Access to the Source Landing Directory
Step 3: Install the Collector
It is recommended to use a python environment such as pyenv or pipenv if you are not intending to install this package at the system level.
You can download the Latest Core Library and whl via Platform Settings → Sources → Download Collectors
Run the following command to install the collector
pip install kada_collectors_extractors_<version>-none-any.whl
You will also need to install the common library kada_collectors_lib for this collector to function properly.
pip install kada_collectors_lib-<version>-none-any.whl
You may require an ODBC package for the OS to be installed as well as an oracle client library package if do you not have one already, see https://www.oracle.com/au/database/technologies/instant-client.html
Step 4: Generate runtime mappings
In your environment you maybe using runtime overrides for parameters in your Informatica jobs. KADA uses the runtime overrides to resolve lineage for parameter driven jobs.
Use kada_informatica_runtime_parser.py to generate a runtime_session_overrides.json which will be used by the Informatica extractor.
Step 5: Configure the Collector
The collector requires a set of parameters to connect to and extract metadata from Informatica
|
FIELD |
FIELD TYPE |
DESCRIPTION |
EXAMPLE |
|---|---|---|---|
|
username |
string |
Username to log into Oracle |
"myuser" |
|
password |
string |
Password to log into Oracle |
|
|
dsn |
string |
Datasource Name for Oracle |
|
|
repo_owner |
string |
Owner of all tables required by the extractor |
"inf" |
|
oracle_client_path |
string |
Full path to the Oracle Client libraries |
"/tmp/drivers/lib/oracleinstantclient_11_9" |
|
cached |
boolean |
Prevent re-extracting data |
false |
|
input_path |
string |
Path to runtime_session_overrides.json |
"/tmp/input" |
|
output_path |
string |
Output location |
"/tmp/output" |
|
mask |
boolean |
Enable masking |
true |
|
compress |
boolean |
Gzip output |
true |
kada_informatica_extractor_config.json
{
"username": "",
"password": "",
"dsn": "",
"repo_owner": "",
"oracle_client_path": "",
"cached": false,
"input_path": "/tmp/input",
"output_path": "/tmp/output",
"mask": true,
"compress": true
}
Step 6: Run the Collector
This is the wrapper script: kada_informatica_extractor.py
import os
import argparse
from kada_collectors.extractors.utils import load_config, get_hwm, publish_hwm, get_generic_logger
from kada_collectors.extractors.informatica import Extractor
get_generic_logger('root')
_type = 'informatica'
dirname = os.path.dirname(__file__)
filename = os.path.join(dirname, 'kada_{}_extractor_config.json'.format(_type))
parser = argparse.ArgumentParser(description='KADA Informatica Extractor.')
parser.add_argument('--config', '-c', dest='config', default=filename)
parser.add_argument('--name', '-n', dest='name', default=_type)
args = parser.parse_args()
start_hwm, end_hwm = get_hwm(args.name)
ext = Extractor(**load_config(args.config))
ext.test_connection()
ext.run(**{"start_hwm": start_hwm, "end_hwm": end_hwm})
publish_hwm(args.name, end_hwm)
Advance options:
If you wish to maintain your own high water mark files elsewhere you can use the above section's script as a guide on how to call the extractor.
If you are handling external arguments of the runner yourself, you'll need to consider the following for the run method https://kadaai.atlassian.net/wiki/spaces/KKB/pages/3333849163/Collector+Integration+General+Notes#Extractor-run-method
To edit the internal SQL being run refer to https://kadaai.atlassian.net/wiki/spaces/KKB/pages/3333849163/Collector+Integration+General+Notes#Adding-Custom-SQL
Step 7: Check the Collector Outputs
K Extracts
A set of files (eg metadata, databaselog, linkages, events etc) will be generated. These files will appear in the output_path directory you set in the configuration details
High Water Mark File
A high water mark file is created in the same directory as the execution called informatica_hwm.txt and produce files according to the configuration JSON. This file is only produced if you call the publish_hwm method.
If you want prefer file managed hwm, you can edit the location of the hwm by following these instructions https://kadaai.atlassian.net/wiki/spaces/KKB/pages/3333849163
Step 8: Push the Extracts to K
Once the files have been validated, you can push the files to the K landing directory.
You can use Azure Storage Explorer if you want to initially do this manually. You can push the files using python as well (see Airflow example below)