I would like to have our own copy of the MaStR database, hosted on a MS SQL server. Did I understand correctly, that this should be possible by passing the respective engine to the Mastr() instance?
I tried the following below:
from open_mastr import Mastrfrom sqlalchemy import create_engine
But then I get the following error:
_sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Column 'EinheitMastrNummer' in table 'basicunits' is of a type that is invalid for use as a key column in an index. (1919) (SQLExecDirectW); [42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Could not create constraint or index. See previous errors. (1750)")
Is that a bug or am I trying to do something that is not possible? What would be the best solution for me to create my own copy of the MaStR database, hosted on an MS SQL server?
I would like to have our own copy of the MaStR database, hosted on a MS SQL server. Did I understand correctly, that this should be possible by passing the respective engine to the Mastr() instance?
I tried the following below:
from open_mastr import Mastr
from sqlalchemy import create_engine
connection_string = 'mssql+pyodbc://@<SERVER>/MarketAnalysis?driver=ODBC+Driver+17+for+SQL+Server'
ma_engine = create_engine(connection_string)
db = Mastr(engine=ma_engine)
But then I get the following error: _sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Column 'EinheitMastrNummer' in table 'basicunits' is of a type that is invalid for use as a key column in an index. (1919) (SQLExecDirectW); [42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Could not create constraint or index. See previous errors. (1750)")
Is that a bug or am I trying to do something that is not possible? What would be the best solution for me to create my own copy of the MaStR database, hosted on an MS SQL server?