Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Compare the structures of two databases

  1. #1
    Join Date
    Mar 2013
    Posts
    4

    Default Compare the structures of two databases

    Hi !

    I Have two databas postgresql, and I want to compare the tables and fields of 2 databas.

    Exemple:

    Database A:
    Table 1:name,code,description.
    Table 2: name,capacity.

    Database B:
    Table 1:name,code,value.
    Table 2: name.
    Table 3: name.

    I want a solution that give me the follow result:
    Table1: no description,a field value added
    Table 2:no field capacity
    Table 3: new.

    Thank you !

  2. #2
    Join Date
    Jul 2009
    Posts
    476

    Default

    You might want to use Postgres itself, rather than PDI, to do this. You could use pg_dump with the --schema-only option to create text dump files, and then compare (diff) those files with a text editor. Or you could query the information_schema.columns view in Postgres in both databases. If you query those views, you could set up two Table Input steps in a PDI transformation and run a Merge diff step to show the differences.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.