diff --git a/src/vtlengine/API/_InternalApi.py b/src/vtlengine/API/_InternalApi.py index 15ab6be7..cb990e6c 100644 --- a/src/vtlengine/API/_InternalApi.py +++ b/src/vtlengine/API/_InternalApi.py @@ -197,7 +197,10 @@ def load_vtl(input: Union[str, Path]): the file. """ if isinstance(input, str): - return input + if os.path.exists(input): + input = Path(input) + else: + return input if not isinstance(input, Path): raise Exception('Invalid vtl file. Input is not a Path object') if not input.exists(): diff --git a/src/vtlengine/API/__init__.py b/src/vtlengine/API/__init__.py index d1a4b403..97691965 100644 --- a/src/vtlengine/API/__init__.py +++ b/src/vtlengine/API/__init__.py @@ -148,7 +148,7 @@ def run(script: Union[str, Path], data_structures: Union[dict, Path, List[Union[ The data structure information is contained in the JSON file given, and establish the datatype (string, integer or number), - and the role that each component is going to have (Identifier or Measure). + and the role that each component is going to have (Identifier, Attribute or Measure). It can be a dictionary or a path to the JSON file or folder that contains it. Moreover, a csv file with the data to operate with is going to be loaded.