Announcement

Collapse
No announcement yet.

Specifying Key Columns from Command Line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Chris
    replied
    Sorry, it isn't possible to set key columns from the command line or scripts in Beyond Compare 4. Exposing more interactive functionality in scripts is on the wish list for future versions of Beyond Compare.

    Leave a comment:


  • semio
    replied
    Hi Beyond Compare team,

    I googled command line option for bcompare to set key column and found this thread. Is there such option now for bc4?

    Thanks

    Leave a comment:


  • Aaron
    replied
    Hello,

    Script does not support loading a Data Compare session; the edits to the xml need to be made to the Default section (default Data Compare is edited in the graphical interface, Home screen, in the Saved Sessions list, Edit session defaults folder, and select Data Compare).

    BCompare.exe "@c:\bcscript.txt"
    and your script code (using two file names) looks good.

    Leave a comment:


  • Sandeep_Jagtap
    replied
    Originally posted by Aaron View Post
    Hello,

    Correct, BC3 does not currently support setting the key columns from the command line. The workaround I would suggest is, if you are already parsing the files to determine which col should be a key with an external script, you can also parse the BCSessions.xml and alter the default Data Compare session settings.

    To see an example of how they should be formatted, use the graphical interface to change the defaults (set Column 1 and 3 as Keys).

    Please back up your current BCSessions.xml (and other BCSetting.xmls), just in case you need to revert.

    Depending on your Linux distro, settings are usually stored in ~/.config/bcompare, $XDG_CONFIG_HOME/bcompare, or ~/.beyondcompare
    Hi Aron

    Can you elaborate more on this ?
    from your explanation my understanding is
    we can use BCSessions.xml to specify key columns and otther details.
    can you state one such example in code (Command and Script )

    I tried to do my self but could not achieve expected result.
    Basically trying to compare 2 CSV having Key columns and exporing result html


    My Command:
    Code:
     BComp  @"Script.txt" "MySession"
    pause

    My Script
    Code:
    data-report layout:side-by-side options:display-all title:"72k Compare" output-to:"Report.html" output-options:html-color "C:\Data\Before\REPORT.csv" "C:\Data\After\REPORT.csv"
    my Session file
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Produced by Beyond Compare 3 from Scooter Software -->
    <BCSessions>
    	<TSessionFolder>
    		<Items>
    			<TSessionFolder>
    				<Items>
    					<TDataCompareSession Value="REPORT.csv">
    						<LastModified Value="2014-01-29 10:32:13"/>
    						<Rules>
    							<Cols>
    								<Keys Value="7"/>
    							</Cols>
    						</Rules>
    						<Specs>
    							<Left Value="C:\Data\Before\REPORT.csv"/>
    							<Right Value="C:\Data\After\REPORT.csv"/>
    						</Specs>
    						<State>
    							<InsigIgnored Value="True"/>
    						</State>
    					</TDataCompareSession>
    				</Items>
    			</TSessionFolder>
    			<TDataCompareSession>
    				<State>
    					<InsigIgnored Value="True"/>
    				</State>
    			</TDataCompareSession>
    		</Items>
    	</TSessionFolder>
    </BCSessions>

    Could please guide me

    Leave a comment:


  • Aaron
    replied
    Hello,

    Correct, BC3 does not currently support setting the key columns from the command line. The workaround I would suggest is, if you are already parsing the files to determine which col should be a key with an external script, you can also parse the BCSessions.xml and alter the default Data Compare session settings.

    To see an example of how they should be formatted, use the graphical interface to change the defaults (set Column 1 and 3 as Keys).

    Please back up your current BCSessions.xml (and other BCSetting.xmls), just in case you need to revert.

    Depending on your Linux distro, settings are usually stored in ~/.config/bcompare, $XDG_CONFIG_HOME/bcompare, or ~/.beyondcompare

    Leave a comment:


  • cjs
    started a topic Specifying Key Columns from Command Line

    Specifying Key Columns from Command Line

    I'm using Beyond Compare to to compare CSV formatted database table dumps as part of a regression build. Currently about 100 different tables are compared, each one having a different set of key columns and unimportant columns.

    I would like to be able to create a script that would launch Beyond Compare and based on the scripts knowledge of what table dump is being compared, tell Beyond Compare which columns should be treated as keys.

    It doesn't look like it possible to pass this information in via the command line. Am I correct in assuming that, or is this somehow possible? If this isn't supported, are there plans to add support for it?

    I am using Beyond Compare 3 for Linux.

    Thanks.
Working...
X