We have to deliver a rather complex csv structure and we would like to use Data factory for this. The structure has multiple levels with a global header and trailer+ a subheader (per topic) and it's detail lines. The first column defines which type of line it is. I've simplified the real format just to highlight the questions I have.
HEADER - common data like export date and number sequence SUBHEADER - topic name 1 DETAIL - detail line of above topic DETAIL - detail line of above topic DETAIL - detail line of above topic SUBHEADER - topic name 2 DETAIL - detail line of above topic DETAIL - detail line of above topic DETAIL - detail line of above topic TRAILER - A closing line with total linecount
The source data would be the detail lines + the topic name.
There are 2 problems I'm unable to solve:
All suggestions are welcome...
Regards, Sven Peeters
You have a couple of choices with Azure Data Factory:
I would be tempted to use SQL to do this, particularly if you already have some in your infrastructure. A simplified example:
;WITH cte AS (
SELECT 10 sortOrder, 'someHeader' main
UNION ALL
SELECT 20, 'col1, col2, col3'
--FROM someTable
UNION ALL
SELECT 30, 'someFooter'
)
SELECT main
FROM cte
ORDER BY sortOrder;
If you've got time, why not try both approaches as a proof-of-concept, see which works best for you, your data and your organisation. Look at factors such at time to develop, maintainability, how flexible, cost etc
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.