Web CSV Search Methods

Scarpozzi

Lifer
Jun 13, 2000
26,389
1,778
126
I'd like to setup a web page either through SharePoint or a local Linux server that can search a CSV file with about 30,000 rows.

Basically the file contains 2 columns of values. I need to search on one column to return the other value on the matching row. Simple, right?

What's the best way to make it happen without hitting java or security issues in the future?
 

Fallen Kell

Diamond Member
Oct 9, 1999
6,045
432
126
I guess it depends on what you are attempting to accomplish. Are you performing multiple searches over the same CSV, different discrete searches on multiple CSVs, searching for partial results/patterns on a CSV, and/or expecting to return multiple matches? Will multiple people be searching different things on the same file at the same time, or would they be searching on their own separate files for different items? Do you want the computational burden for the search to occur on the end user's device/PC, or will the server be handling it?

Is there a reason it needs to be through a web interface, as that alone will be the root cause of security issues now and in the future....
 
Last edited:

Scarpozzi

Lifer
Jun 13, 2000
26,389
1,778
126
I guess it depends on what you are attempting to accomplish. Are you performing multiple searches over the same CSV, different discrete searches on multiple CSVs, searching for partial results/patterns on a CSV, and/or expecting to return multiple matches? Will multiple people be searching different things on the same file at the same time, or would they be searching on their own separate files for different items? Do you want the computational burden for the search to occur on the end user's device/PC, or will the server be handling it?

Is there a reason it needs to be through a web interface, as that alone will be the root cause of security issues now and in the f
Maybe 1000 people might use the search tool....but it may be pretty sparse on usage, realistically. It's to lookup financial chart values compared to a 5 or 6 digit shortcut value on a legacy system. The data will mostly be static with potential for me to update the dataset by replacing the CSV file. The search results will be a 1 to 1.

I don't know how much processing power it will take or what kind of load it would be if more than one person searches at a time. 30,000 records may be a very high number since many of the shortcut values may be inactive and not required...I just counted rows in the table to get that estimate without validating the status. I could always have it loaded in a SQL server and go that route with php. I was just trying to keep it simple if someone has a way to do it.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,255
3,852
75
This sounds like a job for vlookup in Google Sheets.

You really want it in Sharepoint? That might work too.

What do you mean by "security issues"? Are there security considerations around this data? Like data should only be output for a matching input? If so you'd likely need more security measures to prevent somebody brute-forcing the inputs.
 

Scarpozzi

Lifer
Jun 13, 2000
26,389
1,778
126
This sounds like a job for vlookup in Google Sheets.

You really want it in Sharepoint? That might work too.

What do you mean by "security issues"? Are there security considerations around this data? Like data should only be output for a matching input? If so you'd likely need more security measures to prevent somebody brute-forcing the inputs.
I was trying to keep it all on the webpage without showing what's behind the search bar. Security was just a thought because it was reading a flat file and I'd prefer the data source be masked. SQL and php may be the way to go...I just don't have a SQL server for this, so it would take asking favors. (Which would take longer to get it running)
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,255
3,852
75
SQL and php may be the way to go...I just don't have a SQL server for this, so it would take asking favors. (Which would take longer to get it running)
SQL Server is overkill for this. SQLite (in which PHP would read from a file with no dedicated DB server) seems like overkill for this.

Assuming an uncomplicated CSV file, I feel like a CGI Bash script running grep would do nicely. But perhaps PHP is safer.
 
Reactions: igor_kavinski
Jul 27, 2020
16,652
10,660
106

I modified the code to return just the email address for the fella named Knox:

Code:
// Iterate over the parsed rows and collect the value from the "Email address" row
for (let row of parseResult.data) {
    if(row["Last name"] == "Knox")
        output.push(row["Email address"]);
}

And it works!

 
Reactions: Ken g6
Jul 27, 2020
16,652
10,660
106
I was trying to keep it all on the webpage without showing what's behind the search bar.
You could modify the above code to run the entire thing from a web page without any PHP or DB requirements. The only consideration would be to prevent the web server from letting the users download the local CSV file if they try to be smart and point the URL towards the CSV file.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |