You can translate the question and the replies:

Data Sources - Combining Multiple Flat Files

A Data Source pushes data in CSV format into a Local machine. EveryMonth a Folder is generated with the file set. Each folder has aroun 150 files. Example Folder Name : DS_Jan17 Files : Account, customer, Products etc Folder Name : DS_Feb17 Files : Account, customer, Products etc Folder Name : DS_Mar17 Files : Account, customer, Products etc Folder Name : DS_Mar17 Files : Account, customer, Org etc Few files may not be available for a month, As you see Products missing in the above example. Please let us know what is the best way to create a Views( Base/Derived) with combining data from files accorss the months. The above mentioned senario repeats for various sources, please let us know how we can quickly create a first version of base views.

1 Answer

Hi, In order to create a view that combines the data of multiple files from the different folder, I would do the following steps: 1. Create a new data source of "Delimited file" by providing the file path with an interpolation variable (e.g. c\users\@Foldername) and file name pattern as "(.*)\.csv". 1. Then, create a base view by providing the sample folder name as value for the interpolation variable. 1. Additionally, create a new excel file with a column having a data as folder names which contain multiple flat files. Then, create an "Excel" data source and base view on top of that excel file. 1. Create a derived view by joining the base views created above with the following join condition: <Interpolation_variable> = <folder_name_column>. 1. Finally, execute the newly created derived view which returns the desired output. For more information, you can have a look at the section [Delimited File Sources]( https://community.denodo.com/docs/html/browse/6.0/vdp/administration/creating_views/importing_data_sources_and_creating_base_views/delimited_file_sources ) and [Interpolation Variables](https://community.denodo.com/docs/html/browse/6.0/vdp/administration/creating_views/importing_data_sources_and_creating_base_views/path_types_in_virtual_dataport#paths-and-other-values-with-interpolation-variables) of Virtual Dataport Administration Guide. Hope this helps!!
Denodo Team
28-11-2017 06:46:05 -0500
You must sign in to add an answer. If you do not have an account, you can register here