question

PavanKumarChakilam-4986 avatar image
0 Votes"
PavanKumarChakilam-4986 asked KranthiPakala-MSFT edited

ADF: generate fixed length file out of ADF pipe line

we have a pipeline which needs to create fixed length output file without any delimiter from ADF pipeline.
is this possible in ADF?198265-fixedlengthfile.jpg


azure-data-factory
fixedlengthfile.jpg (23.4 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @PavanKumarChakilam-4986,

Welcome to the Microsoft Q&A platform and thanks for your query.

I don't think it is possible in ADF pipeline, but you may try achieving this using Mapping Data flow in ADF. Just wanted to check if you have got a chance to go through this tutorial and see if you can take similar approach with data flow to meet your requirement - Process fixed-length text files by using Data Factory mapping data flows

Hope this info helps.

Thanks


0 Votes 0 ·

the given url is to process the fixed length file and generating the output with comma separated. but i need without comma separated file.

0 Votes 0 ·

1 Answer

PavanKumarChakilam-4986 avatar image
1 Vote"
PavanKumarChakilam-4986 answered

we have achieved this fixed length by querying the data with left and spaces functions like below

SELECT (
left(isnull(CONCAT(A.FIRST_NAME,' ',A.LAST_NAME), space(20)) + space(20), 20)
+ left(isnull(A.ADDRESS_LINE_1, space(11)) + space(11), 11)
+ left(isnull(A.ADDRESS_LINE_2, space(11)) + space(11), 11)
+ left(isnull(A.ADDRESS_CITY, space(31)) + space(31), 31)
+ left(isnull(A.ADDRESS_STATE, space(2)) + space(2), 2)
+ SPACE(1)
) as output
FROM emp

this is working fine as per requirement.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.