Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def update_dbt_project_vars(self, **vars_config: Dict[str, Any]):

def read_profiles_yml(profile_dir: str) -> Any:
with open(os.path.join(profile_dir, "profiles.yml"), "r") as file:
config = yaml.load(file, Loader=yaml.FullLoader)
config = yaml.load(file, Loader=yaml.SafeLoader)
obj = config["normalize"]["outputs"]["prod"]
return obj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def transform(self, integration_type: DestinationType, config: Dict[str, Any]):
data = pkgutil.get_data(self.__class__.__module__.split(".")[0], "transform_config/profile_base.yml")
if not data:
raise FileExistsError("Failed to load profile_base.yml")
base_profile = yaml.load(data, Loader=yaml.FullLoader)
base_profile = yaml.load(data, Loader=yaml.SafeLoader)

transformed_integration_config = {
DestinationType.BIGQUERY.value: self.transform_bigquery,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import pytest
from yaml import load
import yaml

try:
from yaml import CLoader as Loader
Expand All @@ -34,7 +35,7 @@ def load_config(path: str) -> Config:
pytest.fail(f"config file {path.absolute()} does not exist")

with open(str(path), "r") as file:
data = load(file, Loader=Loader)
data = load(file, Loader=yaml.SafeLoader)
return Config.parse_obj(data)


Expand Down Expand Up @@ -103,7 +104,7 @@ def load_yaml_or_json_path(path: Path):
if file_ext == ".json":
return json.loads(file_data)
elif file_ext == ".yaml":
return load(file_data, Loader=Loader)
return load(file_data, Loader=yaml.SafeLoader)
else:
raise RuntimeError("path must be a '.yaml' or '.json' file")

Expand Down