You can translate the question and the replies:

multiple files Data Source with different columns

Dear Community, I have a case where multiple files represent a data source. On each file, the columns that I'm interested for my base view are present, but the files do not have the same column order. Because of this and selecting to ignore errors, will result that those files having different number of columns will not be parsed by Denodo, resulting on missing data. Again, I'm not interested to get the columns that are different only the columns that I know exist on all the files on that folder. Is there a way to specify which columns are to be selected on the derived view or any other way to avoid Denodo to stop the files which have different number of columns? Thanks and regards, Sérgio
user
09-10-2018 06:14:17 -0400

1 Answer

Hi, If you are creating a delimited file data source with the Data Route pointing to a directory, the data in all the files must have the same schema. In this scenario, I would do the following: * Separate files with a different schema (i.e. the ones with more columns) into a different directory. * Create data sources for each directory, and create the base views for each data source * Create a UNION derived view over the base views and selecting the columns you wish to use. You can refer to the [Delimited File Sources](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/delimited_file_sources/delimited_file_sources#) and [Creating Union Views](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_derived_views/creating_union_views/creating_union_views) section of the Virtual DataPort Administration Guide for more information. Hope this helps!
Denodo Team
11-10-2018 02:50:24 -0400
You must sign in to add an answer. If you do not have an account, you can register here