Join Sheeri Cabral for an in-depth discussion in this video Connecting to a CSV file, part of Understanding MariaDB for MySQL Users.
- View Offline
…The CONNECT Storage Engine does more than just connect remotely to MySQL databases.…It can also connect to a CSV file.…Let's use the birthday.csv file in the exercises.…If you want, you can add in your own birthday.…Make sure that the file is at least readable by the MySQL user.…So we do that on Unix with ls -l, to list out options.…If you want MariaDB to be able to update the file make sure…the file is writeable by the MySQL user.…
To put this into a table, let's log into our MariaDB database.…And we're going to use the database connect.…And I'm going to do a Ctrl+L to clear the screen.…To put this into a table,…we can use the CONNECT Storage Engine with a table type of CSV.…Let's create the birthdays table.…CREATE TABLE birthdays.…We can give it any name we want.…And let's give it a parameter of first varchar 32 not null.…A last name, also varchar 32 not null.…
And then a birthday, which for now let's call it a varchar 15 not null.…The Storage Engine is going to be CONNECT, and the table type is CSV.…The connection information in this case is the file name,…
- Why use dynamic columns?
- Creating, updating, and querying dynamic columns
- Installing the CONNECT storage engine
- Connecting to remote data
- Connecting to CSV, INI, and XML files
- Using PIVOT tables
- Accessing database metadata
- Working with the Cassandra storage engine