sqlmesh 0.184.3.dev16__py3-none-any.whl → 0.184.3.dev18__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sqlmesh/_version.py +2 -2
- sqlmesh/core/macros.py +15 -7
- {sqlmesh-0.184.3.dev16.dist-info → sqlmesh-0.184.3.dev18.dist-info}/METADATA +1 -1
- {sqlmesh-0.184.3.dev16.dist-info → sqlmesh-0.184.3.dev18.dist-info}/RECORD +51 -51
- {sqlmesh-0.184.3.dev16.dist-info → sqlmesh-0.184.3.dev18.dist-info}/WHEEL +1 -1
- web/client/dist/assets/{Audits-DIPZFtrx.js → Audits-717Verqx.js} +1 -1
- web/client/dist/assets/{Banner-DAsK-QL1.js → Banner-CgwLz5R5.js} +1 -1
- web/client/dist/assets/{ChevronDownIcon-DzDManbV.js → ChevronDownIcon-BmxRmFkN.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-DSpbcx00.js → ChevronRightIcon-c8Ny36P1.js} +1 -1
- web/client/dist/assets/{Content-D7h4mnHF.js → Content-CgUj3NrT.js} +1 -1
- web/client/dist/assets/{Content-BJUjv8iu.js → Content-CwJTYkxI.js} +1 -1
- web/client/dist/assets/{Data-ClFC_pBa.js → Data-Dk9X2oU9.js} +1 -1
- web/client/dist/assets/{DataCatalog-t3dziG8A.js → DataCatalog-k2DFt3HQ.js} +1 -1
- web/client/dist/assets/{Editor-DSf-2EQT.js → Editor-9oBtB7GG.js} +1 -1
- web/client/dist/assets/{Editor-7DfgGKw9.js → Editor-qYDD_MAR.js} +1 -1
- web/client/dist/assets/{Errors-DA2bBfpf.js → Errors-SCnfp9wM.js} +1 -1
- web/client/dist/assets/{FileExplorer-4nRQY6cL.js → FileExplorer-DWAYRX_y.js} +1 -1
- web/client/dist/assets/{Footer-D12q5O5Z.js → Footer-SkJqpLMV.js} +1 -1
- web/client/dist/assets/{Header-DLQZY2Ex.js → Header-CjI7SntD.js} +1 -1
- web/client/dist/assets/{Input-CRK-1wuV.js → Input-CgGiu7YD.js} +1 -1
- web/client/dist/assets/Lineage-DVq-CJMC.js +1 -0
- web/client/dist/assets/{ListboxShow-DrFIArL6.js → ListboxShow-ZJMgV_zm.js} +1 -1
- web/client/dist/assets/{ModelLineage-voejafVo.js → ModelLineage-DTLuCeiY.js} +1 -1
- web/client/dist/assets/{Models-es1Gq05d.js → Models-U53foXav.js} +1 -1
- web/client/dist/assets/{Page-DaopzNy3.js → Page-BfsnjNUY.js} +1 -1
- web/client/dist/assets/{Plan-DbxRINvk.js → Plan-8FKkRAM8.js} +1 -1
- web/client/dist/assets/{PlusCircleIcon-BXu3EzDy.js → PlusCircleIcon-CErWR_UX.js} +1 -1
- web/client/dist/assets/{ReportErrors-DlOUEuvB.js → ReportErrors-DTA5fMVE.js} +1 -1
- web/client/dist/assets/{Root-CY8b3FlQ.js → Root-A_G5_k98.js} +1 -1
- web/client/dist/assets/{SearchList-Bts2_IsQ.js → SearchList-C-oF3biB.js} +1 -1
- web/client/dist/assets/{SelectEnvironment-phnYBEdf.js → SelectEnvironment-BEVWGY0-.js} +1 -1
- web/client/dist/assets/{SourceList-DIGuOOMT.js → SourceList-Dv3xPrd_.js} +1 -1
- web/client/dist/assets/{SourceListItem-CH25ygOv.js → SourceListItem-mVYtYF13.js} +1 -1
- web/client/dist/assets/{SplitPane-DBt3cX7d.js → SplitPane-DPKB1cRo.js} +1 -1
- web/client/dist/assets/{Tests-Bs8w6XBf.js → Tests-CH1RUGi1.js} +1 -1
- web/client/dist/assets/{Welcome-CHeVBRYR.js → Welcome-CcphRk0f.js} +1 -1
- web/client/dist/assets/{context-DrZJiN75.js → context-DGN-T77G.js} +1 -1
- web/client/dist/assets/{context-C1uFn1zg.js → context-JaECki6C.js} +1 -1
- web/client/dist/assets/{editor-DHvEZynA.js → editor-DfvuLZRc.js} +1 -1
- web/client/dist/assets/{file-CiUz225S.js → file-DrmdjHM2.js} +1 -1
- web/client/dist/assets/{floating-ui.react-dom-CWmFdbmT.js → floating-ui.react-dom-CkbMeDhm.js} +1 -1
- web/client/dist/assets/{help-BAPK0Chk.js → help-D4T-Hhu6.js} +1 -1
- web/client/dist/assets/{index-vSJ8fwXa.js → index-tpUXT8yx.js} +1 -1
- web/client/dist/assets/{index-50Jk2AVj.js → index-uSmLm2pE.js} +2 -2
- web/client/dist/assets/{plan-CzgwheKs.js → plan-Cttl620W.js} +1 -1
- web/client/dist/assets/{popover-xfBVdLdC.js → popover-k1WuHpnU.js} +1 -1
- web/client/dist/assets/{project-ox5qB7wx.js → project-C_xj-Y_c.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/Lineage-BaSYxvZ8.js +0 -1
- {sqlmesh-0.184.3.dev16.dist-info → sqlmesh-0.184.3.dev18.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.184.3.dev16.dist-info → sqlmesh-0.184.3.dev18.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.184.3.dev16.dist-info → sqlmesh-0.184.3.dev18.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.184.3.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 184, 3, '
|
|
20
|
+
__version__ = version = '0.184.3.dev18'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 184, 3, 'dev18')
|
sqlmesh/core/macros.py
CHANGED
|
@@ -1090,10 +1090,10 @@ def pivot(
|
|
|
1090
1090
|
column: SQL,
|
|
1091
1091
|
values: t.List[SQL],
|
|
1092
1092
|
alias: bool = True,
|
|
1093
|
-
agg:
|
|
1094
|
-
cmp:
|
|
1095
|
-
prefix:
|
|
1096
|
-
suffix:
|
|
1093
|
+
agg: exp.Expression = exp.Literal.string("SUM"),
|
|
1094
|
+
cmp: exp.Expression = exp.Literal.string("="),
|
|
1095
|
+
prefix: exp.Expression = exp.Literal.string(""),
|
|
1096
|
+
suffix: exp.Expression = exp.Literal.string(""),
|
|
1097
1097
|
then_value: SQL = SQL("1"),
|
|
1098
1098
|
else_value: SQL = SQL("0"),
|
|
1099
1099
|
quote: bool = True,
|
|
@@ -1107,18 +1107,26 @@ def pivot(
|
|
|
1107
1107
|
>>> sql = "SELECT date_day, @PIVOT(status, ['cancelled', 'completed']) FROM rides GROUP BY 1"
|
|
1108
1108
|
>>> MacroEvaluator().transform(parse_one(sql)).sql()
|
|
1109
1109
|
'SELECT date_day, SUM(CASE WHEN status = \\'cancelled\\' THEN 1 ELSE 0 END) AS "\\'cancelled\\'", SUM(CASE WHEN status = \\'completed\\' THEN 1 ELSE 0 END) AS "\\'completed\\'" FROM rides GROUP BY 1'
|
|
1110
|
+
>>> sql = "SELECT @PIVOT(a, ['v'], then_value := tv, suffix := '_sfx', quote := FALSE)"
|
|
1111
|
+
>>> MacroEvaluator(dialect="bigquery").transform(parse_one(sql)).sql("bigquery")
|
|
1112
|
+
"SELECT SUM(CASE WHEN a = 'v' THEN tv ELSE 0 END) AS `v_sfx`"
|
|
1110
1113
|
"""
|
|
1111
1114
|
aggregates: t.List[exp.Expression] = []
|
|
1112
1115
|
for value in values:
|
|
1113
|
-
proj = f"{agg}("
|
|
1116
|
+
proj = f"{agg.name}("
|
|
1114
1117
|
if distinct:
|
|
1115
1118
|
proj += "DISTINCT "
|
|
1116
1119
|
|
|
1117
|
-
proj += f"CASE WHEN {column} {cmp} {value} THEN {then_value} ELSE {else_value} END) "
|
|
1120
|
+
proj += f"CASE WHEN {column} {cmp.name} {value} THEN {then_value} ELSE {else_value} END) "
|
|
1118
1121
|
node = evaluator.parse_one(proj)
|
|
1119
1122
|
|
|
1120
1123
|
if alias:
|
|
1121
|
-
node = node.as_(
|
|
1124
|
+
node = node.as_(
|
|
1125
|
+
f"{prefix.name}{value}{suffix.name}",
|
|
1126
|
+
quoted=quote,
|
|
1127
|
+
copy=False,
|
|
1128
|
+
dialect=evaluator.dialect,
|
|
1129
|
+
)
|
|
1122
1130
|
|
|
1123
1131
|
aggregates.append(node)
|
|
1124
1132
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=DRovDXI-9D9xeYDP7t8Fq7mI31S2btlN-LHPOK3y7PA,7240
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=e7c-_oRd2hvujyRJf3hfj7jk4VmObw_F0egoXwXNMVM,530
|
|
3
3
|
sqlmesh/magics.py,sha256=aeOyTdeNnyGzGtJXECDAbqJ8OAplrV4UAYl0I2hhtig,39670
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -19,7 +19,7 @@ sqlmesh/core/dialect.py,sha256=fPTV517IOS0nWMxYznNNQnXkQkFFrPOSKe8ghsQ0o8A,49759
|
|
|
19
19
|
sqlmesh/core/environment.py,sha256=0TTQf4C4LXwf37fm-dfYv1qyG7vtZfQI5rizgm5g0j0,11442
|
|
20
20
|
sqlmesh/core/lineage.py,sha256=zjB0Zfamo2Fja2r5SSZPMbrEKTXr1WjozZPVqvxdybI,3143
|
|
21
21
|
sqlmesh/core/loader.py,sha256=5ty4qY4qQFQuinhtNRzB-l5yvU4TgdPPW_Y_9VrnS2U,32244
|
|
22
|
-
sqlmesh/core/macros.py,sha256=
|
|
22
|
+
sqlmesh/core/macros.py,sha256=SdDmOC1pBANeTpLI45r913h_qTp7JGjsu7uwdHx181U,59336
|
|
23
23
|
sqlmesh/core/node.py,sha256=r4_1MRTPcU0MAlwZ5KzrykLT58B7dkKvHzPCsJmEKD8,14497
|
|
24
24
|
sqlmesh/core/notification_target.py,sha256=PPGoDrgbRKxr27vJEu03XqNTQLYTw0ZF_b0yAapxGeI,16158
|
|
25
25
|
sqlmesh/core/reference.py,sha256=k7OSkLqTjPR8WJjNeFj0xAJ297nZUMgb_iTVwKRRKjc,4875
|
|
@@ -268,53 +268,53 @@ sqlmesh/utils/pydantic.py,sha256=-u69PDY-4FLR7ODNKBoN7PsPNmZ0wdhsJcCAG2P6vyY,110
|
|
|
268
268
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
269
269
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
270
270
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
271
|
-
sqlmesh-0.184.3.
|
|
271
|
+
sqlmesh-0.184.3.dev18.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
272
272
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
273
|
-
web/client/dist/index.html,sha256=
|
|
274
|
-
web/client/dist/assets/Audits-
|
|
275
|
-
web/client/dist/assets/Banner-
|
|
276
|
-
web/client/dist/assets/ChevronDownIcon-
|
|
277
|
-
web/client/dist/assets/ChevronRightIcon-
|
|
278
|
-
web/client/dist/assets/Content-
|
|
279
|
-
web/client/dist/assets/Content-
|
|
280
|
-
web/client/dist/assets/Data-
|
|
281
|
-
web/client/dist/assets/DataCatalog-
|
|
282
|
-
web/client/dist/assets/Editor-
|
|
283
|
-
web/client/dist/assets/Editor-
|
|
284
|
-
web/client/dist/assets/Errors-
|
|
285
|
-
web/client/dist/assets/FileExplorer-
|
|
286
|
-
web/client/dist/assets/Footer-
|
|
287
|
-
web/client/dist/assets/Header-
|
|
288
|
-
web/client/dist/assets/Input-
|
|
289
|
-
web/client/dist/assets/Lineage-
|
|
290
|
-
web/client/dist/assets/ListboxShow-
|
|
291
|
-
web/client/dist/assets/ModelLineage-
|
|
292
|
-
web/client/dist/assets/Models-
|
|
293
|
-
web/client/dist/assets/Page-
|
|
294
|
-
web/client/dist/assets/Plan-
|
|
295
|
-
web/client/dist/assets/PlusCircleIcon-
|
|
296
|
-
web/client/dist/assets/ReportErrors-
|
|
297
|
-
web/client/dist/assets/Root-
|
|
298
|
-
web/client/dist/assets/SearchList-
|
|
299
|
-
web/client/dist/assets/SelectEnvironment-
|
|
300
|
-
web/client/dist/assets/SourceList-
|
|
301
|
-
web/client/dist/assets/SourceListItem-
|
|
302
|
-
web/client/dist/assets/SplitPane-
|
|
303
|
-
web/client/dist/assets/Tests-
|
|
304
|
-
web/client/dist/assets/Welcome-
|
|
273
|
+
web/client/dist/index.html,sha256=IYsuxQlHwelUGnx0mMO92L-JbirTk8X_8j5UQnASSMk,5472
|
|
274
|
+
web/client/dist/assets/Audits-717Verqx.js,sha256=DKYlx-0yZKY1DwwsfeKRByeGk-c1x5qONg187zIMIwM,1041
|
|
275
|
+
web/client/dist/assets/Banner-CgwLz5R5.js,sha256=ANYCoXV_Sx2-R5EzRJGFd2b2tEAetMqv758KttfYu2U,1549
|
|
276
|
+
web/client/dist/assets/ChevronDownIcon-BmxRmFkN.js,sha256=LL3sU8-Jbd3eFal4FH9DPE6GC2fljLrxqyYo3AwBQVs,553
|
|
277
|
+
web/client/dist/assets/ChevronRightIcon-c8Ny36P1.js,sha256=39iY8r7ag50BtGLna6w13JSEhBL6hV3VO2fg0tntqiY,553
|
|
278
|
+
web/client/dist/assets/Content-CgUj3NrT.js,sha256=_JpuKHMJvk4RROeQRIAPWHsdaI7kEnuhjMeo6L3EOw8,803
|
|
279
|
+
web/client/dist/assets/Content-CwJTYkxI.js,sha256=ai-1snk4zTY1r9hanUKNhgbDTY3I130Hhxz2EzuMO8w,37525
|
|
280
|
+
web/client/dist/assets/Data-Dk9X2oU9.js,sha256=2FLC3dSsq-syvJBmsuTCSN1g4eBFPQpNsSuEbKJaFvY,984
|
|
281
|
+
web/client/dist/assets/DataCatalog-k2DFt3HQ.js,sha256=d60JYgCN9a6SL8H_l-IZWbM0CHqUf2Cr1d7KksUkNo0,122464
|
|
282
|
+
web/client/dist/assets/Editor-9oBtB7GG.js,sha256=VXuEoQ6kHkDuupa8iq3i9P8cA-RaGGribUt0G1cIfvM,1490
|
|
283
|
+
web/client/dist/assets/Editor-qYDD_MAR.js,sha256=WDWO3ScrOdXO_EWfSFPna1R9GHILwLdRtANomUb9CBY,43614
|
|
284
|
+
web/client/dist/assets/Errors-SCnfp9wM.js,sha256=po4XQ-iJZd5P6jkaVuu-8jdycMyHshYSQwkjo8a7fvM,1361
|
|
285
|
+
web/client/dist/assets/FileExplorer-DWAYRX_y.js,sha256=kBewMlcUHwSsIh4V_9LfnI1v_Um7-04Q_Tr-D0TBjvc,87619
|
|
286
|
+
web/client/dist/assets/Footer-SkJqpLMV.js,sha256=JosXlanbuWwymT_PomcKK9NQBDHmE3Q5uxl0rSqGDHs,700
|
|
287
|
+
web/client/dist/assets/Header-CjI7SntD.js,sha256=l927omAj5WxKFMP-qQ7jjuoZTsQZTXCWQ-S9vRjD8GU,11424
|
|
288
|
+
web/client/dist/assets/Input-CgGiu7YD.js,sha256=PiZtRd0N87xbLpg2x0pCWj4v5y_KBWtJZkft8fv9VbE,54788
|
|
289
|
+
web/client/dist/assets/Lineage-DVq-CJMC.js,sha256=kWPceJJOdCZbSUzDu1HVfx-aQbY7ceKt4pQj1ySr3rI,1002
|
|
290
|
+
web/client/dist/assets/ListboxShow-ZJMgV_zm.js,sha256=yw6j3OQ3YU1JHAcWdZvH7XqJ6YtANujczYIe5AeM6pE,29911
|
|
291
|
+
web/client/dist/assets/ModelLineage-DTLuCeiY.js,sha256=csVEwdRt7LXPUg6dLpmVI_MtcbmqvZxO2NQZ4Ni1FLE,15546
|
|
292
|
+
web/client/dist/assets/Models-U53foXav.js,sha256=Iw2T8W91HLll_lQ0POT4ogvrV8FPzO0FAGrvxruUNvc,2194
|
|
293
|
+
web/client/dist/assets/Page-BfsnjNUY.js,sha256=ibu5xHdOLan8jydbqex7D5eZ0A_4wOTcBIbdoDZQsSw,589
|
|
294
|
+
web/client/dist/assets/Plan-8FKkRAM8.js,sha256=hPuiFdaSQfBiw2Mt0rgjV-r24sJ_gZDyWPXTnhSdi6I,666
|
|
295
|
+
web/client/dist/assets/PlusCircleIcon-CErWR_UX.js,sha256=mZGMuN9EpL_QG7ySfKnVW12VUBt9KqDsqZFxYanAtH8,11698
|
|
296
|
+
web/client/dist/assets/ReportErrors-DTA5fMVE.js,sha256=n0pDsbR2ryT3OvzBo0Iz2ji4ll9bXSPlJ4Mtdm6c6-0,5419
|
|
297
|
+
web/client/dist/assets/Root-A_G5_k98.js,sha256=5Jy03J_dxLfDNmG5NrzZ_7P3sgcBWxSPpcd6TFx3qH4,42195
|
|
298
|
+
web/client/dist/assets/SearchList-C-oF3biB.js,sha256=EWXjqQ8nzS0N-P7QgxL5NkZP1jb1z-DcrZxWT9fyeIk,291983
|
|
299
|
+
web/client/dist/assets/SelectEnvironment-BEVWGY0-.js,sha256=vzHUB74xS0Vr73mffC3G-VIpADssZAVUING6Jg9BFuA,37637
|
|
300
|
+
web/client/dist/assets/SourceList-Dv3xPrd_.js,sha256=Lq1ykNk7eKxmmiOGsmD4R0PrMgDzJS-xaXUnYSAngfM,3205
|
|
301
|
+
web/client/dist/assets/SourceListItem-mVYtYF13.js,sha256=Scz0WY52nc2Io9Wnk0D18Gxr-lFZUEgSOfDZQ06vkRE,1106
|
|
302
|
+
web/client/dist/assets/SplitPane-DPKB1cRo.js,sha256=QIvCjufUvm2BmhLHkeRcJltLbi0INEhlgyRB-8WooDA,10439
|
|
303
|
+
web/client/dist/assets/Tests-CH1RUGi1.js,sha256=P1fF2XMIaTQpziUP9McfYXnXYHvGslU2PBAfBtLZtJ8,1014
|
|
304
|
+
web/client/dist/assets/Welcome-CcphRk0f.js,sha256=PpbAmFq4oL_owC1gLSr-kir922Y91An-5I19h_uXEKo,354
|
|
305
305
|
web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js,sha256=WQq4BXvAMsPhT58adqrv_QHaYJQT-xKIiBnKBDPB-uk,239
|
|
306
|
-
web/client/dist/assets/context-
|
|
307
|
-
web/client/dist/assets/context-
|
|
308
|
-
web/client/dist/assets/editor-
|
|
309
|
-
web/client/dist/assets/file-
|
|
310
|
-
web/client/dist/assets/floating-ui.react-dom-
|
|
306
|
+
web/client/dist/assets/context-DGN-T77G.js,sha256=1wsdyeqIQi7NSIUIpHLyVlgaMK6DJbJU_P31BqS848Y,2053023
|
|
307
|
+
web/client/dist/assets/context-JaECki6C.js,sha256=Ruv4Jnitbm9bMkh1abCx00Tbl3SQajRDHHjGIKYmSdQ,4517
|
|
308
|
+
web/client/dist/assets/editor-DfvuLZRc.js,sha256=JKoS_Q_Bmh-pWDdOJ192SnvW0VR3YSJt8n4hERq-ifc,7858
|
|
309
|
+
web/client/dist/assets/file-DrmdjHM2.js,sha256=yh3_XnGI0i5DlPtJFgYsfHD_sANPHLvqtHzSjrOf798,2349
|
|
310
|
+
web/client/dist/assets/floating-ui.react-dom-CkbMeDhm.js,sha256=65AM4MBGJhoJOJ9nurEs3M2AOawFgngmPyqS5RxI1m8,22264
|
|
311
311
|
web/client/dist/assets/help-6Q7f7fjd.js,sha256=93Iri9PzpAiPgCyRsrQwABjP2jomAUNR7y2OqHxPf34,445
|
|
312
|
-
web/client/dist/assets/help-
|
|
313
|
-
web/client/dist/assets/index-
|
|
314
|
-
web/client/dist/assets/index-
|
|
315
|
-
web/client/dist/assets/plan-
|
|
316
|
-
web/client/dist/assets/popover-
|
|
317
|
-
web/client/dist/assets/project-
|
|
312
|
+
web/client/dist/assets/help-D4T-Hhu6.js,sha256=np4E-9hIQnqYjFwIDhLMhUIk_0b1BlGBf5NXyN0e1yI,57842
|
|
313
|
+
web/client/dist/assets/index-tpUXT8yx.js,sha256=SyvQOtQoh1YXqvOUjulmui9LzzNWd6kdBpxZnpe3-_Q,531311
|
|
314
|
+
web/client/dist/assets/index-uSmLm2pE.js,sha256=NdpedPicUDl08Aa-WYij0efhAn0kIxSNPAYfktKHqyM,13582
|
|
315
|
+
web/client/dist/assets/plan-Cttl620W.js,sha256=CMqA9bDBDuzJANotydnniyPE1F7DfkufDLBZDA4Yp04,13754
|
|
316
|
+
web/client/dist/assets/popover-k1WuHpnU.js,sha256=i0EKzSlI-3v-Z5rxdAITZqntCVh3efLuPYXzsVCpswU,68101
|
|
317
|
+
web/client/dist/assets/project-C_xj-Y_c.js,sha256=ubr6PgRU7bm3vcd9aXjUkr5OVkPbiP5UpTEahKT8PCs,3338
|
|
318
318
|
web/client/dist/css/base.css,sha256=JApDmQihY7DRy5Bd30uYMm5NdMKm0QsEOMBsOuK7gyU,9048
|
|
319
319
|
web/client/dist/css/design.css,sha256=9VTHN-aYFVW6I53jUWbV8qaqo87tXyZTYSWFLC_sRQY,17057
|
|
320
320
|
web/client/dist/favicons/favicon.svg,sha256=ZPNT00J77RHUj6Nlh6Z4Puxnp_oq9RSqACjomhDRUXE,1586
|
|
@@ -386,8 +386,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
386
386
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
387
387
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
388
388
|
web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
|
|
389
|
-
sqlmesh-0.184.3.
|
|
390
|
-
sqlmesh-0.184.3.
|
|
391
|
-
sqlmesh-0.184.3.
|
|
392
|
-
sqlmesh-0.184.3.
|
|
393
|
-
sqlmesh-0.184.3.
|
|
389
|
+
sqlmesh-0.184.3.dev18.dist-info/METADATA,sha256=BC8TqLPGZGKa4cmPfa4UzfZOJd847tN6jrfDVwzhVyg,25499
|
|
390
|
+
sqlmesh-0.184.3.dev18.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
391
|
+
sqlmesh-0.184.3.dev18.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
392
|
+
sqlmesh-0.184.3.dev18.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
393
|
+
sqlmesh-0.184.3.dev18.dist-info/RECORD,,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as n,j as s,O as f,e as t,H as c,B as p,m as x,l as d}from"./index-
|
|
1
|
+
import{x as n,j as s,O as f,e as t,H as c,B as p,m as x,l as d}from"./index-tpUXT8yx.js";import{P as j}from"./Page-BfsnjNUY.js";import{u as h}from"./project-C_xj-Y_c.js";import{S as v}from"./SourceList-Dv3xPrd_.js";import{S as A}from"./SourceListItem-mVYtYF13.js";import"./SplitPane-DPKB1cRo.js";import"./file-DrmdjHM2.js";import"./Input-CgGiu7YD.js";import"./floating-ui.react-dom-CkbMeDhm.js";import"./index-uSmLm2pE.js";function k(){const{pathname:a}=n(),i=h(e=>e.files),r=Array.from(i.values()).filter(e=>e.path.endsWith("audits"));return s.jsx(j,{sidebar:s.jsxs("div",{className:"flex flex-col w-full h-full",children:[s.jsx(v,{keyId:"basename",keyName:"basename",to:t.Audits,items:r,isActive:e=>`${t.Audits}/${e}`===a,className:"h-full",listItem:({to:e,name:o,description:m,text:l,disabled:u=!1})=>s.jsx(A,{to:e,name:o,text:l,description:m,disabled:u})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(p,{size:d.sm,variant:x.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,c as i,l as a,m as n,H as p}from"./index-
|
|
1
|
+
import{j as s,c as i,l as a,m as n,H as p}from"./index-tpUXT8yx.js";function l({variant:t=n.Neutral,size:e=a.md,isFull:r=!1,isCenter:u=!1,hasBackground:x=!0,hasBackgroundOnHover:f=!1,hasBorder:c=!1,children:m,className:b}){return s.jsx("div",{className:i("w-full text-sm px-4 overflow-hidden rounded-lg",e===a.sm&&"py-2",e===a.md&&"py-4",e===a.lg&&"py-6",r&&"h-full",u&&"justify-center items-center",c&&"border-2",w(t,x,f),b),children:m})}function g({className:t}){return s.jsx(p,{className:i("mx-4 w-full",t)})}function d({children:t,className:e}){return s.jsx("h4",{className:i("font-bold text-sm whitespace-nowrap text-left",e),children:t})}function o({children:t,className:e}){return s.jsx("p",{className:i("text-neutral-600",e),children:t})}l.Label=d;l.Description=o;l.Divider=g;function w(t,e=!0,r=!1){switch(t){case n.Primary:return[r?"hover:bg-primary-5":"",e?"bg-primary-5":"","text-primary-600 dark:text-primary-400"];case n.Success:return[r?"hover:bg-success-5":"",e?"bg-success-5":"","text-success-600 dark:text-success-400"];case n.Warning:return[r?"hover:bg-warning-5":"",e?"bg-warning-5":"","text-warning-600 dark:text-warning-400"];case n.Danger:return[r?"hover:bg-danger-5":"",e?"bg-danger-5":"","text-danger-600 dark:text-danger-400"];case n.Info:return[r?"hover:bg-info-5":"",e?"bg-info-5":"","text-info-600 dark:text-info-400"];case n.Neutral:return[r?"hover:bg-neutral-5":"",e?"bg-neutral-5":"","text-neutral-600 dark:text-neutral-400"];default:return["bg-transparent","text-neutral-600 dark:text-neutral-400"]}}export{l as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
1
|
+
import{r as e}from"./index-tpUXT8yx.js";function t({title:r,titleId:a,...l},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},l),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const c=e.forwardRef(t);export{c as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
1
|
+
import{r as e}from"./index-tpUXT8yx.js";function o({title:r,titleId:a,...t},l){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const i=e.forwardRef(o);export{i as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as a,Q as l,v as e,j as r,U as n,e as d}from"./index-
|
|
1
|
+
import{d as a,Q as l,v as e,j as r,U as n,e as d}from"./index-tpUXT8yx.js";import{D as u}from"./ReportErrors-DTA5fMVE.js";import"./PlusCircleIcon-CErWR_UX.js";import"./popover-k1WuHpnU.js";import"./floating-ui.react-dom-CkbMeDhm.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-DPKB1cRo.js";function v(){const{errors:i}=a(),{id:o}=l(),s=e(o)?void 0:Array.from(i).find(t=>t.id===o);return r.jsx("div",{className:"flex overflow-auto w-full h-full",children:e(s)?r.jsx(n,{link:d.Errors,description:e(o)?void 0:`Error ${o} Does Not Exist`,message:"Back To Errors"}):r.jsx("div",{className:"p-4 h-full w-full",children:r.jsx("div",{className:"w-full h-full p-4 rounded-lg bg-danger-5 text-danger-700",children:r.jsx(u,{error:s,scope:s.key,withSplitPane:!0})})})})}export{v as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as v,R as J,a as _,j as e,m as O,s as Qe,b as C,B as oe,v as E,l as T,c as w,M as De,f as V,I as Xe,J as de,i as I,K as Q,g as H,T as Me,H as ue,P as ye,C as es,A as $,q as ss,L as as,d as ns,k as ts,o as ls,p as is,Q as rs,U as os,e as cs}from"./index-vSJ8fwXa.js";import{u as W,S as ds,A as us,a as Ne,b as R,E as A,P as z,c as ms}from"./SelectEnvironment-phnYBEdf.js";import{u as j,a as Y,E as M}from"./plan-CzgwheKs.js";import{B as S}from"./Banner-DAsK-QL1.js";import{V as L,F as ke,a as Pe,p as ps}from"./PlusCircleIcon-BXu3EzDy.js";import{K as fs,L as $e,V as hs,y as xs,p as js,o as ce,$ as vs,W as gs,X as ys,_ as ws,Y as bs,a as Re,Z as Ns,z as se}from"./popover-xfBVdLdC.js";import{I as K}from"./Input-CRK-1wuV.js";import{H as ks,V as Ps,Q as Ts,w as Cs,u as Fs,a as As,l as Ss,T as Ds,N as Rs,U as Es,j as Bs,p as _s}from"./ListboxShow-DrFIArL6.js";import{u as ze}from"./project-ox5qB7wx.js";import{F as we}from"./context-DrZJiN75.js";import"./ModelLineage-voejafVo.js";import"./editor-DHvEZynA.js";import"./file-CiUz225S.js";import"./SearchList-Bts2_IsQ.js";import"./help-6Q7f7fjd.js";import"./floating-ui.react-dom-CWmFdbmT.js";import"./ChevronDownIcon-DzDManbV.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-DIGuOOMT.js";import"./index-50Jk2AVj.js";function Os({title:s,titleId:a,...t},r){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},t),s?v.createElement("title",{id:a},s):null,v.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const X=v.forwardRef(Os);let Te=v.createContext(null);Te.displayName="GroupContext";let Is=v.Fragment;function Ms(s){var a;let[t,r]=v.useState(null),[l,i]=Ts(),[c,u]=Cs(),o=v.useMemo(()=>({switch:t,setSwitch:r}),[t,r]),d={},m=s,n=$e();return J.createElement(u,{name:"Switch.Description",value:c},J.createElement(i,{name:"Switch.Label",value:l,props:{htmlFor:(a=o.switch)==null?void 0:a.id,onClick(h){t&&(hs(h.currentTarget)&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(Te.Provider,{value:o},n({ourProps:d,theirProps:m,slot:{},defaultTag:Is,name:"Switch.Group"}))))}let $s="button";function zs(s,a){var t;let r=v.useId(),l=Fs(),i=As(),{id:c=l||`headlessui-switch-${r}`,disabled:u=i||!1,checked:o,defaultChecked:d,onChange:m,name:n,value:h,form:p,autoFocus:f=!1,...x}=s,F=v.useContext(Te),[B,D]=v.useState(null),N=v.useRef(null),k=xs(N,a,F===null?null:F.setSwitch,D),g=Ss(d),[P,Z]=Ds(o,m,g??!1),je=js(),[le,b]=v.useState(!1),ie=ce(()=>{b(!0),Z==null||Z(!P),je.nextFrame(()=>{b(!1)})}),re=ce(U=>{if(Ns(U.currentTarget))return U.preventDefault();U.preventDefault(),ie()}),ve=ce(U=>{U.key===Re.Space?(U.preventDefault(),ie()):U.key===Re.Enter&&_s(U.currentTarget)}),Le=ce(U=>U.preventDefault()),Ve=Rs(),Ge=Es(),{isFocusVisible:Fe,focusProps:He}=vs({autoFocus:f}),{isHovered:Ae,hoverProps:Ke}=gs({isDisabled:u}),{pressed:Se,pressProps:Ze}=ys({disabled:u}),qe=v.useMemo(()=>({checked:P,disabled:u,hover:Ae,focus:Fe,active:Se,autofocus:f,changing:le}),[P,Ae,Fe,Se,u,le,f]),We=ws({id:c,ref:k,role:"switch",type:bs(s,B),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":Ve,"aria-describedby":Ge,disabled:u||void 0,autoFocus:f,onClick:re,onKeyUp:ve,onKeyPress:Le},He,Ke,Ze),Ye=v.useCallback(()=>{if(g!==void 0)return Z==null?void 0:Z(g)},[Z,g]),Je=$e();return J.createElement(J.Fragment,null,n!=null&&J.createElement(Bs,{disabled:u,data:{[n]:h||"on"},overrides:{type:"checkbox",checked:P},form:p,onReset:Ye}),Je({ourProps:We,theirProps:x,slot:qe,defaultTag:$s,name:"Switch"}))}let Us=fs(zs),Ls=Ms,Vs=Ps,Gs=ks,ge=Object.assign(Us,{Group:Ls,Label:Vs,Description:Gs});function Hs(){const s=_(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(S,{variant:O.Warning,children:e.jsx(L,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(S.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ke,{className:"w-5 text-warning-500"}):e.jsx(Pe,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx(L.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(S.Description,{children:"Prod will be completely backfilled in order to ensure there are no data gaps. After this is applied, it is recommended to validate further changes in a dev environment before deploying to production."})})]})})})})}function Ks(s=0){return v.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function Zs({run:s,apply:a,cancel:t,reset:r}){const l=Qe(),{change_categorization:i}=W(),c=_(b=>b.modules),u=_(b=>b.environment),o=_(b=>b.environments),d=_(b=>b.addConfirmation),m=_(b=>b.setShowConfirmation),n=j(b=>b.planAction),h=j(b=>b.planOverview),p=j(b=>b.planApply),f=j(b=>b.planCancel),x=Ks();function F(b){b.stopPropagation(),r()}function B(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const ie=u.isProd&&C(u.isInitial),re=Array.from(i.values()).some(ve=>E(ve.category));ie?d({headline:"Applying Plan Directly On Prod Environment!",tagline:"Safer choice will be to select or add new environment first.",description:"Are you sure you want to apply your changes directly on prod?",yesText:`Yes, Run ${u.name}`,noText:"No, Cancel",action:a,details:re?["ATTENTION!","[Breaking Change] category will be applied to all uncategorized changes"]:void 0,children:e.jsxs("div",{className:"mt-5 pt-4",children:[e.jsx("h4",{className:"mb-2",children:`${o.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[o.size>1&&e.jsx(ds,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{m(!1)},size:T.md}),e.jsx(us,{className:"w-full",size:T.md,onAdd:()=>{m(!1)}})]})]})}):re?d({headline:"Some changes are missing categorization!",description:"Are you sure you want to proceed?",details:["[Breaking Change] category will be applied to all uncategorized changes"],yesText:"Yes, Apply",noText:"No, Cancel",action:a}):a()}function k(b){b.stopPropagation(),s()}const g=h.isFailed||p.isFailed||f.isSuccessful,P=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(g),Z=n.isApplying||f.isCancelling||p.isRunning&&h.isFinished,je=g||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),le=c.showHistoryNavigation;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between pt-2 pl-4 pr-2 pb-2",children:[e.jsx("div",{className:"flex w-full items-center",children:e.jsx(se,{appear:!0,show:P,enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",as:"div",children:P&&e.jsx(oe,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:x,variant:f.isSuccessful?O.Danger:O.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[M.RunningTask,M.Running,M.Run,M.Applying,M.ApplyBackfill,M.ApplyVirtual,M.ApplyChangesAndBackfill,M.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[Z&&e.jsx(oe,{onClick:B,variant:O.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[M.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),je&&e.jsx(oe,{onClick:F,variant:O.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),le&&e.jsx(oe,{onClick:D,variant:O.Info,children:"Go Back"})]})]})})}function qs({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:c}){return e.jsxs(ge.Group,{as:"div",className:"m-1",children:[e.jsxs(ge,{checked:i?!1:a,onChange:t,className:w("flex relative border-secondary-30 rounded-full m-0","shrink-0 focus:outline-none ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100 focus:border-secondary-500 focus-visible:ring-opacity-75","transition duration-200 ease-in-out",a?"bg-secondary-500":"bg-secondary-20",c,i?"opacity-50 cursor-not-allowed":"cursor-pointer",l===T.sm&&"h-[14px] w-6 focus:ring-1 border",l===T.md&&"h-5 w-10 focus:ring-2 border-2",l===T.lg&&"h-7 w-14 focus:ring-4 border-2"),disabled:i,children:[e.jsx("span",{className:"sr-only",children:r}),e.jsx("span",{"aria-hidden":"true",className:w("pointer-events-none inline-block transform rounded-full shadow-md transition duration-200 ease-in-out","bg-light",l===T.sm&&"h-3 w-3",l===T.md&&"h-4 w-4",l===T.lg&&"h-6 w-6",a&&l===T.sm&&"translate-x-[10px]",a&&l===T.md&&"translate-x-5",a&&l===T.lg&&"translate-x-7")})]}),s!=null&&e.jsx(ge.Label,{className:w("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function q({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:w("flex justify-between",i),children:[e.jsxs("label",{className:"block mb-1 px-3 text-sm font-bold",children:[s,e.jsx("small",{className:"block text-xs text-neutral-500",children:a})]}),e.jsx(qs,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ws({disabled:s=!1,className:a}){const t=Ne(),{start:r,end:l,isInitialPlanRun:i}=W();return e.jsxs("div",{className:w("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(K,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2023-12-13",value:r,onInput:o=>{o.stopPropagation(),t({type:R.DateStart,start:o.target.value})}})}),e.jsx(K,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2022-12-13",value:l,onInput:o=>{o.stopPropagation(),t({type:R.DateEnd,end:o.target.value})}})})]})}function Ys(){const s=Ne(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:c,restate_models:u,isInitialPlanRun:o,create_from:d,include_unmodified:m}=W(),n=v.useRef(null),h=j(N=>N.planAction),p=j(N=>N.planOverview),f=j(N=>N.planApply),x=_(N=>N.environment),F=_(N=>N.environments),B=De.getOnlyRemote(Array.from(F));v.useEffect(()=>{s({type:R.PlanOptions,...p.plan_options,skip_tests:!1})},[]);const D=h.isProcessing||h.isDone||f.isFinished||p.isLatest&&C(h.isRun)||p.isVirtualUpdate;return v.useEffect(()=>{var N;E(n.current)||h.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,h]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:w(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ws,{className:w(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(S,{children:e.jsx(L,{defaultOpen:h.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{ref:n,className:w("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(S.Label,{className:"mr-2 text-sm w-full",children:[e.jsx("span",{children:"Additional Options"}),D&&e.jsx("span",{className:"ml-1",children:"(Read Only)"})]}),N?e.jsx(ke,{className:"h-5 w-5 text-neutral-400"}):e.jsx(Pe,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs(L.Panel,{unmount:!1,className:w("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:w(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(x.isProd)&&e.jsx(K,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:B.length<2,children:({className:k,disabled:g})=>e.jsx(K.Selector,{className:w(k,"w-full"),list:De.getOnlyRemote(Array.from(F)).filter(P=>P!==x).map(P=>({value:P.name,text:P.name})),onChange:P=>{s({type:R.PlanOptions,create_from:P})},value:d,disabled:g})}),e.jsx(K,{className:"w-full",label:"Restate Models",info:`Restate data for specified models and models
|
|
1
|
+
import{r as v,R as J,a as _,j as e,m as O,s as Qe,b as C,B as oe,v as E,l as T,c as w,M as De,f as V,I as Xe,J as de,i as I,K as Q,g as H,T as Me,H as ue,P as ye,C as es,A as $,q as ss,L as as,d as ns,k as ts,o as ls,p as is,Q as rs,U as os,e as cs}from"./index-tpUXT8yx.js";import{u as W,S as ds,A as us,a as Ne,b as R,E as A,P as z,c as ms}from"./SelectEnvironment-BEVWGY0-.js";import{u as j,a as Y,E as M}from"./plan-Cttl620W.js";import{B as S}from"./Banner-CgwLz5R5.js";import{V as L,F as ke,a as Pe,p as ps}from"./PlusCircleIcon-CErWR_UX.js";import{K as fs,L as $e,V as hs,y as xs,p as js,o as ce,$ as vs,W as gs,X as ys,_ as ws,Y as bs,a as Re,Z as Ns,z as se}from"./popover-k1WuHpnU.js";import{I as K}from"./Input-CgGiu7YD.js";import{H as ks,V as Ps,Q as Ts,w as Cs,u as Fs,a as As,l as Ss,T as Ds,N as Rs,U as Es,j as Bs,p as _s}from"./ListboxShow-ZJMgV_zm.js";import{u as ze}from"./project-C_xj-Y_c.js";import{F as we}from"./context-DGN-T77G.js";import"./ModelLineage-DTLuCeiY.js";import"./editor-DfvuLZRc.js";import"./file-DrmdjHM2.js";import"./SearchList-C-oF3biB.js";import"./help-6Q7f7fjd.js";import"./floating-ui.react-dom-CkbMeDhm.js";import"./ChevronDownIcon-BmxRmFkN.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-Dv3xPrd_.js";import"./index-uSmLm2pE.js";function Os({title:s,titleId:a,...t},r){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},t),s?v.createElement("title",{id:a},s):null,v.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const X=v.forwardRef(Os);let Te=v.createContext(null);Te.displayName="GroupContext";let Is=v.Fragment;function Ms(s){var a;let[t,r]=v.useState(null),[l,i]=Ts(),[c,u]=Cs(),o=v.useMemo(()=>({switch:t,setSwitch:r}),[t,r]),d={},m=s,n=$e();return J.createElement(u,{name:"Switch.Description",value:c},J.createElement(i,{name:"Switch.Label",value:l,props:{htmlFor:(a=o.switch)==null?void 0:a.id,onClick(h){t&&(hs(h.currentTarget)&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(Te.Provider,{value:o},n({ourProps:d,theirProps:m,slot:{},defaultTag:Is,name:"Switch.Group"}))))}let $s="button";function zs(s,a){var t;let r=v.useId(),l=Fs(),i=As(),{id:c=l||`headlessui-switch-${r}`,disabled:u=i||!1,checked:o,defaultChecked:d,onChange:m,name:n,value:h,form:p,autoFocus:f=!1,...x}=s,F=v.useContext(Te),[B,D]=v.useState(null),N=v.useRef(null),k=xs(N,a,F===null?null:F.setSwitch,D),g=Ss(d),[P,Z]=Ds(o,m,g??!1),je=js(),[le,b]=v.useState(!1),ie=ce(()=>{b(!0),Z==null||Z(!P),je.nextFrame(()=>{b(!1)})}),re=ce(U=>{if(Ns(U.currentTarget))return U.preventDefault();U.preventDefault(),ie()}),ve=ce(U=>{U.key===Re.Space?(U.preventDefault(),ie()):U.key===Re.Enter&&_s(U.currentTarget)}),Le=ce(U=>U.preventDefault()),Ve=Rs(),Ge=Es(),{isFocusVisible:Fe,focusProps:He}=vs({autoFocus:f}),{isHovered:Ae,hoverProps:Ke}=gs({isDisabled:u}),{pressed:Se,pressProps:Ze}=ys({disabled:u}),qe=v.useMemo(()=>({checked:P,disabled:u,hover:Ae,focus:Fe,active:Se,autofocus:f,changing:le}),[P,Ae,Fe,Se,u,le,f]),We=ws({id:c,ref:k,role:"switch",type:bs(s,B),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":Ve,"aria-describedby":Ge,disabled:u||void 0,autoFocus:f,onClick:re,onKeyUp:ve,onKeyPress:Le},He,Ke,Ze),Ye=v.useCallback(()=>{if(g!==void 0)return Z==null?void 0:Z(g)},[Z,g]),Je=$e();return J.createElement(J.Fragment,null,n!=null&&J.createElement(Bs,{disabled:u,data:{[n]:h||"on"},overrides:{type:"checkbox",checked:P},form:p,onReset:Ye}),Je({ourProps:We,theirProps:x,slot:qe,defaultTag:$s,name:"Switch"}))}let Us=fs(zs),Ls=Ms,Vs=Ps,Gs=ks,ge=Object.assign(Us,{Group:Ls,Label:Vs,Description:Gs});function Hs(){const s=_(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(S,{variant:O.Warning,children:e.jsx(L,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(S.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ke,{className:"w-5 text-warning-500"}):e.jsx(Pe,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx(L.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(S.Description,{children:"Prod will be completely backfilled in order to ensure there are no data gaps. After this is applied, it is recommended to validate further changes in a dev environment before deploying to production."})})]})})})})}function Ks(s=0){return v.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function Zs({run:s,apply:a,cancel:t,reset:r}){const l=Qe(),{change_categorization:i}=W(),c=_(b=>b.modules),u=_(b=>b.environment),o=_(b=>b.environments),d=_(b=>b.addConfirmation),m=_(b=>b.setShowConfirmation),n=j(b=>b.planAction),h=j(b=>b.planOverview),p=j(b=>b.planApply),f=j(b=>b.planCancel),x=Ks();function F(b){b.stopPropagation(),r()}function B(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const ie=u.isProd&&C(u.isInitial),re=Array.from(i.values()).some(ve=>E(ve.category));ie?d({headline:"Applying Plan Directly On Prod Environment!",tagline:"Safer choice will be to select or add new environment first.",description:"Are you sure you want to apply your changes directly on prod?",yesText:`Yes, Run ${u.name}`,noText:"No, Cancel",action:a,details:re?["ATTENTION!","[Breaking Change] category will be applied to all uncategorized changes"]:void 0,children:e.jsxs("div",{className:"mt-5 pt-4",children:[e.jsx("h4",{className:"mb-2",children:`${o.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[o.size>1&&e.jsx(ds,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{m(!1)},size:T.md}),e.jsx(us,{className:"w-full",size:T.md,onAdd:()=>{m(!1)}})]})]})}):re?d({headline:"Some changes are missing categorization!",description:"Are you sure you want to proceed?",details:["[Breaking Change] category will be applied to all uncategorized changes"],yesText:"Yes, Apply",noText:"No, Cancel",action:a}):a()}function k(b){b.stopPropagation(),s()}const g=h.isFailed||p.isFailed||f.isSuccessful,P=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(g),Z=n.isApplying||f.isCancelling||p.isRunning&&h.isFinished,je=g||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),le=c.showHistoryNavigation;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between pt-2 pl-4 pr-2 pb-2",children:[e.jsx("div",{className:"flex w-full items-center",children:e.jsx(se,{appear:!0,show:P,enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",as:"div",children:P&&e.jsx(oe,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:x,variant:f.isSuccessful?O.Danger:O.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[M.RunningTask,M.Running,M.Run,M.Applying,M.ApplyBackfill,M.ApplyVirtual,M.ApplyChangesAndBackfill,M.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[Z&&e.jsx(oe,{onClick:B,variant:O.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[M.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),je&&e.jsx(oe,{onClick:F,variant:O.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),le&&e.jsx(oe,{onClick:D,variant:O.Info,children:"Go Back"})]})]})})}function qs({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:c}){return e.jsxs(ge.Group,{as:"div",className:"m-1",children:[e.jsxs(ge,{checked:i?!1:a,onChange:t,className:w("flex relative border-secondary-30 rounded-full m-0","shrink-0 focus:outline-none ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100 focus:border-secondary-500 focus-visible:ring-opacity-75","transition duration-200 ease-in-out",a?"bg-secondary-500":"bg-secondary-20",c,i?"opacity-50 cursor-not-allowed":"cursor-pointer",l===T.sm&&"h-[14px] w-6 focus:ring-1 border",l===T.md&&"h-5 w-10 focus:ring-2 border-2",l===T.lg&&"h-7 w-14 focus:ring-4 border-2"),disabled:i,children:[e.jsx("span",{className:"sr-only",children:r}),e.jsx("span",{"aria-hidden":"true",className:w("pointer-events-none inline-block transform rounded-full shadow-md transition duration-200 ease-in-out","bg-light",l===T.sm&&"h-3 w-3",l===T.md&&"h-4 w-4",l===T.lg&&"h-6 w-6",a&&l===T.sm&&"translate-x-[10px]",a&&l===T.md&&"translate-x-5",a&&l===T.lg&&"translate-x-7")})]}),s!=null&&e.jsx(ge.Label,{className:w("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function q({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:w("flex justify-between",i),children:[e.jsxs("label",{className:"block mb-1 px-3 text-sm font-bold",children:[s,e.jsx("small",{className:"block text-xs text-neutral-500",children:a})]}),e.jsx(qs,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ws({disabled:s=!1,className:a}){const t=Ne(),{start:r,end:l,isInitialPlanRun:i}=W();return e.jsxs("div",{className:w("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(K,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2023-12-13",value:r,onInput:o=>{o.stopPropagation(),t({type:R.DateStart,start:o.target.value})}})}),e.jsx(K,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2022-12-13",value:l,onInput:o=>{o.stopPropagation(),t({type:R.DateEnd,end:o.target.value})}})})]})}function Ys(){const s=Ne(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:c,restate_models:u,isInitialPlanRun:o,create_from:d,include_unmodified:m}=W(),n=v.useRef(null),h=j(N=>N.planAction),p=j(N=>N.planOverview),f=j(N=>N.planApply),x=_(N=>N.environment),F=_(N=>N.environments),B=De.getOnlyRemote(Array.from(F));v.useEffect(()=>{s({type:R.PlanOptions,...p.plan_options,skip_tests:!1})},[]);const D=h.isProcessing||h.isDone||f.isFinished||p.isLatest&&C(h.isRun)||p.isVirtualUpdate;return v.useEffect(()=>{var N;E(n.current)||h.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,h]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:w(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ws,{className:w(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(S,{children:e.jsx(L,{defaultOpen:h.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{ref:n,className:w("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(S.Label,{className:"mr-2 text-sm w-full",children:[e.jsx("span",{children:"Additional Options"}),D&&e.jsx("span",{className:"ml-1",children:"(Read Only)"})]}),N?e.jsx(ke,{className:"h-5 w-5 text-neutral-400"}):e.jsx(Pe,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs(L.Panel,{unmount:!1,className:w("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:w(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(x.isProd)&&e.jsx(K,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:B.length<2,children:({className:k,disabled:g})=>e.jsx(K.Selector,{className:w(k,"w-full"),list:De.getOnlyRemote(Array.from(F)).filter(P=>P!==x).map(P=>({value:P.name,text:P.name})),onChange:P=>{s({type:R.PlanOptions,create_from:P})},value:d,disabled:g})}),e.jsx(K,{className:"w-full",label:"Restate Models",info:`Restate data for specified models and models
|
|
2
2
|
downstream from the one specified. For production
|
|
3
3
|
environment, all related model versions will have
|
|
4
4
|
their intervals wiped, but only the current
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as x,a as m,v as h,P as a,a4 as c,a5 as D,a6 as P,r as T,j as u}from"./index-
|
|
1
|
+
import{Q as x,a as m,v as h,P as a,a4 as c,a5 as D,a6 as P,r as T,j as u}from"./index-tpUXT8yx.js";import{g as b,T as g}from"./help-D4T-Hhu6.js";import{u as r}from"./editor-DfvuLZRc.js";import"./index-uSmLm2pE.js";import"./floating-ui.react-dom-CkbMeDhm.js";import"./Input-CgGiu7YD.js";import"./file-DrmdjHM2.js";const d=24*60*60*1e3;function S(){const{modelName:o}=x(),p=m(e=>e.models),s=m(e=>e.lastSelectedModel),v=r(e=>e.previewTable),i=r(e=>e.setPreviewQuery),n=r(e=>e.setPreviewTable),t=h(o)||o===(s==null?void 0:s.name)?s:p.get(encodeURI(o)),l={model:t.displayName,start:a(c(Date.now()-d)),end:a(new Date),execution_time:a(c(Date.now()-d)),limit:1e3},{refetch:f}=D(l),{refetch:w}=P(l);return T.useEffect(()=>{i(void 0),n(void 0),f().then(({data:e})=>{i(e==null?void 0:e.sql)}),w().then(({data:e})=>{n(b(e))})},[t]),u.jsx("div",{className:"flex overflow-hidden w-full h-full px-2",children:u.jsx(g,{headline:t==null?void 0:t.displayName,data:v??[[],[]]})})}export{S as default};
|