splitgraph / sgr

sgr (command line client for Splitgraph) and the splitgraph Python library
https://www.splitgraph.com
Other
324 stars 17 forks source link

Can I ask assistance here for executing a diff request between 2 repo ? #810

Closed MaraScott closed 1 year ago

MaraScott commented 1 year ago

Hi,

I m not sure this is the right place, if it is not, please let me know where can I ask this kind of question.

I m trying to do this

sgr diff demo_old.wp_options demo_new.wp_options > changes.sql

where I m executing the diff between 2 repo of the same table.

I know this doesn t work as I am suppose to diff on the same repo, however when I do this

sgr import schema_wp_demo wp_options demo_old

I got

error: ValueError: Table(s) ['wp_options'] already exist(s) at demo_old!

How can I proceed ?

mildbyte commented 1 year ago

You could try importing with a table rename:

sgr import schema_wp_demo wp_options demo_old wp_options_old

Though I'm not sure how efficient the diffing will be if the two tables come from different repositories.

MaraScott commented 1 year ago

Hi,

Thx for your answer, I found a way to do it on the same db as splitgraph expect it.