Skip to content

Commit

Permalink
fix: sqa deprecations for airflow providers
Browse files Browse the repository at this point in the history
  • Loading branch information
dondaum committed Apr 27, 2024
1 parent 25f901a commit adcf9d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -1506,14 +1506,15 @@ def add_user(
user.username = username
user.email = email
user.active = True
self.get_session.add(user)
user.roles = role if isinstance(role, list) else [role]
if hashed_password:
user.password = hashed_password
else:
user.password = generate_password_hash(password)
self.get_session.add(user)
self.get_session.commit()
log.info(const.LOGMSG_INF_SEC_ADD_USER, username)

return user
except Exception as e:
log.error(const.LOGMSG_ERR_SEC_ADD_USER, e)
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/openlineage/utils/sql.py
Expand Up @@ -149,7 +149,7 @@ def create_information_schema_query(
sqlalchemy_engine: Engine | None = None,
) -> str:
"""Create query for getting table schemas from information schema."""
metadata = MetaData(sqlalchemy_engine)
metadata = MetaData()
select_statements = []
# Don't iterate over tables hierarchy, just pass it to query single information schema table
if use_flat_cross_db_query:
Expand Down

0 comments on commit adcf9d4

Please sign in to comment.