Repository navigation
Expand file tree
/
Copy pathmanifest.yml
More file actions
2081 lines (2081 loc) · 110 KB
/
Copy pathmanifest.yml
File metadata and controls
2081 lines (2081 loc) · 110 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
parameters:
repository: aa8y/postgres-dataset
platforms: linux/amd64,linux/arm64
templates:
# Each image carries exactly one dataset. Per-dataset sources/prereqs are
# declared per tag below and passed to the Dockerfile as build args; optional
# ones are emitted only when the tag defines them (Mustache sections).
#
# Registry build cache (always on, for every tag): import a mode=max build
# cache from the registry so the EXTRACT layer -- and thus the upstream
# download -- is reused when nothing relevant changed. The push template below
# writes the cache, this one only reads it. A missing ref is a cache miss,
# not an error.
#
# The cache lives on GHCR (ghcr.io/<repository>:buildcache-...), not next to
# the published images on Docker Hub: buildx GETs each cache ref's manifest,
# and Docker Hub counts every such GET as a pull against the account's
# metered pull quota (200 per window on a Personal plan) -- ~120 tags x 2
# arches per CI run blew through it even fully authenticated. GHCR meters
# nothing for public packages. The packages are public, so a local
# `dave build` imports anonymously; CI writes them with its GITHUB_TOKEN.
#
# Correctness is gated by DATASET_CHECKSUM: bin/dataset-checksum fingerprints
# the tag's upstream source(s) from cheap metadata (archive.org's JSON
# metadata API md5/sha1 where available, otherwise HTTP HEAD headers, or the
# git ls-remote SHA) on the host, and the value is passed as a build arg the
# builder references just before EXTRACT. When upstream content changes the
# fingerprint changes, busting EXTRACT -> TRANSFORM -> LOAD; otherwise the
# cached layers are reused. Computed live via $(...) command substitution, so
# it stays per-tag without committing anything to this file.
#
# Environment knobs. Each is an ordinary shell parameter expansion: dave only
# renders Mustache, so the literal `${...}` survives into the command and the
# shell dave spawns it in does the expanding. Every one carries a default that
# reproduces the previous hardcoded behaviour, so with none of them exported
# these commands do exactly what they always did. They exist so a single
# manifest can drive both one runner building everything and a per-arch
# fan-out that merges afterwards:
# PLATFORM build: restrict the local build to a single platform.
# push: the one platform to publish. The push template
# re-runs the build (a full local cache hit, so it only
# uploads the GHCR build cache) and then hands the image to
# bin/push-image, which `docker push --platform`es the
# already-built, already-tested image as a single-platform
# manifest. Pushes are PUTs and blob HEADs, which Docker Hub
# does not meter; the previous `buildx build --push` cost
# about one pull per tag re-resolving bases. Multi-platform
# publishing is the merge job's business (bin/merge-manifests),
# never a single machine's.
# CACHE_ARCH suffix for every buildcache ref, so an amd64 and an arm64
# runner write to separate refs (`-amd64`, `-arm64`) instead
# of clobbering one shared one. Unset, the ref is that
# shared legacy ref. (The unsuffixed-ref import fallback
# from before the split is gone: every registry manifest
# fetch counts against Docker Hub's hourly pull quota, and
# one stale-cache lookup per tag per run was costing more
# quota than the cold-cache reuse it might buy. The push
# template imports nothing at all for the same reason -- it
# re-runs a build whose every layer is already in the local
# store, so registry imports there were pure quota burn.)
# CACHE_TO_SCOPE build: additionally EXPORT the cache, under a scoped ref
# (`...-<scope>`). Absent unless set, so an ordinary local
# build still never writes to the registry. CI sets it only
# on a dedicated serialized re-build step, never on the
# parallel build itself: a mode=max export is a heavy
# registry write, and ten shards exporting at build
# concurrency are ~30 simultaneous writers -- the same
# arithmetic that forced `dave push` down to -j 1.
# CACHE_FROM_SCOPE build: additionally IMPORT the scoped ref
# (`...-<scope>`). Set alongside exports of that scope so a
# re-run attempt of a same-repo PR hits the cache its own
# earlier attempt wrote -- without it the retry would
# rebuild, land on a different image ID, and miss the
# integration-test skip stamps keyed on that ID. A ref that
# does not exist yet (the first attempt) is a cache miss,
# not an error.
# TAG_SUFFIX push: suffix for the published tag, so per-arch pushes
# land on `<tag>-amd64` / `<tag>-arm64` for
# bin/merge-manifests to join into one multi-arch tag.
# DESCRIPTOR_DIR push: when set, bin/push-image records the pushed
# manifest's descriptor (digest, size, media type,
# platform) there, one file per ref. bin/merge-manifests
# assembles the multi-arch indexes from those files alone,
# so the merge never reads a manifest back from Docker Hub.
#
# `retagFrom: <tag>` marks a tag as a pure alias of another tag in the same
# context (`latest`, say). There is nothing to build, test or push for an
# alias -- it is the same image under a second name -- so all three templates
# are wrapped in an inverted Mustache section on it: for an alias they render
# to nothing, and dave drops a type whose template rendered empty. The alias
# is instead materialized registry-side by bin/merge-manifests, which retags
# the source tag's already-published manifest list. Alias tags also set
# `structureTest: false`, because container-structure-test needs a local
# image and no build ever produced one for them.
build: >
{{^retagFrom}}docker buildx build --load ${PLATFORM:+--platform "$PLATFORM"}
--cache-from type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}
${CACHE_FROM_SCOPE:+--cache-from type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}-${CACHE_FROM_SCOPE}}
${CACHE_TO_SCOPE:+--cache-to type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}-${CACHE_TO_SCOPE},mode=max,image-manifest=true}
--build-arg DATASET={{dataset}}
--build-arg DATASET_CHECKSUM="$(bin/dataset-checksum '{{{extractUrl}}}')"
--build-arg 'EXTRACT_URL={{{extractUrl}}}'
--build-arg 'SQL_FILES={{{sqlFiles}}}'
{{#extraPrereqs}}--build-arg 'EXTRA_PREREQS={{{.}}}'{{/extraPrereqs}}
{{#dbExtension}}--build-arg DB_EXTENSION={{.}}{{/dbExtension}}
{{#cdDir}}--build-arg 'CD_DIR={{{.}}}'{{/cdDir}}
{{#indexMethod}}--build-arg INDEX_METHOD={{.}}{{/indexMethod}}
-t {{{repository}}}:{{tag}} {{{context}}}{{/retagFrom}}
# Every engine's smoke test runs through test/integration/with-retry.sh, which
# re-runs the script once (DDS_ITEST_RETRIES) when it fails in a way that might
# be infrastructure -- a readiness timeout, a docker or registry hiccup -- and
# returns immediately on a pass or on the scripts' dedicated assertion exit
# code, which is deterministic and so pointless to repeat. See docs/testing.md.
test: '{{^retagFrom}}REPOSITORY={{{repository}}} bash test/integration/with-retry.sh run.sh {{tag}} {{dataset}}{{/retagFrom}}'
push: >
{{^retagFrom}}docker buildx build --load ${PLATFORM:+--platform "$PLATFORM"}
--cache-to type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-},mode=max,image-manifest=true
--build-arg DATASET={{dataset}}
--build-arg DATASET_CHECKSUM="$(bin/dataset-checksum '{{{extractUrl}}}')"
--build-arg 'EXTRACT_URL={{{extractUrl}}}'
--build-arg 'SQL_FILES={{{sqlFiles}}}'
{{#extraPrereqs}}--build-arg 'EXTRA_PREREQS={{{.}}}'{{/extraPrereqs}}
{{#dbExtension}}--build-arg DB_EXTENSION={{.}}{{/dbExtension}}
{{#cdDir}}--build-arg 'CD_DIR={{{.}}}'{{/cdDir}}
{{#indexMethod}}--build-arg INDEX_METHOD={{.}}{{/indexMethod}}
-t {{{repository}}}:{{tag}} {{{context}}} && bin/push-image {{{repository}}}:{{tag}}{{/retagFrom}}
contexts:
postgres:
tagKeys: dataset
# Shared assertions for every postgres tag (the POSTGRES_* env wiring and
# init-script dir). Scoped to this context -- structureTest configs trickle
# down and concatenate, so a global block would wrongly apply to mysql too.
structureTest:
configs:
- test/config/common.yaml
tags:
airlines:
extractUrl: https://edu.postgrespro.ru/demo-20250901-3m.sql.gz
sqlFiles: airlines.sql
structureTest:
configs:
- test/config/airlines.yaml
adventureworks:
extractUrl: https://github.com/lorint/AdventureWorks-for-Postgres.git
sqlFiles: AdventureWorks-for-Postgres/install.sql
extraPrereqs: python3
cdDir: /docker-entrypoint-initdb.d/adventureworks
structureTest:
configs:
- test/config/adventureworks.yaml
dellstore:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/dellstore2/dellstore2-normal-1.0/dellstore2-normal-1.0.tar.gz
sqlFiles: dellstore2-normal-1.0/dellstore2-normal-1.0.sql
structureTest:
configs:
- test/config/dellstore.yaml
# Employees: the datacharmer/test_db large sample (300,024 employees,
# 2,844,047 salary rows), from the repo's own upstream-maintained
# PostgreSQL port. Upstream splits it into a schema file plus eight data
# dumps loaded by a shell script, so the scripts/employees transform hook
# assembles them into one init script (backticks stripped, the port's
# DROP/CREATE DATABASE header removed). The dataset is fixed, so the smoke
# test records exact counts, identical to the mysql employees tag.
employees:
extractUrl: https://github.com/datacharmer/test_db.git
sqlFiles: employees.sql
structureTest:
configs:
- test/config/employees.yaml
frenchtowns:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/french-towns-communes-francais/french-towns-communes-francaises-1.0/french-towns-communes-francaises-1.0.tar.gz
sqlFiles: french-towns-communes-francaises.sql
structureTest:
configs:
- test/config/frenchtowns.yaml
# GeoNames cities15000. Published only as a zipped tab-separated export, so
# the schema is authored in-repo (postgres/scripts/geonames) and the export
# ships alongside the init script for \copy to read at start. Upstream
# refreshes the dump daily, so the smoke test records floors.
geonames:
extractUrl: https://download.geonames.org/export/dump/cities15000.zip
sqlFiles: geonames.sql
cdDir: /docker-entrypoint-initdb.d/geonames
structureTest:
configs:
- test/config/geonames.yaml
iso3166:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/iso-3166/iso-3166-1.0/iso-3166-1.0.tar.gz
sqlFiles: iso-3166/iso-3166.sql
structureTest:
configs:
- test/config/iso3166.yaml
moma:
extractUrl: >-
https://media.githubusercontent.com/media/MuseumofModernArt/collection/main/Artworks.csv
https://media.githubusercontent.com/media/MuseumofModernArt/collection/main/Artists.csv
sqlFiles: moma.sql
cdDir: /docker-entrypoint-initdb.d/moma
structureTest:
configs:
- test/config/moma.yaml
omdb:
extractUrl: https://github.com/df7cb/omdb-postgresql.git
sqlFiles: >-
omdb-postgresql/00-drop-tables.sql
omdb-postgresql/12-kind.sql
omdb-postgresql/13-schema.sql
omdb-postgresql/20-import.sql
omdb-postgresql/30-duplicates.sql
omdb-postgresql/31-primary-keys.sql
omdb-postgresql/40-clean-orphans.sql
omdb-postgresql/41-foreign-keys.sql
omdb-postgresql/50-views.sql
omdb-postgresql/52-category-en.sql
omdb-postgresql/55-purge_dirty.sql
omdb-postgresql/60-log.sql
dbExtension: tsm_system_rows
cdDir: /docker-entrypoint-initdb.d
structureTest:
configs:
- test/config/omdb.yaml
# OpenFlights airports/airlines/routes. Published only as three
# comma-separated data files, so the schema is authored in-repo
# (postgres/scripts/openflights) and the files ship alongside the init
# script for \copy to read at start. Upstream refreshes them in place, so
# the smoke test records floors.
openflights:
extractUrl: >-
https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat
https://raw.githubusercontent.com/jpatokal/openflights/master/data/airlines.dat
https://raw.githubusercontent.com/jpatokal/openflights/master/data/routes.dat
sqlFiles: openflights.sql
cdDir: /docker-entrypoint-initdb.d/openflights
structureTest:
configs:
- test/config/openflights.yaml
pagila:
# A pinned tarball, not a clone of upstream git HEAD: pagila's dump
# changes shape over time (2026-07 added a pgvector example, which is
# why the image now ships pgvector -- see postgres/Dockerfile), and the
# recorded expected counts are measured against one specific commit.
# Bump the pin deliberately: re-record expectations with
# `test/integration/run.sh --update` and revisit the structure-test
# config, alongside any new extension the dump starts requiring.
extractUrl: https://github.com/devrimgunduz/pagila/archive/eddcfc4513dab4239ee1acbdf52beb1f5fcf50ac.tar.gz
sqlFiles: pagila-eddcfc4513dab4239ee1acbdf52beb1f5fcf50ac/pagila-schema.sql pagila-eddcfc4513dab4239ee1acbdf52beb1f5fcf50ac/pagila-data.sql
structureTest:
configs:
- test/config/pagila.yaml
# StackExchange sites all share one schema, so they all build through the
# shared scripts/stackexchange hooks (each site's scripts/<site> dir is a
# symlink to it). Adding a site is just a tag here + a structure-test
# config + an expected/<site>.json floor file.
stackexchange-beer:
dataset: beer
extractUrl: https://archive.org/download/stackexchange/beer.stackexchange.com.7z
sqlFiles: beer.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/stackexchange-beer.yaml
stackexchange-coffee:
dataset: coffee
extractUrl: https://archive.org/download/stackexchange/coffee.stackexchange.com.7z
sqlFiles: coffee.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/stackexchange-coffee.yaml
stackexchange-poker:
dataset: poker
extractUrl: https://archive.org/download/stackexchange/poker.stackexchange.com.7z
sqlFiles: poker.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/stackexchange-poker.yaml
stackexchange-woodworking:
dataset: woodworking
extractUrl: https://archive.org/download/stackexchange/woodworking.stackexchange.com.7z
sqlFiles: woodworking.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/stackexchange-woodworking.yaml
stackexchange-chess:
dataset: chess
extractUrl: https://archive.org/download/stackexchange/chess.stackexchange.com.7z
sqlFiles: chess.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/stackexchange-chess.yaml
stackexchange-cooking:
dataset: cooking
extractUrl: https://archive.org/download/stackexchange/cooking.stackexchange.com.7z
sqlFiles: cooking.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/stackexchange-cooking.yaml
stackexchange-outdoors:
dataset: outdoors
extractUrl: https://archive.org/download/stackexchange/outdoors.stackexchange.com.7z
sqlFiles: outdoors.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/stackexchange-outdoors.yaml
stackexchange-boardgames:
dataset: boardgames
extractUrl: https://archive.org/download/stackexchange/boardgames.stackexchange.com.7z
sqlFiles: boardgames.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/stackexchange-boardgames.yaml
sportsdb:
extractUrl: >-
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_tables.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_inserts.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_indexes.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_constraints.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_fks.sql
sqlFiles: sportsdb_tables.sql sportsdb_inserts.sql sportsdb_indexes.sql sportsdb_constraints.sql sportsdb_fks.sql
indexMethod: btree
structureTest:
configs:
- test/config/sportsdb.yaml
chinook:
dataset: chinook
extractUrl: >-
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/chinook_ddl.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/chinook_genres_artists_albums.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/chinook_songs.sql
sqlFiles: chinook_ddl.sql chinook_genres_artists_albums.sql chinook_songs.sql
structureTest:
configs:
- test/config/chinook.yaml
northwind:
dataset: northwind
extractUrl: >-
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/northwind_ddl.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/northwind_data.sql
sqlFiles: northwind_ddl.sql northwind_data.sql
structureTest:
configs:
- test/config/northwind.yaml
pgexercises:
dataset: pgexercises
extractUrl: >-
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/clubdata_ddl.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/clubdata_data.sql
sqlFiles: clubdata_ddl.sql clubdata_data.sql
structureTest:
configs:
- test/config/pgexercises.yaml
usda:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/usda/usda-r18-1.0/usda-r18-1.0.tar.gz
sqlFiles: usda-r18-1.0/usda.sql
structureTest:
configs:
- test/config/usda.yaml
world:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/world/world-1.0/world-1.0.tar.gz
sqlFiles: dbsamples-0.1/world/world.sql
structureTest:
configs:
- test/config/world.yaml
# `all` is retired (multi-dataset images are legacy). `latest` now tracks a
# single representative dataset -- as an alias of it, not a second build.
latest:
retagFrom: world
structureTest: false
# MySQL images. Built on a thin Alpine MariaDB base (there is no official
# Alpine MySQL image; MariaDB is the MySQL drop-in Alpine itself ships) and
# published under a separate repository. The build/test/push templates are
# the MySQL flavours (fewer build args than postgres; test runs the MySQL
# smoke-test script) and override the global postgres ones for this context.
mysql:
tagKeys: dataset
parameters:
repository: aa8y/mysql-dataset
structureTest:
configs:
- test/config/mysql/common.yaml
templates:
# Mirrors the global templates (see top of file), including the always-on
# registry build cache gated by the DATASET_CHECKSUM fingerprint.
build: >
{{^retagFrom}}docker buildx build --load ${PLATFORM:+--platform "$PLATFORM"}
--cache-from type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}
${CACHE_FROM_SCOPE:+--cache-from type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}-${CACHE_FROM_SCOPE}}
${CACHE_TO_SCOPE:+--cache-to type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}-${CACHE_TO_SCOPE},mode=max,image-manifest=true}
--build-arg DATASET={{dataset}}
--build-arg DATASET_CHECKSUM="$(bin/dataset-checksum '{{{extractUrl}}}')"
--build-arg 'EXTRACT_URL={{{extractUrl}}}'
--build-arg 'SQL_FILES={{{sqlFiles}}}'
{{#extraPrereqs}}--build-arg 'EXTRA_PREREQS={{{.}}}'{{/extraPrereqs}}
-t {{{repository}}}:{{tag}} {{{context}}}{{/retagFrom}}
test: '{{^retagFrom}}REPOSITORY={{{repository}}} bash test/integration/with-retry.sh run-mysql.sh {{tag}} {{dataset}}{{/retagFrom}}'
push: >
{{^retagFrom}}docker buildx build --load ${PLATFORM:+--platform "$PLATFORM"}
--cache-to type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-},mode=max,image-manifest=true
--build-arg DATASET={{dataset}}
--build-arg DATASET_CHECKSUM="$(bin/dataset-checksum '{{{extractUrl}}}')"
--build-arg 'EXTRACT_URL={{{extractUrl}}}'
--build-arg 'SQL_FILES={{{sqlFiles}}}'
{{#extraPrereqs}}--build-arg 'EXTRA_PREREQS={{{.}}}'{{/extraPrereqs}}
-t {{{repository}}}:{{tag}} {{{context}}} && bin/push-image {{{repository}}}:{{tag}}{{/retagFrom}}
tags:
# Sakila is MySQL's own sample database (the original of the model pagila
# ports to Postgres). Ships schema + data as separate files in a tarball.
sakila:
extractUrl: https://downloads.mysql.com/docs/sakila-db.tar.gz
sqlFiles: sakila-db/sakila-schema.sql sakila-db/sakila-data.sql
structureTest:
configs:
- test/config/mysql/sakila.yaml
# MySQL's canonical `world` sample (city, country, countrylanguage) -- the
# same three tables as the Postgres `world` dataset.
world:
extractUrl: https://downloads.mysql.com/docs/world-db.tar.gz
sqlFiles: world-db/world.sql
structureTest:
configs:
- test/config/mysql/world.yaml
# Chinook digital-media store. The vendor ships a MySQL-specific script as
# a GitHub release asset; the build strips its `CREATE DATABASE Chinook` /
# `USE` so it loads into the lowercase `chinook` database.
chinook:
extractUrl: https://github.com/lerocha/chinook-database/releases/download/v1.4.5/Chinook_MySql.sql
sqlFiles: Chinook_MySql.sql
structureTest:
configs:
- test/config/mysql/chinook.yaml
# Northwind: the classic Microsoft small-business sample, ported to MySQL
# by dalers/mywind. The build strips its `CREATE SCHEMA northwind` / `USE`
# (the table DDL is schema-qualified to `northwind`, which the header
# creates).
northwind:
extractUrl: https://github.com/dalers/mywind.git
sqlFiles: mywind/northwind.sql mywind/northwind-data.sql
structureTest:
configs:
- test/config/mysql/northwind.yaml
# Employees: MySQL's canonical large sample (300k employees, 2.8M salary
# rows). Upstream ships a loader script that pulls in six data files with
# the mysql client's `source` command, so the scripts/employees transform
# hook inlines each of them into a single self-contained init script.
employees:
extractUrl: https://github.com/datacharmer/test_db.git
sqlFiles: test_db/employees.sql
structureTest:
configs:
- test/config/mysql/employees.yaml
# MoMA research collection. Published only as CSV, so the schema is
# authored in-repo (mysql/scripts/moma) and the CSVs are bulk-loaded at
# start with server-side LOAD DATA INFILE. Counts drift between builds (the
# CSVs are refreshed upstream), so the smoke test records floors.
moma:
extractUrl: >-
https://media.githubusercontent.com/media/MuseumofModernArt/collection/main/Artworks.csv
https://media.githubusercontent.com/media/MuseumofModernArt/collection/main/Artists.csv
sqlFiles: moma.sql
structureTest:
configs:
- test/config/mysql/moma.yaml
# GeoNames cities15000. Published only as a zipped tab-separated export, so
# the schema is authored in-repo (mysql/scripts/geonames) and the export is
# bulk-loaded at start with server-side LOAD DATA INFILE. Upstream
# refreshes the dump daily, so the smoke test records floors.
geonames:
extractUrl: https://download.geonames.org/export/dump/cities15000.zip
sqlFiles: geonames.sql
structureTest:
configs:
- test/config/mysql/geonames.yaml
# OpenFlights airports/airlines/routes. Published only as three
# comma-separated data files, so the schema is authored in-repo
# (mysql/scripts/openflights) and the files are bulk-loaded at start with
# server-side LOAD DATA INFILE. Upstream refreshes them in place, so the
# smoke test records floors.
openflights:
extractUrl: >-
https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat
https://raw.githubusercontent.com/jpatokal/openflights/master/data/airlines.dat
https://raw.githubusercontent.com/jpatokal/openflights/master/data/routes.dat
sqlFiles: openflights.sql
structureTest:
configs:
- test/config/mysql/openflights.yaml
# Tier 1 hand-translated PostgreSQL datasets. These ship only as
# PostgreSQL dumps, but are plain DDL + data (no PL/pgSQL, no extensions),
# so the shared scripts/pgsql transform hook rewrites the dialect at build
# time (COPY -> INSERT, type/identifier/sequence fixes). Each dataset's
# scripts/<dataset> dir is a symlink to scripts/pgsql; only python3 is
# needed beyond the base tools.
iso3166:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/iso-3166/iso-3166-1.0/iso-3166-1.0.tar.gz
sqlFiles: iso-3166/iso-3166.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/mysql/iso3166.yaml
frenchtowns:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/french-towns-communes-francais/french-towns-communes-francaises-1.0/french-towns-communes-francaises-1.0.tar.gz
sqlFiles: french-towns-communes-francaises.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/mysql/frenchtowns.yaml
usda:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/usda/usda-r18-1.0/usda-r18-1.0.tar.gz
sqlFiles: usda-r18-1.0/usda.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/mysql/usda.yaml
pgexercises:
extractUrl: >-
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/clubdata_ddl.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/clubdata_data.sql
sqlFiles: clubdata_ddl.sql clubdata_data.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/mysql/pgexercises.yaml
# Tier 2 hand-translated PostgreSQL datasets. Larger / slightly more
# involved than tier 1 but still handled by the shared scripts/pgsql hook:
# sportsdb is INSERT-based across five files with sequences, constraints,
# FKs and Yugabyte `USING lsm` indexes; dellstore2 is COPY-based plus a
# PL/pgSQL stored function, which the hook drops (no mechanical MySQL
# translation -- the schema and all data still load faithfully).
dellstore:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/dellstore2/dellstore2-normal-1.0/dellstore2-normal-1.0.tar.gz
sqlFiles: dellstore2-normal-1.0/dellstore2-normal-1.0.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/mysql/dellstore.yaml
sportsdb:
extractUrl: >-
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_tables.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_inserts.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_indexes.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_constraints.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_fks.sql
sqlFiles: sportsdb_tables.sql sportsdb_inserts.sql sportsdb_indexes.sql sportsdb_constraints.sql sportsdb_fks.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/mysql/sportsdb.yaml
# StackExchange sites. Each ships as per-table XML in a 7z archive (no
# SQL), so -- exactly like the postgres side -- every site builds through
# the shared scripts/stackexchange hooks (each site's scripts/<site> dir
# is a symlink to it): the extract hook un-7z's the dump and the transform
# hook converts the XML to a MySQL init script (CREATE TABLE + batched
# INSERTs + indexes). The transform is the MySQL-emitting counterpart of
# the postgres one; adding a site is just a tag here + a structure-test
# config + an expected/mysql/<site>.json floor file.
stackexchange-beer:
dataset: beer
extractUrl: https://archive.org/download/stackexchange/beer.stackexchange.com.7z
sqlFiles: beer.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/mysql/stackexchange-beer.yaml
stackexchange-coffee:
dataset: coffee
extractUrl: https://archive.org/download/stackexchange/coffee.stackexchange.com.7z
sqlFiles: coffee.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/mysql/stackexchange-coffee.yaml
stackexchange-poker:
dataset: poker
extractUrl: https://archive.org/download/stackexchange/poker.stackexchange.com.7z
sqlFiles: poker.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/mysql/stackexchange-poker.yaml
stackexchange-woodworking:
dataset: woodworking
extractUrl: https://archive.org/download/stackexchange/woodworking.stackexchange.com.7z
sqlFiles: woodworking.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/mysql/stackexchange-woodworking.yaml
stackexchange-chess:
dataset: chess
extractUrl: https://archive.org/download/stackexchange/chess.stackexchange.com.7z
sqlFiles: chess.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/mysql/stackexchange-chess.yaml
stackexchange-cooking:
dataset: cooking
extractUrl: https://archive.org/download/stackexchange/cooking.stackexchange.com.7z
sqlFiles: cooking.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/mysql/stackexchange-cooking.yaml
stackexchange-outdoors:
dataset: outdoors
extractUrl: https://archive.org/download/stackexchange/outdoors.stackexchange.com.7z
sqlFiles: outdoors.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/mysql/stackexchange-outdoors.yaml
stackexchange-boardgames:
dataset: boardgames
extractUrl: https://archive.org/download/stackexchange/boardgames.stackexchange.com.7z
sqlFiles: boardgames.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/mysql/stackexchange-boardgames.yaml
# `latest` tracks a single representative dataset, mirroring postgres.
latest:
retagFrom: world
structureTest: false
# CockroachDB images. Built on the official cockroachdb/cockroach image and
# published under a separate repository. There is no official Alpine image,
# but the official one is slim (UBI-minimal, ~170 MB) and multi-arch, and its
# entrypoint honours the same /docker-entrypoint-initdb.d/*.sql convention the
# official postgres image uses (when started with `start-single-node`). Since
# CockroachDB is PostgreSQL wire- and SQL-compatible, these reuse the same
# PostgreSQL-dialect sample dumps the Yugabyte postgres tags do. The build
# templates are the CockroachDB flavours (fewer build args than postgres; test
# runs the CockroachDB smoke-test script) and override the global postgres
# ones for this context.
cockroach:
tagKeys: dataset
parameters:
repository: aa8y/cockroach-dataset
structureTest:
configs:
- test/config/cockroach/common.yaml
templates:
# Mirrors the global templates (see top of file), including the always-on
# registry build cache gated by the DATASET_CHECKSUM fingerprint.
build: >
{{^retagFrom}}docker buildx build --load ${PLATFORM:+--platform "$PLATFORM"}
--cache-from type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}
${CACHE_FROM_SCOPE:+--cache-from type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}-${CACHE_FROM_SCOPE}}
${CACHE_TO_SCOPE:+--cache-to type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}-${CACHE_TO_SCOPE},mode=max,image-manifest=true}
--build-arg DATASET={{dataset}}
--build-arg DATASET_CHECKSUM="$(bin/dataset-checksum '{{{extractUrl}}}')"
--build-arg 'EXTRACT_URL={{{extractUrl}}}'
--build-arg 'SQL_FILES={{{sqlFiles}}}'
{{#extraPrereqs}}--build-arg 'EXTRA_PREREQS={{{.}}}'{{/extraPrereqs}}
{{#cdDir}}--build-arg 'CD_DIR={{{.}}}'{{/cdDir}}
{{#indexMethod}}--build-arg INDEX_METHOD={{.}}{{/indexMethod}}
-t {{{repository}}}:{{tag}} {{{context}}}{{/retagFrom}}
test: '{{^retagFrom}}REPOSITORY={{{repository}}} bash test/integration/with-retry.sh run-cockroach.sh {{tag}} {{dataset}}{{/retagFrom}}'
push: >
{{^retagFrom}}docker buildx build --load ${PLATFORM:+--platform "$PLATFORM"}
--cache-to type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-},mode=max,image-manifest=true
--build-arg DATASET={{dataset}}
--build-arg DATASET_CHECKSUM="$(bin/dataset-checksum '{{{extractUrl}}}')"
--build-arg 'EXTRACT_URL={{{extractUrl}}}'
--build-arg 'SQL_FILES={{{sqlFiles}}}'
{{#extraPrereqs}}--build-arg 'EXTRA_PREREQS={{{.}}}'{{/extraPrereqs}}
{{#cdDir}}--build-arg 'CD_DIR={{{.}}}'{{/cdDir}}
{{#indexMethod}}--build-arg INDEX_METHOD={{.}}{{/indexMethod}}
-t {{{repository}}}:{{tag}} {{{context}}} && bin/push-image {{{repository}}}:{{tag}}{{/retagFrom}}
tags:
# Chinook digital-media store, sourced from Yugabyte's PostgreSQL-dialect
# mirror (the same dump behind the postgres `chinook` tag): plain
# DDL + INSERT data with quoted CamelCase identifiers, which load on
# CockroachDB unchanged.
chinook:
extractUrl: >-
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/chinook_ddl.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/chinook_genres_artists_albums.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/chinook_songs.sql
sqlFiles: chinook_ddl.sql chinook_genres_artists_albums.sql chinook_songs.sql
# python3 for the scripts/chinook -> yugabyte transform (coalesces the
# dump's single-row INSERTs into batched multi-row INSERTs).
extraPrereqs: python3
structureTest:
configs:
- test/config/cockroach/chinook.yaml
# Northwind specialty-foods sample, same Yugabyte PostgreSQL-dialect dump
# behind the postgres `northwind` tag (DDL + INSERT data).
northwind:
extractUrl: >-
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/northwind_ddl.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/northwind_data.sql
sqlFiles: northwind_ddl.sql northwind_data.sql
structureTest:
configs:
- test/config/cockroach/northwind.yaml
# Sakila, the MySQL DVD-rental sample (the original of pagila), from
# jOOQ's multi-dialect port collection, which ships a CockroachDB-specific
# flavour of the PostgreSQL dump: no `film_text` table (15 base tables,
# where MySQL has 16), `release_year` as a plain integer rather than the
# PostgreSQL `year` domain, and a `payment` table without the inherited
# per-month partitions. The repo is cloned (like the mysql `northwind`
# tag) but the data is fixed, so counts are recorded exactly.
#
# Data loads through the shared scripts/pgfoundry hook (scripts/sakila is
# a symlink to it): the schema is CockroachDB-clean as published -- ENUM
# type, `text[]`, `bytea`, four views, `SET search_path`/`default_tablespace`
# and `ALTER ... OWNER TO root` all run unchanged on v25.4 -- but the
# 46,273 data rows arrive in 15 `COPY ... FROM stdin` blocks, and CRDB's
# init-time stdin COPY is far slower than batched INSERTs. The hook also
# drops the dump's trailing per-table `analyze`. The staff<->store foreign
# key cycle the data file breaks at the top and restores at the end is
# kept as published.
sakila:
extractUrl: https://github.com/jOOQ/sakila.git
sqlFiles: sakila/cockroachdb-sakila-db/cockroachdb-sakila-schema.sql sakila/cockroachdb-sakila-db/cockroachdb-sakila-insert-data.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/cockroach/sakila.yaml
# Plain PostgreSQL-dialect dumps from pgFoundry or Yugabyte that load on
# CockroachDB unchanged (mirroring the postgres tags for these datasets).
world:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/world/world-1.0/world-1.0.tar.gz
sqlFiles: dbsamples-0.1/world/world.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/cockroach/world.yaml
iso3166:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/iso-3166/iso-3166-1.0/iso-3166-1.0.tar.gz
sqlFiles: iso-3166/iso-3166.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/cockroach/iso3166.yaml
frenchtowns:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/french-towns-communes-francais/french-towns-communes-francaises-1.0/french-towns-communes-francaises-1.0.tar.gz
sqlFiles: french-towns-communes-francaises.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/cockroach/frenchtowns.yaml
usda:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/usda/usda-r18-1.0/usda-r18-1.0.tar.gz
sqlFiles: usda-r18-1.0/usda.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/cockroach/usda.yaml
pgexercises:
extractUrl: >-
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/clubdata_ddl.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/clubdata_data.sql
sqlFiles: clubdata_ddl.sql clubdata_data.sql
structureTest:
configs:
- test/config/cockroach/pgexercises.yaml
dellstore:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/dellstore2/dellstore2-normal-1.0/dellstore2-normal-1.0.tar.gz
sqlFiles: dellstore2-normal-1.0/dellstore2-normal-1.0.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/cockroach/dellstore.yaml
sportsdb:
extractUrl: >-
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_tables.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_inserts.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_indexes.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_constraints.sql
https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/sample/sportsdb_fks.sql
sqlFiles: sportsdb_tables.sql sportsdb_inserts.sql sportsdb_indexes.sql sportsdb_constraints.sql sportsdb_fks.sql
extraPrereqs: python3
indexMethod: btree
structureTest:
configs:
- test/config/cockroach/sportsdb.yaml
# MoMA publishes only CSV, so the schema is authored in-repo
# (cockroach/scripts/moma) and the transform hook bakes the CSV data into
# the init script as INSERTs (CockroachDB's SQL client supports neither
# \copy nor COPY FROM '<file>'), so nothing ships beside the init script.
moma:
extractUrl: >-
https://media.githubusercontent.com/media/MuseumofModernArt/collection/main/Artworks.csv
https://media.githubusercontent.com/media/MuseumofModernArt/collection/main/Artists.csv
sqlFiles: moma.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/cockroach/moma.yaml
# GeoNames cities15000. Published only as a zipped tab-separated export, so
# the schema is authored in-repo (cockroach/scripts/geonames) and the
# export is bulk-loaded with IMPORT INTO over its DELIMITED (TSV) format.
# Upstream refreshes the dump daily, so the smoke test records floors.
geonames:
extractUrl: https://download.geonames.org/export/dump/cities15000.zip
sqlFiles: geonames.sql
structureTest:
configs:
- test/config/cockroach/geonames.yaml
# OpenFlights airports/airlines/routes. Published only as three
# comma-separated data files, so the schema is authored in-repo
# (cockroach/scripts/openflights) and the files are bulk-loaded with
# IMPORT INTO straight from the node's external-IO dir (they are already
# RFC4180 CSV, so unlike moma they need no normalizing). Upstream
# refreshes them in place, so the smoke test records floors.
openflights:
extractUrl: >-
https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat
https://raw.githubusercontent.com/jpatokal/openflights/master/data/airlines.dat
https://raw.githubusercontent.com/jpatokal/openflights/master/data/routes.dat
sqlFiles: openflights.sql
structureTest:
configs:
- test/config/cockroach/openflights.yaml
# Employees: the datacharmer/test_db large sample (300,024 employees,
# 2,844,047 salary rows). CockroachDB runs upstream's PostgreSQL port
# unchanged apart from its DROP/CREATE DATABASE preamble, but 4.2M rows of
# init-time INSERTs are hopeless here (every batch is a Raft commit), so
# the scripts/employees hooks (python3) rewrite the eight data dumps into
# per-table CSVs, ship them to the node's external-IO dir and load them
# with IMPORT INTO -- the same bulk path geonames and openflights use.
# The dataset is fixed, so the smoke test records exact counts, identical
# to the mysql, postgres, sqlite and duckdb employees tags.
employees:
extractUrl: https://github.com/datacharmer/test_db.git
sqlFiles: employees.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/cockroach/employees.yaml
# StackExchange sites all share one schema, so they all build through the
# shared scripts/stackexchange hooks (each site's scripts/<site> dir is a
# symlink to it). Adding a site is just a tag here + a structure-test
# config + an expected/cockroach/<site>.json floor file.
stackexchange-beer:
dataset: beer
extractUrl: https://archive.org/download/stackexchange/beer.stackexchange.com.7z
sqlFiles: beer.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/cockroach/stackexchange-beer.yaml
stackexchange-coffee:
dataset: coffee
extractUrl: https://archive.org/download/stackexchange/coffee.stackexchange.com.7z
sqlFiles: coffee.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/cockroach/stackexchange-coffee.yaml
stackexchange-poker:
dataset: poker
extractUrl: https://archive.org/download/stackexchange/poker.stackexchange.com.7z
sqlFiles: poker.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/cockroach/stackexchange-poker.yaml
stackexchange-woodworking:
dataset: woodworking
extractUrl: https://archive.org/download/stackexchange/woodworking.stackexchange.com.7z
sqlFiles: woodworking.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/cockroach/stackexchange-woodworking.yaml
stackexchange-chess:
dataset: chess
extractUrl: https://archive.org/download/stackexchange/chess.stackexchange.com.7z
sqlFiles: chess.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/cockroach/stackexchange-chess.yaml
stackexchange-cooking:
dataset: cooking
extractUrl: https://archive.org/download/stackexchange/cooking.stackexchange.com.7z
sqlFiles: cooking.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/cockroach/stackexchange-cooking.yaml
stackexchange-outdoors:
dataset: outdoors
extractUrl: https://archive.org/download/stackexchange/outdoors.stackexchange.com.7z
sqlFiles: outdoors.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/cockroach/stackexchange-outdoors.yaml
stackexchange-boardgames:
dataset: boardgames
extractUrl: https://archive.org/download/stackexchange/boardgames.stackexchange.com.7z
sqlFiles: boardgames.sql
extraPrereqs: p7zip python3 py3-lxml
structureTest:
configs:
- test/config/cockroach/stackexchange-boardgames.yaml
# `latest` tracks a single representative dataset, mirroring postgres/mysql.
latest:
retagFrom: chinook
structureTest: false
# SQLite images. Built on the Alpine, statically-linked keinos/sqlite3 image
# and published under a separate repository. SQLite is serverless -- a
# database is just a file -- so the build *builds the database file* rather
# than shipping init scripts: a dataset is described either by a text SQL
# source (sqlFiles, fed to the sqlite3 CLI to build the database) or by a
# prebuilt SQLite database file (dbFile, shipped as-is). The build templates
# are the SQLite flavours (no init-script assembly; test runs the SQLite
# smoke-test script) and override the global postgres ones for this context.
sqlite:
tagKeys: dataset
parameters:
repository: aa8y/sqlite-dataset
structureTest:
configs:
- test/config/sqlite/common.yaml
templates:
# Mirrors the global templates (see top of file), including the always-on
# registry build cache gated by the DATASET_CHECKSUM fingerprint. Emits
# SQL_FILES or DB_FILE per tag (Mustache sections), never both.
build: >
{{^retagFrom}}docker buildx build --load ${PLATFORM:+--platform "$PLATFORM"}
--cache-from type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}
${CACHE_FROM_SCOPE:+--cache-from type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}-${CACHE_FROM_SCOPE}}
${CACHE_TO_SCOPE:+--cache-to type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-}-${CACHE_TO_SCOPE},mode=max,image-manifest=true}
--build-arg DATASET={{dataset}}
--build-arg DATASET_CHECKSUM="$(bin/dataset-checksum '{{{extractUrl}}}')"
--build-arg 'EXTRACT_URL={{{extractUrl}}}'
{{#sqlFiles}}--build-arg 'SQL_FILES={{{.}}}'{{/sqlFiles}}
{{#dbFile}}--build-arg 'DB_FILE={{{.}}}'{{/dbFile}}
{{#extraPrereqs}}--build-arg 'EXTRA_PREREQS={{{.}}}'{{/extraPrereqs}}
-t {{{repository}}}:{{tag}} {{{context}}}{{/retagFrom}}
test: '{{^retagFrom}}REPOSITORY={{{repository}}} bash test/integration/with-retry.sh run-sqlite.sh {{tag}} {{dataset}}{{/retagFrom}}'
push: >
{{^retagFrom}}docker buildx build --load ${PLATFORM:+--platform "$PLATFORM"}
--cache-to type=registry,ref=ghcr.io/{{{repository}}}:buildcache-{{tag}}${CACHE_ARCH:-},mode=max,image-manifest=true
--build-arg DATASET={{dataset}}
--build-arg DATASET_CHECKSUM="$(bin/dataset-checksum '{{{extractUrl}}}')"
--build-arg 'EXTRACT_URL={{{extractUrl}}}'
{{#sqlFiles}}--build-arg 'SQL_FILES={{{.}}}'{{/sqlFiles}}
{{#dbFile}}--build-arg 'DB_FILE={{{.}}}'{{/dbFile}}
{{#extraPrereqs}}--build-arg 'EXTRA_PREREQS={{{.}}}'{{/extraPrereqs}}
-t {{{repository}}}:{{tag}} {{{context}}} && bin/push-image {{{repository}}}:{{tag}}{{/retagFrom}}
tags:
# Chinook digital-media store. The vendor ships a native SQLite SQL script
# (release v1.4.5), which the build runs through the sqlite3 CLI to create
# /data/chinook.db. Same CamelCase identifiers as the other chinook tags.
chinook:
extractUrl: https://github.com/lerocha/chinook-database/releases/download/v1.4.5/Chinook_Sqlite.sql
sqlFiles: Chinook_Sqlite.sql
structureTest:
configs:
- test/config/sqlite/chinook.yaml
# Northwind specialty-foods sample. The jpwhite3/northwind-SQLite3 port
# publishes a prebuilt database (dist/northwind.db), shipped as-is. This is
# the expanded edition of the sample (a large Order Details table).
northwind:
extractUrl: https://raw.githubusercontent.com/jpwhite3/northwind-SQLite3/main/dist/northwind.db
dbFile: northwind.db
structureTest:
configs:
- test/config/sqlite/northwind.yaml
# Tier 1 hand-translated PostgreSQL datasets. These ship only as
# PostgreSQL dumps, but are plain DDL + data (no PL/pgSQL, no extensions),
# so the shared scripts/pgsql transform hook rewrites the dialect at build
# time (COPY -> INSERT, strip Postgres-only noise). SQLite cannot add
# constraints via ALTER TABLE, so PK/FK/unique from the dump are dropped;
# tables and row counts still load faithfully. Each dataset's
# scripts/<dataset> dir is a symlink to scripts/pgsql.
world:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/world/world-1.0/world-1.0.tar.gz
sqlFiles: dbsamples-0.1/world/world.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/sqlite/world.yaml
iso3166:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/iso-3166/iso-3166-1.0/iso-3166-1.0.tar.gz
sqlFiles: iso-3166/iso-3166.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/sqlite/iso3166.yaml
frenchtowns:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/french-towns-communes-francais/french-towns-communes-francaises-1.0/french-towns-communes-francaises-1.0.tar.gz
sqlFiles: french-towns-communes-francaises.sql
extraPrereqs: python3
structureTest:
configs:
- test/config/sqlite/frenchtowns.yaml
usda:
extractUrl: https://ftp.postgresql.org/pub/projects/pgFoundry/dbsamples/usda/usda-r18-1.0/usda-r18-1.0.tar.gz