Skip to content

Commit

Permalink
fix: Updates dynamic tables query parsing to correctly handle tables …
Browse files Browse the repository at this point in the history
…that include "as" in their name (Snowflake-Labs#2329)
  • Loading branch information
dtiesling committed Jan 24, 2024
1 parent 23acda5 commit 36d32b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/resources/dynamic_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func ReadDynamicTable(d *schema.ResourceData, meta interface{}) error {
}
}
// trim up to " ..AS" and remove whitespace
query := strings.TrimSpace(text[strings.Index(text, "AS")+3:])
query := strings.TrimSpace(text[strings.Index(text, " AS ")+3:])
if err := d.Set("query", query); err != nil {
return err
}
Expand Down

0 comments on commit 36d32b3

Please sign in to comment.