Inspire EMEA 2022 On-Demand is live! Watch now, and be sure to save the date for Inspire 2023 in Las Vegas next May.
Announcement | We'll be doing maintenance between 2-3 hours, which may impact your experience. Thanks for your patience as we work on improving the community!

Bengaluru, IN

Welcome to the Bengaluru User Group

Click in the JOIN GROUP button in Home to follow our news and attend our events!


How to Configure the Input tool to Import the data from .flat file

8 - Asteroid


Hi all,


I have a text file with the extension '.flat'.  I tried multiple ways in configuring the Input tool. But, no luck. All the time, I'm getting an error as the  "Missing root element 'flatfile' "


I'm unable to attach the  .flat file here as it is not allowing me to attach. Can anyone please help in configuring the Input toool to import the data from .flat file. 





Awaiting your responses.


Thank you.



Sreenivasa Teja.


22 - Nova
22 - Nova

Hi @stj1120,


I am new to .flat file too.

But i didnt want to shy away from exploring it and trying to help.


Hence i did some research on it. I was able to find out alteryx input tool has a connection for .flat file.

Was able to see you are using the same.

I did some experimentation, was able to find out that .flat file gives headers and .asc file packages with it gives the data. And both files are required to handle .flat file.


FYI there are like no sample .flat available on the internet. Hence my experimentation were limited.


I tried few things.

was able to read the sample .flat provided by alteryx

was able to read a csv and output it to a .flat

was able to read the outputted .flat file


I used default configuration to read the file.



Hence i would suggest you to check whether you have a the .asc file with. If it is there. You might want to give it a shot by renaming the files. If both dont work.

Please share the files over drive link. Or else there will be very limited ways on how people can help. 


PS: in between if you already found the solution please share it with us.

Looking forward to hear from you.


Thank you for sharing this scenario. It was a great learning.

Happy Analyzing : )

22 - Nova
22 - Nova

Hi @stj1120,


I was able to recreate the error.



The expected .flat file format.



You get error when it doesnt start with a <flatfile version="1"> which is the root element of XML file. Like below.



Hence you might want to check the .flat file for the structure. Should start with <flatfile version="1">.

Below is a simulation snapshot of both scenarios.




Hope that solves your problem.


If not please share your files over zip or drive so that we can better help you.


Thank you for sharing this scenario. It was a great learning.

Happy Analyzing : )

8 - Asteroid

Hi @atcodedog05 


Thank you for your response.


But, I have the unstructured data in the .flat file like below and there is no any xml structure for this.




I don't know how to resolve this. I have attached the  .flat file in the zip file.  Kindly provide me the solution.


Awaiting your response.


Thank you.



22 - Nova
22 - Nova

Hi @stj1120 ,


The file which you are using doesn't qualify to be a .flat file. Hence Alteryx cannot directly read with .flat extension.


But the file can be read and parsed by treating as a .txt file. Rename the file extension to .txt from .flat



Browse for the file and read it with below configuration.



The file will be read like below.



Use the below workflow to parse the data.


The parsed output data looks like this.



Please let me know if this is the desired output.


I hope this helps your purpose. If there is still anything specific you are looking for please reply back.

And i am sorry that your file cant be read directly as a .flat file.


PS: really appreciate that you were able to provide the file or else it would have been harder to provide solution.


Thank you for sharing this scenario. It was a great exposure.

Happy Analyzing : )