Adding column to connected database schema

Five Stars

Adding column to connected database schema

Hi all,

How do I alter column in talend? I am using postgresql. I have dragged and drop the schema "table1" at the job design. The table1 is currently connected to a tMap.

From the schema of table1, I can see the default query: "Select .... From ....

I tried adding this line at the bottom so that I can add a ID column to the schema:
ALTER TABLE table1 ADD id integer


But I got an error message:

Detail Message: id cannot be resolved to a type



Please help

Moderator

Re: Adding column to connected database schema

Hi,
Here is a TalendHelpCenter:tPostgresqlRow which executes the SQL query stated onto the specified database.You can add your Alter statement in this component.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: Adding column to connected database schema

@xdshi hello. I have read through the guide but I am still not sure how to add the alter table into the query.
I would like to know what is wrong with what I have done.
Moderator

Re: Adding column to connected database schema

Hi,
Screenshots of your component setting will be helpful for us to address your issue.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog