Example 2: Component table querying multiple CSV files

Previous Next

This is a variation on Example 1. Instead of querying a CSV file identified by a hard-coded filepath, a column is added to the component table. This allows the user, at query time, to identify the CSV file to be queried.


Here is an input file called C:\Temp\schedtour.csv that demonstrates the data format expected by the example component:

146,AUSTRALIA,ISLAND SUNTANNER,21-3-2020 11:59:01,1-4-2020 11:59:01,2500

145,AUSTRALIA,ISLAND SUNTANNER,20-11-2019 11:59:01,1-12-2019 11:59:01,2500

144,BRAZIL,RAINFOREST RIDE,16-10-2021 11:59:01,29-10-2021 11:59:01,3000

143,BRAZIL,RAINFOREST RIDE,15-9-2021 11:59:01,28-9-2021 11:59:01,3000

142,BRAZIL,RAINFOREST RIDE,15-8-2021 11:59:01,28-8-2021 11:59:01,5500



collapseStep 1: .NET component for retrieving data from multiple CSV files
collapseStep 2: Query protocol association
collapseStep 3: Testing the query protocol
collapseStep 4: Component table
collapseStep 5: Query Mandatory
collapseStep 6: Testing the solution



See also

Example 1: Component table querying a CSV file

Query protocol, component table