You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 17, 2024. It is now read-only.
Run `data-diff` with a `toml` configuration file. In the following example, we compare tables between MotherDuck(hosted DuckDB) and Snowflake using the hashdiff algorithm:
98
+
99
+
```toml
100
+
## DATABASE CONNECTION ##
101
+
[database.duckdb_connection]
102
+
driver = "duckdb"
103
+
# filepath = "datafold_demo.duckdb" # local duckdb file example
104
+
# filepath = "md:" # default motherduck connection example
105
+
filepath = "md:datafold_demo?motherduck_token=${motherduck_token}"# API token recommended for motherduck connection
106
+
database = "datafold_demo"
107
+
108
+
[database.snowflake_connection]
109
+
driver = "snowflake"
110
+
database = "DEV"
111
+
user = "sung"
112
+
password = "${SNOWFLAKE_PASSWORD}"# or "<PASSWORD_STRING>"
113
+
# the info below is only required for snowflake
114
+
account = "${ACCOUNT}"# by33919
115
+
schema = "DEVELOPMENT"
116
+
warehouse = "DEMO"
117
+
role = "DEMO_ROLE"
118
+
119
+
## RUN PARAMETERS ##
120
+
[run.default]
121
+
verbose = true
122
+
123
+
## EXAMPLE DATA DIFF JOB ##
124
+
[run.demo_xdb_diff]
125
+
# Source 1 ("left")
126
+
1.database = "duckdb_connection"
127
+
1.table = "development.raw_orders"
128
+
129
+
# Source 2 ("right")
130
+
2.database = "snowflake_connection"
131
+
2.table = "RAW_ORDERS"# note that snowflake table names are case-sensitive
132
+
133
+
verbose = false
134
+
```
135
+
136
+
```bash
137
+
# export relevant environment variables, example below
138
+
export motherduck_token=<MOTHERDUCK_TOKEN>
139
+
140
+
# run the configured data-diff job
141
+
data-diff --conf datadiff.toml \
142
+
--run demo_xdb_diff \
143
+
-k "id" \
144
+
-c status
145
+
146
+
# output example
147
+
- 1, completed
148
+
+ 1, returned
149
+
```
150
+
96
151
Check out [documentation](https://docs.datafold.com/reference/open_source/cli) for the full command reference.
97
152
98
153
@@ -106,13 +161,14 @@ Check out [documentation](https://docs.datafold.com/reference/open_source/cli) f
0 commit comments