The SQL transformation processes
SQL queries midstream in a pipeline. You can insert, delete, update, and
retrieve rows from a database. You can pass the database connection information
to the SQL transformation as input data at run time. The transformation
processes external SQL scripts or SQL queries that you create in an SQL editor.
The SQL transformation processes the query and returns rows and database
errors.
Mode
Script mode : The SQL
transformation runs ANSI SQL scripts that are externally located. You pass a
script name to the transformation with each input row. The SQL transformation
outputs one row for each input row.
Query mode : The SQL
transformation executes a query that you define in a query editor. You can pass
strings or parameters to the query to define dynamic queries or change the
selection parameters. You can output multiple rows when the query has a SELECT
statement.
Main Properties
Passive or active transformation : The SQL
transformation is an active transformation by default. You can configure it as
a passive transformation when you create the transformation.
Database type: The type of database the SQL
transformation connects to.
Connection type. Pass database
connection information to the SQL transformation or use a connection object.
There is lot of theoretical
document about this transformation about this on internet and help files I will
try to show how we can use it in different practical scenarios
- Remove duplicate records
- Dynamic Query in SQL Transformation
- Capture Database errors using SQL Transformation
- SQL Transformation with Non-Equi Join
- Dynamic DB Connections using SQL Transformation
- One to Many Records SQLTx
- NonEql Join MultMatch Lkup
- Dynamic Split Data
Remove duplicate records
We can remove duplicate records
by using SQL Transformation by using below method.
First use aggregator
transformation to count of duplicate rows then use same variable in SQL
transformation using parameter substituting
Use below in SQL transformation
after creating sql transformation in query mode
delete test_dup where
PRODUCT_ID=~PRODUCT_ID~ and SUBPRODUCT_ID=~SUBPRODUCT_ID~ and rownum
<~count_dup~
TEST_DUP is table and we want to
find duplicate data on basis of product id and sub product id.
We have used string substitution
feature of SQL transformation here i.e. use of
~
Dynamic Query in SQL
Transformation :
In most of datawarehouse
projects we encountered error ORA-02149
Specified partition does not exist as
sometime we don’t have partition created for new data or data comes with
unexpected value which does not have corresponding partition.
Though it can be
overcome by using interval partitioning feature of oracle but that creates
partition name with name like SYS*
We can use SQL
Transformation to achieve this.
Suppose we have
sales table created with list partitioning
create table sales (
product_id number,
trans_amt number,
sales_dt date,
state_code varchar2(2)
)
partition by list (state_code)
(
partition ct values ('CT'),
partition ca values ('CA')
);
Suppose we get
every day data in sales file which get loaded into sales table but if data
comes with other value than CT or CA for state code then load will fail with
error error ORA-02149
Specified partition does not exist
We can create a SQL
Transformation to achieve this
It can be achieve in below steps
Source is
sales file and create a look up on all_tab_partitions view
Call this
unconnected lookups from expression using below syntax
Chk_partition_exist
= :lkp.LKP_ALL_TAB_PARTITIONS('SALES',state_code)
create a filter
transformation with iif(isnull(Chk_partition_exist),TRUE,FALSE) so that data
for which partition does not exist will
pass
Create SQL
transformation like below
If input data comes with new values of state
code then it will automatically create partitions so that we will never see
error ORA-02149 Specified partition does not exist again.
We will
continue to cover more practical usages of SQL transformation in next article.
Informatica Data Quality Online Training
ReplyDeleteInformatica Online Training
Informatica MDM Online Training
. If you are seeking training and support you can reach me on 91-9000444287.
Introduction and Defining Data Model
Introduction to Informatica MDM Hub
Master Data
Master Data Management
A Reliable Foundation of Master Reference Data
Components of MDM Hub
Application Server Tier
Database Server Tier
Batch Data Process Flow
Trust Framework
Consolidation Flag
http://www.21cssindia.com/courses/informatica-mdm-online-training-99.html
youtube abone satın al /n trendyol indirim kodu
ReplyDeletecami avizesi
cami avizeleri
avize cami
no deposit bonus forex 2021
takipçi satın al
takipçi satın al
takipçi satın al
takipcialdim.com/tiktok-takipci-satin-al/
instagram beğeni satın al
instagram beğeni satın al
btcturk
tiktok izlenme satın al
sms onay
youtube izlenme satın al
no deposit bonus forex 2021
tiktok jeton hilesi
tiktok beğeni satın al
binance
takipçi satın al
uc satın al
sms onay
sms onay
tiktok takipçi satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
instagram beğeni satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
takipcialdim.com/instagram-begeni-satin-al/
perde modelleri
instagram takipçi satın al
instagram takipçi satın al
takipçi satın al
instagram takipçi satın al
betboo
marsbahis
sultanbet
instagram takipçi satın al
ReplyDeleteinstagram takipçi satın al
takipçi satın al
instagram takipçi satın al
takipçi satın al
aşk kitapları
tiktok takipçi satın al
instagram beğeni satın al
youtube abone satın al
twitter takipçi satın al
tiktok beğeni satın al
tiktok izlenme satın al
twitter takipçi satın al
tiktok takipçi satın al
youtube abone satın al
tiktok beğeni satın al
instagram beğeni satın al
trend topic satın al
trend topic satın al
youtube abone satın al
beğeni satın al
tiktok izlenme satın al
sms onay
youtube izlenme satın al
tiktok beğeni satın al
sms onay
sms onay
perde modelleri
instagram takipçi satın al
takipçi satın al
tiktok jeton hilesi
pubg uc satın al
sultanbet
marsbahis
betboo
betboo
betboo
Ucuz, kaliteli ve organik sosyal medya hizmetleri satın almak için Ravje Medyayı tercih edebilir ve sosyal medya hesaplarını hızla büyütebilirsin. Ravje Medya ile sosyal medya hesaplarını organik ve gerçek kişiler ile geliştirebilir, kişisel ya da ticari hesapların için Ravje Medyayı tercih edebilirsin. Ravje Medya internet sitesine giriş yapmak için hemen tıkla: ravje.com
ReplyDeleteİnstagram takipçi satın almak için Ravje Medya hizmetlerini tercih edebilir, güvenilir ve gerçek takipçilere Ravje Medya ile ulaşabilirsin. İnstagram takipçi satın almak artık Ravje Medya ile oldukça güvenilir. Hemen instagram takipçi satın almak için Ravje Medyanın ilgili sayfasını ziyaret et: instagram takipçi satın al
Tiktok takipçi satın al istiyorsan tercihini Ravje Medya yap! Ravje Medya uzman kadrosu ve profesyonel ekibi ile sizlere Tiktok takipçi satın alma hizmetide sunmaktadır. Tiktok takipçi satın almak için hemen tıkla: tiktok takipçi satın al
İnstagram beğeni satın almak için Ravje medya instagram beğeni satın al sayfasına giriş yap, hızlı ve kaliteli instagram beğeni satın al: instagram beğeni satın al
Youtube izlenme satın al sayfası ile hemen youtube izlenme satın al! Ravje medya kalitesi ile hemen youtube izlenme satın almak için tıklayın: youtube izlenme satın al
Twitter takipçi satın almak istiyorsan Ravje medya twitter takipçi satın al sayfasına tıkla, Ravje medya güvencesi ile organik twitter takipçi satın al: twitter takipçi satın al
en son çıkan perde modelleri
ReplyDeleteSms Onay
mobil ödeme bozdurma
nft nasıl alınır
ANKARA EVDEN EVE NAKLİYAT
TRAFİK SİGORTASI
DEDEKTOR
web sitesi kurma
ASK KİTAPLARİ
kartal arçelik klima servisi
ReplyDeleteümraniye arçelik klima servisi
pendik bosch klima servisi
pendik arçelik klima servisi
tuzla mitsubishi klima servisi
çekmeköy bosch klima servisi
ataÅŸehir bosch klima servisi
çekmeköy arçelik klima servisi
ataşehir arçelik klima servisi
Good content. You write beautiful things.
ReplyDeletemrbahis
mrbahis
vbet
sportsbet
taksi
sportsbet
hacklink
korsan taksi
hacklink
sultangazi
ReplyDeleteordu
mardin
bodrum
sincan
0JBZDH