Skip to content

Commit

Permalink
Fixes already opened transaction issue
Browse files Browse the repository at this point in the history
For #602
  • Loading branch information
drewbanin committed Dec 14, 2017
1 parent 6dbe79b commit 95b2a16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dbt/adapters/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ def add_begin_query(cls, profile, name):
def create_schema(cls, profile, schema, model_name=None):
logger.debug('Creating schema "%s".', schema)
sql = cls.get_create_schema_sql(schema)
return cls.add_query(profile, sql, model_name, select_schema=False)
res = cls.add_query(profile, sql, model_name, select_schema=False)

cls.commit_if_has_connection(profile, model_name)

return res

@classmethod
def get_existing_schemas(cls, profile, model_name=None):
Expand Down

0 comments on commit 95b2a16

Please sign in to comment.