CSV import not working

I have a very simple table (many to many) that I am trying to populate from a csv file. There are only 5 columns.
Primary Key, Foreign Key 1, Foreign Key 2, LastUpdateBy, LastUpdate

I run the SQL Data Generator, select the csv file, go through the mapping and click the Red Button Generate Data.

What happens is that random data is put into the table.
This is what I see in the lower half of your program.
This lower data never changes from random data.
And yes, I have selected to use a csv file....

Frustrated at such a simple task.
Thanks

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    If you select a CSV file as a data source for a table, that makes it possible for you to choose the columns from the CSV to supply values for the columns of generated data. You then must select the column settings in SQL Data Generator, and pick the CSV as the generator, choosing the column from the CSV that you want to map to the column in the generated data.

    If you do not select the column from the CSV, then SQL Data Generator will continue using the default generator for the column.
  • I'll look at it again Brian.
    But sure thought I had everything selected correctly...
  • Brian:
    I see no where to select columns.
    I went through the Use existing data source, browsed to the CSV file, made sure the columns were mapped correctly to the appropriate data types. I can see the data read correctly in the CSV File Data Import Settings dialog box. But when I click Finish, the preview of data is still showing random data and if I click Generate Data, it will import the random data, not the csv data.

    I've read through help, searched this forum and nothing seems to work.

    I click on a column in Tables to Populate and look at the Column generation settings and the only option I have for the two foreign key fiels is Foreign Key generator. I want to read those from a CSV file!

    I can set a string and date field by click on the columns and going through the entire browse and map again but this begs the question, why did I did it in the first place for the table in the first place ?

    It appears that the populate from csv will not populate FK fields ?
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    There are some types of fields where you can't change the generator type, such as some foreign key fields. Is that the problem? If so, you're rather stuck. SDG sometimes tries to prevent you from doing things that won't work.
  • Did anyone work this out? The csv import function does not work. I select the csv file and then on step one I choose the delimiter and below it shows me how it should look and everything seems fine so I click next and leave the column types as automatic but as soon as you click finish and the dialog closes the sample set is still dynamic and not related to the csv file. Then if you click generate the data that's imported bears no resemblance to the csv data.
Sign In or Register to comment.