how to do aggregation (year wise quantity ) using only
source qualifier, the source is sql server date as datetime
data type and
target as flat file with year (string datatype)



how to do aggregation (year wise quantity ) using only source qualifier, the source is sql server..

Answer / Ravi Kishor

To perform year-wise aggregation from a SQL Server database to a flat file using only the source qualifier and the target as a string datatype, you can use the following steps:

1. Write a SQL query that groups data by year and calculates the sum of your desired quantity (e.g., sales amount):
```sql
SELECT YEAR(yourDateTimeColumn) AS Year, SUM(yourQuantityColumn) AS TotalQuantity
FROM YourTable
GROUP BY YEAR(yourDateTimeColumn);
```
2. Save this query result to a temporary table or save it as a CSV file (using the SQL SERVER OPENROWSET function or BCP utility).
3. Read the data from the temporary table or the saved CSV file and write it to the flat file, making sure to replace the year column with a string format.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ETL Interview Questions

how do u really know that paging to disk is happening while u are using a lookup transform?

1 Answers  


Which transformation we use to convert 'NA' to 'Not Available'

1 Answers  


what is a parameter when and where do u them when does the value will be created. Designing time, run time. If u don't create parameter what will happen?

1 Answers  


what are the reports created in mm and sd side using sap bw in a project? name some of them and explain the requirement?

1 Answers   Accenture,


Difference between flat files and relational sources?

2 Answers  


my name is amar i want display 1st line A 2nd line M 3rd line A 4th line R in database & informatica

1 Answers   HCL,


Explain different types of partitioning?

1 Answers  


What is meant by incremental load?

1 Answers  


What are the different ways to deploy the code in informatica?

1 Answers   IBM, Saama Tech, Wipro,


can u anyone plz share some etl testing interview question . and share the sql queries and unix . plz help me to clear in the etl testing interview by sharing ur knowledge

1 Answers   Cap Gemini,


give detail on the sales project how many number of dimensions & fact tables are used in projec briefly. how the four fact tables taken in the project.

1 Answers   HCL,


What is the difference between Data Warehousing and Data Mining?

1 Answers  


Categories