Mapping column names stored in a table to one data table dynamically
Hi everyone,
Can someone help me - I am trying to import different file types (CSV, TXT, XLS) into a common table.
The column mapping for the input files is mapped in a look up table - so file 1.txt can have columns order as 12345 while file 2.csv can have columns order 54321.
How would I dynamically set up the correct mapping depending on which file I am busy with in my foreach loop. (an example would be much appreciated - I am relatively new to SSIS and have a deadline coming up)
Thanks,
Pretty sure not possible with available transformations...
You can try script tasks/component and standardize the input file one by one by using a bunch of loops/if-else codes and collect your data into one table.
Otherwise, you would need to create different connections/DF for each types of files.
Similar Messages
-
Multiple 'logical joins' between a fact table and one dimension table
It appears that one cannot create multiple ‘logical joins’ between a fact table and one dimension table in OBIEE using the Oracle BI Administration Tool. For example, considering a Business Model with a dimension table TIMES and a fact table FACT containing START_TIME and END_TIME, we would like to create separate logical joins from FACT to TIMES for the START_TIMEs and END_TIMEs? Obviously, the underlying foreign keys can be created, but as far as I can tell the Oracle BI Administration Tool doesn’t support this. The workaround would be to replicate the TIMES table, but that’s ugly.
I seek an alternative approach.Try this. Create an two aliases for the TIMES dimension (Start & End) in the Physical Layer and then remove foreign key to the "Parent" Times dimension. Create the Foreign Key in the Physical Layer to the new aliases and then create the complex joins in the BMM Layer to the new aliases as well. This will allow you to present both dates within the same table in the Presentation Layer. Not the most elegant solution but it works.
-
View Customization Table changes and Data table base changes in a report
Hi All,
How to view Customization Table changes and DAta table base changes in a report ,
Is it right transactions: SCU3 or RSVTPROT
Also plz let me know the concept of audit trial,
Thanks
SDHi,
Changes to master data objects must be captured for the For compliance purposes. The auditor allows you to be able to view and print an audit log of changes to master data objects for a chosen period. It is very common for external auditors to focus on what has changed from one year or quarter to the next to help determine the nature, extent, and population for testing. To configure and access your audit log, perform the actions listed with each of the following utilities.
Audit Trail is used to track the record changes.
The report RPUAUD00 gives all the changes done to the masterdata by any user anytime.
But, before using this audit trial, please ensure that the system hardware is well equipped as the audit trials activation would later become a performance issue as this would occupy a lot of space in the coming time.
Best Regards,
Venkat. -
How can i add two table into one internal table
I WANT TO ADD THIS TWO DIFFERENT TABLE INTO ONE INTERNAL TABLE PLEASE HELP.
TABLES: J_1IEXCHDR, J_1IEXCDTL.
SELECT * FROM J_1IEXCHDR WHERE STATUS = 'P'.
WRITE: / J_1IEXCHDR-LIFNR,
J_1IEXCHDR-DOCNO,
J_1IEXCHDR-EXYEAR,
J_1IEXCHDR-BUDAT.
SELECT * FROM J_1IEXCDTL WHERE TRNTYP = J_1IEXCHDR-TRNTYP
AND DOCYR = J_1IEXCHDR-DOCYR
AND DOCNO = J_1IEXCHDR-DOCNO.
WRITE: / J_1IEXCDTL-EXBAS,
J_1IEXCDTL-EXBED,
J_1IEXCDTL-RDOC1,
J_1IEXCDTL-ECS.
ENDSELECT.
ENDSELECT.
THANKS IN ADVANCED.U have to link these 2 tables like this
<b>SELECT
J_1IEXCHDR~DOCNO
FROM J_1IEXCHDR inner join J_1IEXCDTL
on J_1IEXCHDRDOCYR = J_1IEXCDTLDOCYR
WHERE STATUS = 'P'.</b>
this is sample code only, and u have to check the F.key relationship.
Regards
Prabhu -
Master data tables and Transaction data Tables
Hello Gurus,
Please let me know how to know which table belongs to master data and which table belongs to transaction data.
for FICO module.
Does any one have specific material relating to master data table and transaction data tables.
Thanks
Edited by: Manu Rathore on Jan 18, 2012 4:38 AMHi Manu,
Find attached table relation diagram by Christopher Solomon. It is one of the very comprehensive chart on this topic.
deleted
Warm regards,
Murukan Arunachalam -
SQL Developer - mapping column names for csv import
In Apex I can do a spreadsheet upload to an existing table and it asks me to map source data to existing table, and it usually has the columns correct. I don't know if it imports them in order or what(first column name in table maps to first column in csv file, etc). SQL Developer makes me choose the mappings myself - it doesn't attempt to do a mapping at all, and some of my fieldnames are exactly the same. Am I missing something? Is there a way to get SQL Developer to try to do the mapping for me?
Note: in apex and sql dev, you should use csv only... they let you choose xls, but xls fails in both products every time.So I guess SQL developer can't do this?
-
Mapping Issue with 7 source tables and one target table in one step
Hi,
Request for a small help in OWB.
I am trying to map 7 source tables to a single target table in one step.These source tables are in Oracle 10G database but dont have PK and FK relation ship.
I am able to link one table to the target by pointing some of the columns. But when coming to the second table it is giving some error message :
Ap18003: Connection target attribute group is already connected to a incompatible data source. Use a joiner or set operator to join the upstream data first before connection it to this operator.
As per the error message I used a Join operator and tried to map the second table to the target but still giving me the same error message. Could some body give me a hand to give out from this step.
Thanks for your help in advance.
Cheers,
Krishna.Hi,
like this:
Ingroup1
- id -> Number(9,0)
- name -> VARCHAR2(500)
Ingroup2
- my_id -> Number(9,0)
- name -> VARCHAR2(500)
Outgroup
- id -> point to target_table.id
- name -> point to target_table.name
Not:
Ingroup1
- id -> Number(9,0)
- name -> VARCHAR2(500)
Ingroup2
- name -> VARCHAR2(500)
- my_id -> VARCHAR2(9)
Regards
Detlef
null -
How to set column names when not using object of row data in constructer
hello i am using JTable constructer as
public JTable(int numRows,
int numColumns)
can i set column names for the columns .How?hi,
sure you can: Create a subclass of DefaultTableModel and overwrite the method public String getColumnName(int) which returns the column name of a specific column. Then use this subclass as the data model for the table.
best regards, Michael -
Issue using one 2 Fact tables with one dimension Table.
Hi,
I have 1 Dimension table X and 2 Fact tables A and B
X is joined to Both A and B for Loan Amount ( with A) and for colleatral amount (with B) when I am selecting the X.Product_Name, A.Loan_Amt, B.Collateral Amount, it is giving an error message
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table EIP Collateral FACT) does not contain mapping for [EIP Reporting FACT.PD ID]. (HY000)
Any clues???
Is there a Inner or Outer join which needs to be created or set in the RPD to get the desired results???Ok..
I have one table which is Porfolio Details which has Portfolio name, Product Category , Product Name, Product ID, Product sources code.- This is my Dimension table.
I have another 2 set of fact tables : EIP Reporting FACT and EIP Collateral FACT..
These two tables are joined to Portfolio Details table.
EIP Reprting FACT gives portfolio wise Loan Amount
and EIP Collateral FACT gives Portfolio wise Collateral Amount details for same set of customer..
Now, I am selecting Portfolio Name, Product Category, Product Name,SUM( EIP Reporting FACT.LOAN_AMOUNT), SUM(EIP Collaetral FACT.Collateral_Amt) in a report
Now, on selecting these columns I am getting that error message which is related to mapping.
If I take any column from Portfolio details table and any column from EIP Reporting FACT- It works.
If I take any column from Portfolio details table and any column from EIP Colletral FACT- It works.
But if I take any column from portfolio table and columns from both FACT tables it gives mapping error...
Hope I am able to explain the issue in a better way now..
Edited by: help-required on Mar 11, 2010 6:53 PM
Edited by: help-required on Mar 11, 2010 6:53 PM -
Left Outer Joining multiple tables to one source table FAILS with VLD-1511
Hi all,
Is it me, or is OWB unable to handle left outer joining 1 source table to multiple other tables?
I want to load a fact table so I have 1 source table with measures. This table must be outer joined to some dimensions that have their FK in the fact table.
The SQL statement would look like this (and is perfectly valid):
select ...
from input, dim1, dim2
where input.c1 = dim1.c1(+)
and input.c2 = dim2.c2(+);
I put the where clause in the joiner operator and validate, but that gives me message VLD-1511: A table may be outer joined to at most one other table.
Even splitting this up into one outer join per joiner still gives this message.
A search and look around on the forum and on metalink shows there are related issues (like bug 3334035). Seemingly creating a view is the work-around to use.....? (ie downgrading owb to a simple gui tool) }-;
Have other people experienced this problem of not being able to outer join one input table to multiple other tables?
Thanks,
EdI have had some feedback from Oracle. It turns out this has to do with 2 issues. Below I have pasted the text that Support gave me:
<---------- START QUOTE ---------->
RESEARCH
=========
Bug 3437036 KEY LOOKUP DOES NOT DETECT ORA-1417 IN VALIDATE/GENERATE STEP
Unpublished Bug 4211684 FORWARD PORT OF BUG 3437036
shows:
Some more development has been completed when this bug is fixed in Paris.
The following are the details:
1. If the join condition contains a full outer join such as
tab1.c (+) = tab2.c (+) and tab2.c (+) = tab3.c
then the new validations implemented for this bug do not apply since
in OWB, full outer join triggers generation of joins in ANSI syntax.
ANSI syntax does not have the original problem the base bug of this
bug reported.
2. If the join condition does not contain any full outer join condition,
then the join is generated in Oracle join syntax, which is subject two
several restrictions. The fix to this bug check two of the restrictions.
3. The first restriction in Oracle syntax is that the outer join operator
"(+)" can only directly be attached to a column name. If you attach it
to an expression, such as the following:
(tab1.c + 1) (+) = tab2.c
Then there will be an ORA-936 error at the time of mapping deployment.
For this case, I have added a validation message VLD-1512 to error out
this situation.
4. The second restriction in Oracle syntax is that a table can only be
outer joined to exactly one other table.
For example, this is an invalid join in Oracle syntax:
tab1.c (+) = tab2.c and tab1.d (+) = tab3.d
because tab1 is left outer joined to tab2 and tab3.
But note that the following is still valid in Oracle syntax:
tab1.c (+) = tab2.c and tab1.d = tab3.d (+)
because tab1 is left outer joined to tab2 and right outer joined to tab3.
So this latter case does not violate the restriction that "same oj" to
more than 1 table is not allowed.
If same oj to more than 1 table is specified in a join condition,
VLD-1511 will be issued, and the map is made invalid.
<---------- END QUOTE ---------->
OWB does a partial validation, ie not all access paths are (can be) checked. A full check is only done by the database itself. So some scenarios (like checking whether multiple tables are outer joined the correct way) are not checked, and in this case are flagged with an error (even though it is actually a correct scenario).
Seemingly this was not flagged with an error in earlier versions of OWB, so beware, OWB behaviour may change when upgrading...
Alternative solutions are (1) using key lookups, (2) using a view with all outer joins in there, (3) using intermediate result tables between the joins.
Hope this info helps some people prevent spending too much time on a false error message,
Ed -
NEED HELP ASAP-populate contents from 5 tables into one master table
Scenario:
Assign a new_customer_id to each existing customer of our three business. A master lookup table (M) was given to me with pre-populated (SEQ_NOs), (NEW_CUSTIDs), and NULL in (OLD_CUSTIDS). My duty is to
(1) Fill the M.OLD_CUSTID column with existing customer ids from T1, T2, T3 (uniquely).
(2) Once the master lookup table is filled, add (SEQ_NO), and (NEW_CUSTID) column to the 3 existing customer tables to hold the new information.
(3) At the end of the project, remove the existing customer ids from the T1, T2, T3.
My problem is that there are no associations between the master table and existing customer tables (no keys). The code would be:
update M
set OLD_CUSTID= (select OLD_CUSTID from T1 where M.??=T1.??)
Since the M.OLD_CUSTID and T1.NEW_CUSTID are NULL at this stage, and there are no keys to tie them together. I don't know how to fill both tables. Can someone help me ASAP? Thanks in Advance.
-ORACLE NewbiI am building a "MASTER LOOKUP TABLE" to map the NEW_CUSTID and the OLD_CUSTID. The columns in this M table are:
CREATE TABLE MKT.M
"LOOKUP_SEQ" INTEGER, <=== from sequence
"NEW_CUSTID" CHAR(6), <=== populated with strings given by biz analyst
"OLD_CUSTID" INTEGER, <=== need to dump all existing custid (unique)
PRIMARY KEY ("NEW_CUSTID") RELY NOVALIDATE
ORGANIZATION INDEX TABLESPACE "MKT"
Table T1/T2/T3 are slightly different but they all contain:
CUST_ID INTEGER
CUST_NAME CHAR(50)
CUST_SINCE DATE
CUST_ADDR1 CHAR(30)
CUST_ADDR2 CHAR(30)
DITY CHAR(30)
STATE CHAR(2), etc.
Since M is the lookup table for old-to-new customer ID mapping. There are no need to associat other than just enter the old IDs into the M table.
Thanks for helping me. Any suggestion? -
Importing 30 tables into one SQL Table (Help Required)
Dear Experts,
I am new in SQL server, actually i need to gather 30 different excel file in one sql server table and i have imported all excel file in different databases, all tables have 186 different columns and datatypes. I couldnt change data type while conversion.
Now all columns have different data type which are occupying extra space in my database.
Now the problem is that i need to convert all databases into one database or table. Although i have created a table but i dont have idea how to import all table into one table and defining datatype in new table while importing the old tables.
Please help me in this matter or if any body has skype or any other chatting id please do let me know so that i may explain it better.
Thanking you in advance.
Best Regards,
SQL_beginnerThere are several things you can try. If you have SSIS, take a look at this.
http://www.singhvikash.in/2013/06/ssis-how-to-load-multiple-excel-files.html
https://www.simple-talk.com/sql/ssis/importing-excel-data-into-sql-server-via-ssis-questions-you-were-too-shy-to-ask/
Also, if your files have virtually the same name, like files with dates in the name, you can loop through files in your folder, and increment the loop with each run through.
DECLARE @intFlag
INT
SET @intFlag
= 1
WHILE (@intFlag
<=30)
BEGIN
PRINT @intFlag
declare @fullpath1
varchar(1000)
select @fullpath1
= '''\\path to your files\'
+ convert(varchar,
getdate()- @intFlag
, 112)
+ '_your-text-file-name.txt'''
declare @cmd1
nvarchar(1000)
select @cmd1
= 'bulk insert [dbo].[your-table-name] from '
+ @fullpath1 +
' with (FIELDTERMINATOR = ''\t'', FIRSTROW = 2, ROWTERMINATOR=''0x0a'')'
exec (@cmd1)
SET @intFlag
= @intFlag + 1
END
GO
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it. -
Merge or Union Multiple Tables to one big table
Hi All,
I am new to SQL and learning great. I have a use to merge multiple tables. Every table has different kind of data but BP ID is same in every table (but some table have more BP IDs and some are less). The below is sample…
Table A
BPID - Cost – Profit
0001 – 10 -4
0002 -11 - 3
Table B
BPID - Name – Address
0003 – John - Dallas
0002 –Mark - Huston
Table C
BPID – Zip code – State
0004- 74001 – TX
0002-75008 – TX
Output (after merging in Table A+B+C) would be like this…
BPID – Cost – Profit – Name – Address- Zip Code – State
0001 -10- 4 - NULL -- NULL – NULL – NULL
0002 – 11 – 3 - Mark - Huston ---75008 – TX
0003 – NULL – NULL – John – Dallas – NULL – NULL
0004 – NULL – NULL – NULL – NULL – 75008 – TX
Thanks for your help in this.I am including you a full example:
create table TableA (BPID VARCHAR(4), Cost INT, Profit INT)
create table TableB (BPID VARCHAR(4), Name VARCHAR(MAX), Address VARCHAR(MAX))
create table TableC (BPID VARCHAR(4), ZipCode VARCHAR(5), State VARCHAR(2))
INSERT INTO TableA VALUES('0001',10,4),('0002',11,3)
INSERT INTO TableB VALUES('0003','John','Dallas'),('0002','Mark','Huston')
INSERT INTO TableC VALUES('0004','74001','TX'),('0002','75008','TX')
SELECT ISNULL(ISNULL(TableA.BPID, TableB.BPID), TableC.BPID) AS BPID,
TableA.Cost, TableA.Profit, TableB.Name, TableB.Address, TableC.ZipCode, TableC.State FROM TableA
FULL OUTER JOIN TableB ON (TableA.BPID = TableB.BPID)
FULL OUTER JOIN TableC ON (TableB.BPID = TableC.BPID)
And the results: -
How to configure GG to merge two source tables into one destination table?
I have two tables at source (say S1 & S2), I want to merge these tables and replicate to a single target table (Say T1).
Does GG support this type of replication? If so, could any one let me know how to configure Table and Map parameters?
Thanks in advance.It is possible. In the extract capture both the tables.
Extract parameter
table s1;
table s2;
Replicat parameter
map s1, target t1, keycols (...);
map s2, target t1, keycols (...) -
I18n: text label of Table Header of Data Table Component
hi all
JSC Hangs when i try to change text label of Table Header (Column) of Data Table Component to my favorite language for example Arabic or Persian Language.
is this bug!!!Hi,
Please take a look at the tutorial Internationalization at
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
may help you
regards
Maybe you are looking for
-
I have Photoshop Elements 12 for both PC and Mac (I use both). I have a new camera, Nikon D810. I downloaded the latest version of Camera Raw, 8.8. My D810 is listed as a supported camera model. However, when I try to open a raw photo in Photoshop El
-
MSI GT60 2PC Dominator-- Loads of problems trying to install Win8 onto SSD
Hi guys, I really, really hope someone can help me! I recently purchased GT60 2PC Dominator-626 which is awesome. However, it doesn't come with an SSD so I've got a Crucial M500 which I've installed. I'm trying to move over my Win8 install to this dr
-
Hi! Gurus.. I have a few questions reg. shipment Does standard SAP allow us to create an individual shipment document for deliveries that has more than 1 forwarding agent, ie, we wud like to pay more than 1 agent but the shipping types [like air, wat
-
How do I top up my Azure pay-as-you-go?
My free trial expired and I added a pay-as-you-go subscription to my account. I can't figure out how to top it up by, for example, 10€. Alternatively, I would like to just pay whatever it costs to start the VM I have, grab a file on it and then shut
-
Importing mp3 files to Library
Hi, I purchased and downloaded an mp3 file from Amazon and then tried to use Flash to import it to the library. However, Flash displayed a dialog box that said "one or more files could not be imported to the library because there were problems readin