Database support

Using different relational databases

SafetyCulture Exporter supports exporting data to MySQL, PostgreSQL, and SQL Server databases. Depending on the system and database you use, you may need to complete additional configurations before exporting. Alternatively, you can also run exports by supplying the database dialect and connection string flags in the command line.

For example (if you're using these examples to fill out your YAML config file, you only need the part after --db-connection-string):

  • MySQL: ./safetyculture-exporter sql --db-dialect mysql --db-connection-string user:[email protected](
    Refer to the Data Source Name for the connection string’s supported formats.
  • PostgreSQL: ./safetyculture-exporter sql --db-dialect postgres --db-connection-string postgresql://user:[email protected]:5434/dbname
  • SQL Server: ./safetyculture-exporter sql --db-dialect sqlserver --db-connection-string sqlserver://user:[email protected]:1433?database=dbname
    Refer to the Connection Parameters and DSN for the connection string’s supported formats.