Command line - using both xml and .sdc

I figured I'd take the easy way out and just call my .sdc from the command line rather than re-creating all the parms in .xml. The only downside of using the project script is that while it's great for comparisons, it doesn't appear to allow more granular actions.

For instance in a project it will allow me to only compare certain columns, but then there's no way in that same project to indicate that it should only add new files and update certain columns in existing records. However this level of granularity does seem to be part of the arguments I can specify via XML.

Is it possible to combine the two, e.g. use the .sdc for the comparison arguments and the .xml for the sync arguments? Else it seems the only way to do what I want is to use the xml only.

Or am I missing something?

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    I believe that the issue is that the command-line tool does not respect the mappings that you had set in the .sdc project. I know that this logic is implemented specifically in the UI layer of SQL Data Compare.

    This problem also affects SQL Toolkit, as it forces you to come up with some way of interperting the mapping and unmapping commands specified in the .sdc file.

    I think your workaround is probably the best until we can put the table mapping logic into a lower level of the software.
  • FWIW, this would be a pretty cool feature - to be able to save a .sdc out in the same format as the argfile XML.
  • I'll dump another feature request while I'm at it - the ability to have the flags ignoremissing, ignoreadditional, etc. be able to be set at the table level instead of just applying to the whole operation.

    So I could do something like:

    <include>Table:Tabel1</include>
    <include>Table:Tabel2</include>
    <include ignoreadditional="false">Table:Tabel2</include>
    <ignoreadditional/>

    Which would apply the flag to all but the one table where it's explicitly set to false.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    If you're really clever, I think you can do this using the WHERE clause in the project. You could set a WHERE clause to omit any rows of data that do not exist in the other database.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Sorry -- the mappings work in the command-line application, they only aren't respected when you use Project.LoadFromDisk() in the SQL Toolkit.

    Sorry for the confusion.
Sign In or Register to comment.