Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
k526
Contributor
Contributor

how to use unload component in talend?

Hi,

am using redshift.i used select query in unload component in talend.

 it was working in redshift but in talend its not working .I was getting an error 

 

unterminated quoted string at or near "'

My query:

 select campaignid,code,' 'as campainmember,' ' as lead,''sun'' as leadname from ms_is.bystyn.

 

 is there any one to unload the file with header?

can anyone help me ?

 

Thank you

Labels (3)
10 Replies
Anonymous
Not applicable

Hello,

Are you using talend component tRedshiftUnload? Screenshots of your component setting will be preferred.

Can you successfully unload your file without header in talend?

Best regards

Sabrina

 

k526
Contributor
Contributor
Author

Hi Sabrina,
am using talend (tredshiftunload)component.but i am getting some errors. (')single quotes is not working in talend.so, is there any other way to unload the table in s3 path.
kindly provide any solution ? and thanks For the reply.please find the screenshots.
Thank you


unlaod.PNG
unlaod1.PNG
Anonymous
Not applicable

Hello,

Have you tried to use sql query like:

select campaignid,code, as campainmember, as leadsun, as leadname from ms_is.bystyn without (')single quotes to see if it works?

Which is talend build version you are using?

Best regards

Sabrina

cterenzi
Specialist
Specialist

It would be helpful to see the entire query string just to make sure there's nothing off at the end of the string.

I don't know if it makes a difference, but there is no space between '' and "as campainmember"

Side note: You appear to be using a context variable in the tablename setting. It doesn't usually make a difference in database input components if that setting is correct, but you don't want quotes around context variables.
Anonymous
Not applicable

hi ,

 

I am facing the single quotes issue in where clause as in attachment.

 

please help me out0683p000009M437.png0683p000009M43H.png

Anonymous
Not applicable

Hello @harshadathorat ,

Could you please check your "Code" tab in your job to see if there will be your compile error highlighted in red line?

Best regards

Sabrina

Rahul_V
Contributor
Contributor

Is there still a way to get headers in the delimited file using "tredshiftunload" component ??

Anonymous
Not applicable

Hello,

So far, we won't do this new feature and we are relying on Amazon for this feature request.
A workaround exists by leveraging custom SQL with Union in order to add the header.

Let us know if it is OK with you.

Best regards

Sabrina

 

Rahul_V
Contributor
Contributor

Hi Sabrina,

 

Thank you for your reply. But looking at amazon unload command it has an option to enable the headers. Please refer to this link . Can we also get an option to enable the headers in the tredshiftunload component ? The header option which amazon provides it writes the header into all the files which are split. In case of Union it will write the header only to first page/file only. 

As my requirement is to have the headers in all the files. Please let me know how can we achieve this as each file is having a size of 6.2 GB ?

 

Regards,
Rahul