Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Copy selected columns from source table to destination table

Hi,
I am playing around with TOS DI and finding my feet a little, it seems like a really good product.
What I am trying to do is copy all the columns apart from the identity column from one table to a renamed copy of the exact table in MS SQL Server.
In TOS my job I have a tMSSqlInput that is correctly configured to the DB and SQL query is good. This is connected to a tMap which in turn is connected to a tMSSqlOutput which is pointing at the destination table. What I am finding confusing is when I double click my tMap object to go into Map Editor there are no columns on either side, I was expecting as I had declared a source and destination table I would see these columns in there.
Obviously I have got my wires crossed. Can anyone point out where I am going wrong please.
Thanks
Labels (2)
13 Replies
janhess
Creator II
Creator II

Have you joined up the components?
Anonymous
Not applicable
Author

Yes they are joined, I should have said so though.
janhess
Creator II
Creator II

What version? When you join the dbinput to the map it should take it's schema, same for the output.
Can you post an image of the job.
Anonymous
Not applicable
Author

Trying again
0683p000009MEP2.jpg
janhess
Creator II
Creator II

Looks ok. Have you checked that the input and output actually have schemas?
Anonymous
Not applicable
Author

Hi,
When you set up your DB connection, you should define the related schema and then use a "Main" row to link tMssqlinput and tMap.
Please see the related reference: Setting up a DB connection.
In addition, I have seen there is a error icon in your tMap(Maybe it is caused by missing schema)we usually open the code tab and see if there has compile error, then, close the job and open it again, the x-mark appears. If the job has compile error, you are always required to fix the error before executing the job.
Best regards
Sabrina
0683p000009MEMT.png
Anonymous
Not applicable
Author

I just deleted all of the objects and re added them and the mappings work now. Not a clue what the issue was but it will be "me" related I think.
Anonymous
Not applicable
Author

Hi,
Thanks for your feedback. Perhaps sometimes components are failure, you should try a few more. Delete it in designer and drag a new one into it or restart your studio to see if this issue repro again.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
Many thank you to you and the others for helping me with this.
Can I ask is it possible to change the default insert in this job?
Looking at the java code at the moment it is something like:
INSERT INTO tblCampainTest
(
,
,
,
,
,
,
,

)
VALUES
(
?,
?,
?,
?,
?,
?,
?,
?
)
However this column id is an identity so it should just be:
INSERT INTO tblCampainTest
(
,
,
,
,
,
,

)
VALUES
(
?,
?,
?,
?,
?,
?,
?
)
I would think I could just go in and edit the generated java code but is there a more preferred way?
If I need to start a new post for this it is not a problem.
Thanks again, Dave.