dbt schema.yml Generator from CSV, JSON or Parquet

Generate a dbt schema.yml with columns, data types and unique / not_null tests from a CSV, JSON or Parquet file. Free, in your browser.

Quick answer: Generate CREATE TABLE and INSERT statements from sample data.

Related: SQL INSERT Generator from CSV, JSON, Excel or Parquet · CSV to Snowflake CREATE TABLE Generator · CSV to BigQuery Schema and CREATE TABLE Generator · CSV to Databricks Delta DDL Generator · Parquet Guides and Free Parquet Tools

How to use the dbt schema.yml Generator from CSV, JSON or Parquet

Generate CREATE TABLE and INSERT statements from sample data.

The SQL Generator turns a CSV, JSON, Excel or Parquet file into CREATE TABLE and INSERT statements for PostgreSQL, MySQL, SQL Server, Oracle or SQLite. It guesses a type for each column, lets you edit names, types, lengths and keys, and writes scripts you can run right away. It is useful for loading spreadsheets into a database and for building test fixtures.

  1. Load sample data
  2. Review the column types
  3. Pick a database and copy

Tips

Example

Input: id,name,age 1,Ada,36 2,Alan,41

Output: version: 2 models: - name: people columns: - name: id data_type: integer tests: [unique, not_null]

Browse by topic

Who uses Data Utility

Frequently asked questions · Data format benchmark

Frequently asked questions

What does the dbt schema.yml contain?

A model with every column, its data type for the chosen warehouse, and unique and not_null tests taken from the primary key and nullable settings. Add descriptions after downloading.

Which dbt versions work?

The file uses the standard version 2 format with tests, which every dbt version reads.

Does it connect to my database?

No. It only writes the SQL for you to run yourself.

Which databases does the SQL Generator support?

PostgreSQL, MySQL and MariaDB, SQL Server, Oracle and SQLite. It writes CREATE TABLE and INSERT statements from a CSV, JSON, Excel or Parquet file, and guesses column types from your data.

Related pages

Topic guides

Guides