CSV import

The simplest way to populate your database with test data.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Michelle Taylor, Lionel, Emma A, sherr

CSV import

Postby gvsoft » Thu Jul 19, 2012 12:18 am

What happened to CSV import with Data Generator 2.0? I used to be able to use CSV files to load most data types in my tables, but now the CSV type only appears with certain data types. This was a breaking change -- I had to re-configure those elements for which the CSV was taken away! Bad form, guys.

Is there any way to get back the CSV functionality for fields like, for example, nvarchar?

Thanks,

Dennis
gvsoft
 
Posts: 16
Joined: Thu Jul 19, 2012 12:11 am

Postby eddie davis » Fri Jul 20, 2012 10:37 am

Thank you for your post into the forum.

The functionality is still available in SQL Data Generator V2 to import from CSV files for tables and columns using the nvarchar data type.

To apply to the whole table, the table is selected and across on the right had side Source of data ->select 'Use existing data source' -> for the 'Source type' change the drop down to be 'CSV file' ->Using the Browse button navigate and select the CSV file you wish to use.

To apply to an individual column in a table. Expand the table, select your nvarchar column ->Across the right side, Generator drop down ->Expand the Generic heading and select CSV -> Using the Browse button navigate and select the CSV file you wish to use.

Are you to provide an example of where the CSV import is not working for you?

What error messages are you experiencing?

Many Thanks
Eddie
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 943
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software

Postby gvsoft » Fri Jul 20, 2012 2:26 pm

Eddie,

Thank you for your reply. I do not want to apply a CSV to the entire table, but rather to a *subset* of columns in a table (some values may be random, others I want to be based on data that is associated together from a CSV file).

Your instructions match what I *used* to see all the time in the previous version of the product (which I had only recently purchased, so my familiarity is fairly low), but now the option for CSV under the Generic category is not there in *some* cases.

For example: I have a table called, "Room," with 4 columns, two of which are NVARCHAR types. On one column, "Phone nvarchar(20)," I *do* have the option of CSV. But for the other column, "Description nvarchar(50)," the CSV option is *not* available. How is that possible?

Here are some snapshots:

1) Here is the phone field, which *does* have the CSV option:
Image

2) And here is the description field, which does *not* have the CSV option:
Image

- Dennis
gvsoft
 
Posts: 16
Joined: Thu Jul 19, 2012 12:11 am

Postby eddie davis » Wed Jul 25, 2012 7:52 pm

Thank you for your reply.

How bizarre, I am unable to reproduce your fault symptoms.

I followed the same table creation for the table called room as per your screen shots. Matching the column names and data types (You do know that Description is a SQL keyword and it is not good practise to use SQL Keywords when naming your objects or column).

I am using SQLEXPRESS Edition 2008 V10.0.4064 server. SQL Data Generator Version 2.0.3.1. with Windows 7 SP1 64-bit workstation.

Can you please product the Windows OS, SQLEXPRESS Version and SQL Data Generator Version you are using?

A support call has been created for you, the call reference number is F0062555.

If you are also a SQL Compare user, would it be possible for you create a SQL Compare Snapshot file and attach ther resulting *.snp file to an e-mail and send it to support@red-gate.com with the above call reference number in the subject field of the e-mail.

Many Thanks
Eddie
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 943
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software

Postby gvsoft » Wed Jul 25, 2012 8:09 pm

Eddie,

Here is my version information:

OS: Windows XP Pro 64-bit (sp2)
SQL Express: 10.0.1600.22
SQL Data Generator: 2.1.0.3
SQL Compare: 10.1.0.102

- Dennis
gvsoft
 
Posts: 16
Joined: Thu Jul 19, 2012 12:11 am

Postby eddie davis » Tue Aug 07, 2012 4:03 pm

Quick update for SQL Data Generator users who may encounter this problem.

We now know the cause of this problem. Using the screen shots posted earlier into this topic, the second screen shot of Description field in the table dbo.room, you cannot select a CSV file as a generic generator.

In the table properties, an unique non-clustered index had been created on the Description column and it is this index that is preventing SQL Data Generator of including CSV file in the list of available generators.

A feature request has been submitted to modify this behaviour and to provide the same features and options when selecting a CSV file as a generator source for a column to be the same as selecting a CSV file to populate a complete table.

Many Thanks
Eddie
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 943
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software


Return to SQL Data Generator 2

Who is online

Users browsing this forum: No registered users and 0 guests