Commit b0728f7
fix(snowflake): child-task tolerance + SHOW for 3 remaining discovery loops
Two related changes per Eric's live-testing findings:
1. Child-task tolerance for EXECUTE TASK (the only-root-tasks rule):
Snowflake errors with "non-root task" when you EXECUTE TASK on a
child task — parents fire children via task-tree AFTER clauses. The
_task_asset (workspace) and snowflake_task_execute_asset (single-
entity) now wrap EXECUTE TASK in a try/except that catches the
"non-root task" error, logs an info message ("...is a child task —
skipping direct EXECUTE TASK (parent triggers it). Run the parent
task asset or wait for its schedule..."), and continues to emit
the materialization. SHOW TASKS metadata read still happens after.
Without this, materializing a child task in dg dev fails the asset
even though the parent run does exercise it via cascade.
2. SHOW ... IN SCHEMA for the 3 remaining INFORMATION_SCHEMA discovery
loops that hadn't been swapped yet:
- Stored procedures: INFORMATION_SCHEMA.PROCEDURES → SHOW PROCEDURES
IN SCHEMA. Column renames: PROCEDURE_NAME → NAME, PROCEDURE_CATALOG
dropped (use self.database), PROCEDURE_SCHEMA → SCHEMA_NAME,
ARGUMENT_SIGNATURE → ARGUMENTS.
- Stages: INFORMATION_SCHEMA.STAGES → SHOW STAGES IN SCHEMA.
Column renames: STAGE_NAME → NAME, STAGE_CATALOG → DATABASE_NAME,
STAGE_SCHEMA → SCHEMA_NAME, STAGE_URL → URL, STAGE_TYPE → TYPE.
- External tables: INFORMATION_SCHEMA.TABLES (with table_type =
'EXTERNAL TABLE' filter) → SHOW EXTERNAL TABLES IN SCHEMA.
Column renames: TABLE_NAME → NAME, TABLE_CATALOG → DATABASE_NAME,
TABLE_SCHEMA → SCHEMA_NAME. Also surfaces richer fields (location,
file_format_name, last_refreshed_on, owner).
Combined with the v0.6.1 swaps for dynamic tables / tasks / pipes /
MVs / alerts (materialize-time reads + DT sensor query), the full
workspace component now uses SHOW everywhere a least-privilege role
could hit "does not exist or not authorized" on INFORMATION_SCHEMA.
Per Eric: "The component has the same shape for every workspace import
(refresh/execute then read INFORMATION_SCHEMA). Each one is a future
failure waiting to happen on either the action OR the metadata read.
The SHOW alternative is privilege-light and exists for every entity
type."
L1 validation harness scorecard unchanged from v0.6.1:
PASS: 562 WARN: 0 FAIL: 41
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 468bd0e commit b0728f7
4 files changed
Lines changed: 70 additions & 59 deletions
File tree
- assets/data-warehouse/snowflake_task_execute_asset
- dagster_community_components
- integrations/snowflake_workspace
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
125 | 136 | | |
126 | 137 | | |
127 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
463 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
464 | 474 | | |
465 | 475 | | |
466 | 476 | | |
| |||
542 | 552 | | |
543 | 553 | | |
544 | 554 | | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
556 | 560 | | |
557 | 561 | | |
558 | 562 | | |
559 | | - | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
560 | 567 | | |
561 | 568 | | |
562 | 569 | | |
| |||
571 | 578 | | |
572 | 579 | | |
573 | 580 | | |
574 | | - | |
575 | | - | |
576 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
577 | 584 | | |
578 | 585 | | |
579 | 586 | | |
| |||
605 | 612 | | |
606 | 613 | | |
607 | 614 | | |
608 | | - | |
609 | | - | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
610 | 618 | | |
611 | 619 | | |
612 | 620 | | |
| |||
894 | 902 | | |
895 | 903 | | |
896 | 904 | | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
910 | 909 | | |
911 | 910 | | |
912 | 911 | | |
913 | | - | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
914 | 916 | | |
915 | 917 | | |
916 | 918 | | |
| |||
925 | 927 | | |
926 | 928 | | |
927 | 929 | | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
932 | 934 | | |
933 | 935 | | |
934 | 936 | | |
| |||
955 | 957 | | |
956 | 958 | | |
957 | 959 | | |
958 | | - | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
959 | 964 | | |
960 | 965 | | |
961 | 966 | | |
| |||
1052 | 1057 | | |
1053 | 1058 | | |
1054 | 1059 | | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1068 | 1064 | | |
1069 | 1065 | | |
1070 | 1066 | | |
1071 | | - | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1072 | 1072 | | |
1073 | 1073 | | |
1074 | 1074 | | |
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
1086 | | - | |
1087 | | - | |
| 1086 | + | |
| 1087 | + | |
1088 | 1088 | | |
1089 | 1089 | | |
1090 | 1090 | | |
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | | - | |
| 1138 | + | |
1139 | 1139 | | |
1140 | 1140 | | |
1141 | 1141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments