Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to read multiple csv file and consolidate using Python tool and Python script

alt_tush
9 - Comet

Hi,

 

I have multiple csv files in one folder and i want to read all csv files from that folder and consolidated data i want to save into .yxdb. But i want to do this process using Python tool and script instead of using Input Tool or Dynamic input.

 

Please let me know if it is possible using python tool if yes can you please share the sample workflow for the same.

 

Your help is highly appreciated.

 

Thank you!

1 REPLY 1
Peachyco
11 - Bolide

I have a workflow that uses a Python tool to fetch data from outside and bring it into the workflow so I know your concept can work - with the right Python code.

 

Untitled.png

 

That is the core of your issue: the Python code itself. Since Alteryx won't be loading the files via the Input Data tool, you'll only be passing the file/directory path to your Python tool. Your Python code will have to work with that path, read the CSV files, and then output the dataset.

 

You might have to go to a Python developer or forum for more information on code that can do that.

Labels