Options

CommandLine, Export to cvs, column names not unique

kampak1111kampak1111 Posts: 5
Hi,

Scenario:
I'm currently using version 7.0.0.559 to run the following command line statement
SQLDataCompare.exe /project:"MyProject.sdc" /export:"temp"
This command line instruction produces three kinds of files:
1. 'Additional' - besides the key columns, has both DB1 and DB2 fields even though only the DB2 makes sense and all other DB1 columns are empty
2. 'Different' - has DB1 and DB2 fields
3. 'Missing' - besides the key columns, has both DB2 and DB1 fields even though only the DB1 makes sense and all other DB2 columns are empty

Issue:
I am opening these files with the following Windows PowerShell command
Import-Csv "./temp/dbo.MyTable Different.csv"
and getting the following error:
Import-Csv : The member "SomeField" is already present.

Reason:
Fields that are not the compare keys are duplicated: one column for the DB1, second column for the DB2.

Question:
1. Is it possible to set the SQLDataCompare command line options to get only fields from one database in the exported files?
2. Is it possible the have some prefix added to the columns in the exported file that would indicate from which database these values are coming from and to have all the csv file column names being unique?

Thanks
Kamil Pakur

Comments

  • Options
    Thanks for your post, and sorry for the delay.

    Currently there is no method to set the project to ensure unique columns names when exporting a CSV file. It is also not possible remove the unnecessary columns from the 'Additional' and 'Missing' CSV files.

    I have created feature requests for both of these issues. Hopefully they will be addressed in a future version.

    For your reference the feature tracking codes are SDC-839 and SDC-838 respectively.

    I have associated this ticket with the requests, so I will be able to update you on any developments.

    Let me know if you need any further information.
    Chris
Sign In or Register to comment.