Skip to main content

Would you please kindly explain in detail how to use the "Database: Connect" action to access a .csv file on the runner's desktop?

 

I have read through this prior APeople question, but the actual connection string syntax is not explained.

 

Questions I have include:

  • Do I have to install additional software on the runner in order to access a .csv like a database? I would like to avoid adding more software onto the runner.
  • Are there a variety of connection string formats I could use?
  • Is one preferable over the other?
  • What does each part of the connection string mean? How can I apply this to my specific case (I have a desktop path to a .csv - I need to connect to it)

 

I already have extensive knowledge of SQL and am very comfortable performing SELECT statements on data, but I am a complete novice at actually establishing the connection.

 

We are using Windows 10 and, as far as I know, we just have the basic standard drivers installed.

 

Thanks!

Hi @Logan Price​ ,

 

I've done some research on this topic and complied whatever I've learned so far into an article which you can find here.

 

I'll try to answer most of the questions you've posed so far:

->The connection string has to contain the FolderPath, and not the filepath. Also, the names of the tables will be the file name.

Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$sFolderPath$; Extended Properties = "text";

->No, you don't have to install any additional software

->Yes, there is a variety of connection strings you can make use of which you can find here

->I don't think there is any performance advantage of using one over the other - none that I have seen so far

->You can read about the various components here

 

I've also written about joins using Excel/CSV which you can read if you are interested.

 

Kind Regards,

Ashwin A.K


Thanks! This worked without issue for me!


Hi, I am not able to connect CSV File as a Database.
please help me with the steps….


Hi @Anurag10 

Checkout below resource from Ashwin

https://thecodingtheory.com/2021/10/25/aa-database-operations-with-excel/


Reply