Benchdog SQL Data Filler
A VS Code extension for filling a SQL Server or Azure SQL database's tables with realistic test data. Tick the tables and how many rows each gets; Data Filler works out how to fill each column from its name and type, keeps foreign keys, unique values and check constraints right, and lets you choose a column's values yourself. All the work is done by the Benchdog engine (benchdog serve); this extension is the screen.
Install
Install it from the Marketplace in VS Code. The Benchdog engine ships inside the package for Windows (x64), so there is nothing else to install and no .NET needed. Mac and Linux are coming. The desktop app and the benchdog command for the same tool are at benchdog.dev.
What it does
- Fills view: a SQL Data Filler panel in the activity bar lists your saved fills, one per database. Click one to open it.
- New Fill: the + button. Pick the database (Azure SQL from your Benchdog account, or a SQL Server by name). It is tested first.
- Fill tab: every table in the database with its rows now. Tick a table to fill it, with 1,000 rows to start; change the rows in its box. The tick at the top ticks or clears every table shown, and Filter by name narrows the list. A red tag marks a table that is left out, an amber one a table with notes, with why as the tooltip. The refresh button reads the database again.
- Settings: the seed every random choice starts from (the same seed makes the same rows), the language names and addresses are made in, and switches to empty the tables first, let triggers fire, and check constraints as rows go in.
- Columns: click a ticked table to see how each column is filled and why: names, emails, addresses, dates, amounts and more, matched to the column. Identity columns are numbered on, foreign keys take values from the table they point to, and columns SQL Server sets are left to it. For any other column, choose what fills it, with its settings: a smallest and largest number, an earliest and latest date, a list of values, a pattern such as
[A-Z]{3}-[0-9]{4}, a SQL query, or a CSV file and its column. Empty % sets how many rows in a hundred are left NULL. A person's name, email and address in the same row belong together.
- Preview Rows: shows the first 50 rows the fill would add to a table. Nothing is written.
- Save Fill Script: writes the fill as a T-SQL script, to review and run in SSMS, sqlcmd or Azure Data Studio. It runs in one transaction, so a failure changes nothing, and it holds the same rows a fill adds.
- Fill: says what it adds and asks first, then adds the rows in one transaction. On SQL Server, Back Up and Fill takes a copy-only backup first. The tab reads the database again afterwards.
- Project files: a
.datafiller.json file keeps a fill (database, tables, rows, column settings, seed and language) to run again from VS Code, the benchdog data fill --project CLI or the desktop app. Right-click a fill and choose Save as Project File... to write one. Open one to get IntelliSense, its problems in the Problems panel, and an Open Fill link at the top; Open Fill, also on the editor title and the Explorer's right-click menu, adds it to the Fills view and opens it. A project file never holds a password.
- Sign in and SQL logins work as in the other Benchdog SQL tools: your Benchdog account for Azure SQL, your Windows account for SQL Server on your network, or a SQL login whose password Benchdog keeps until VS Code closes or, if you choose, in the system's secure store. The eye on the password box shows what you typed. Right-click a fill and choose Forget Password to clear it.
Settings
| Setting |
Does |
benchdogDataFiller.enginePath |
Full path to the benchdog executable. Empty uses the one that ships with the extension. |
benchdogDataFiller.tenant |
Tenant id to search for Azure SQL databases. Empty means your home tenant. |
benchdogDataFiller.useAzureCli |
Sign in to Azure SQL through your existing az login instead of the browser. |
The settings are separate from the other Benchdog extensions', so they can all be installed together.
How it stays safe
- Every database is reached as you. The extension keeps only each fill's server, database name, how to sign in, tables, rows and column settings; never a password.
- Planning, previewing and writing a script only read. The database changes only after Fill and a confirmation that says what it adds, and then in one transaction.
- Names and values are set as text on the page, so nothing from a database can become markup. The tab is thrown away when hidden.
Diagnostics
Turn on the benchdogDataFiller.diagnostics setting to have the engine write a debug log of what it does, for finding out why something went wrong. Run Benchdog SQL Data Filler: Open Diagnostics Logs Folder to see the logs. Passwords, connection strings, tokens and your data are never written.
Trial and licence
Every Benchdog tool has a thirty day trial with every feature and no card: ask for one at benchdog.dev/trial. One licence is for one person and covers the VS Code extension, the desktop app and the command line, on every machine you work from. Prices are at benchdog.dev/pricing. The licence is checked offline; the tool contacts benchdog.dev only when you ask it to, never in the background. The terms are in LICENSE.md and at benchdog.dev/terms.
Help and support
Getting started, how to do the common jobs, the questions people ask and what to try when something goes wrong: benchdog.dev/help/datafiller. Something else? The support form, or support@benchdog.dev, and a person replies.
| |