Member-only story
Import Testing Data into Azure SQL Database
Mockaroo | Azure | sqlcmd utility | Powershell
I recently had a need to add test data to a database so that I can query against it for testing the SQL scaling within Azure. Again the information that I was looking for was not easily accessible. I am writing this article to identify how you can create test datasets quickly.
Assumptions:
- Have an existing Azure SQL Database with permissions in order to create tables and insert records.
Step 1. Generating the Dataset with Mockaroo
Go to https://www.mockaroo.com/. Mockaroo offers various ways to export the data. However, a free account can only export up to 1000 records at a time. If you want more like 100,000 per file, then that will be just $50 a year. Not bad at all. So let's just download 1,000 for now.
There are only a few things that we will change:
- Change the Format to SQL.
- Change the Table to โTEST_DATASETโ
- Click on the โinclude CREATE TABLEโ radio button.