How do I avoid a Azure write job adding blank rows? - datastage

I read a .csv file from Azure storage and write it back into Azure storage as a .csv without any changes.
Input file:
Name, State, Bank
Jon, TX, WFC
Bob, CA, JPC
Jim, NY, BAC
Output file:
Name , State, Bank
Jon , TX , WFC
Bob , CA , JPC
Jim , NY , BAC
How should I avoid the blank rows added to the output file?

Had to chose the CSV file format instead of delimited

Related

To read dynamic column changes from source table

I am using Talend free version
I have below requirement:
My source is MS ACCESS; table SRC_CUST.
SRC_CUST
CUST_ID CUST_NAME
101 ABC
102 LMN
My target is .csv file TGT_CUST
Requirement: I am using tAccessInput component for MS Access table and I want to load that table into .csv file. My columns are varying day to day on daily basis.
Day 1: SRC_CUST has 2 columns CUST_ID and CUST_NAME so I need to load as it is into .csv file
Day 2: SRC_CUST has 3 columns CUST_ID, CUST_NAME, CUST_ADD so on day 2 I need to load these 3 columns without changing any code, means, I need to achieve column change dynamically .
Note: I am using Talend free version so I neither use any dynamic component nor dynamic data type. I cannot even add columns in "Edit schema" under basic settings of tAccessInput component because my columns are varying.
Please help me for same.
Thanks,
Vaishali Shinde

Talend filter from two input files

I have two data files (delimited files) :
- The first one contain 3 columns, ID, num_phone, trafic_etl : the sim card may be 3g, 4g or whatever.
- the second one contain 1 column num_phone_4g : the sim card has to be 4g.
The thing is, I want to fill a oracle table, with numbers with 4g sim card (second file), that has 0 trafic_etl in total, knowing that the first file may have more than one row for same num_phone.
I did do this with sql statement by storing files in tables.
But what I have to do, is using talend for and I am new to this tool.
Thanks in advance.
Images of the two files : File2
File1
Here's a solution using this sample data.
*File 1*
num_phone;trafic_etl;annee;mois;jour
123456;111111;2018;Juillet;20
123457;222222;2018;Juillet;20
123458;0;2018;Juillet;20
123456;333333;2018;Juillet;20
123457;444444;2018;Juillet;20
123458;0;2018;Juillet;20
*File 2*
num_phone_4g
123456
123457
123458
123459
The expected output is 123458 (because it has a total of 0 trafic) and 123459 (because it's not present in file 1; I don't know if this is possible in your use case).
I aggregate the data of file2 by phone number to get the total trafic for each phone number (assuming the date is not important). Then I use this aggregated data as a lookup to file2. In tMap_1, there is a join between the 2 flows on the phone number, and I only output the rows from file2 where the total trafic is null or zero.
Let me know if my assumptions are correct. If they are not, I will update my answer.

Send an Email from unix with multiple files row count and size

I'm new to Unix environment, I have a requirement where i have to send an email to the users with 3 files row count, size and date among multiple files in the directory. Files will be generated every month so every month mail has to be sent after files generation.
here is the example,
target directoy : /work/directory
List of files under the directory:
month_f1.txt
month_f2.txt
month_f3.txt
old_month_f1.txt
old_month_f2.txt
Email should be:
Hi All,
PFB file details.
filename rowcount size
month_f1.txt 100 20567
month_f2.txt 200 40567
month_f3.txt 300 60567
Thanks in advance!!
~Sri

Extract email from excel spreadsheet

Excel spreadsheet image
I would like to extract the email addresses from this spreadsheet and put them in a separate column that corresponds to the Senator's name.
Thanks.
in E1 put
=IFERROR(TRIM(RIGHT(SUBSTITUTE(LEFT(D1,FIND(" ",D1&" ",FIND("#",A2))-1)," ",REPT(" ",LEN(D1))),LEN(D1))),0)

Multiple PDF export with single JRXML

I am using iReport for designing the JRXML and JasperReports Server for report scheduling.
I have developed the simple single JRXML in iReport with SQL query that execute query and get the record and generate single pdf.
Now i have different type of records like :
DEPT NAME Salary
---------------------------
HR MR XYZ 500000
MFG MR PQR 300000
HR MR ABC 400000
EDU MR DEF 350000
EDU MR SSS 400000
Now my requirement is to generate individual pdf for each department. Means one pdf contain only HR related data other must contain only EDU related data etc.
How can do it with iReport and JasperReports Server?
You can parametrize your query. If I understand correctly, and choosing department is a matter of simple WHERE clause you can add to the query:
WHERE dept like $P{DEPT_PARAM}
And pass that parameter from jasperserver as needed ("%" for when you need to print for all the departments)