You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a subclass defined like this to store data in MS SQL Server. I could use the python upgrade function to create the tables and I can use the custom_module.py file in another python file, but when I try to use the module and class in the dagster.yaml file to set the run_storage to the custom class and configure the connection_string in the dagster file.
Both the dagster.yaml file and the custom_module.py file are in the same directory.
class SqlServerRunStorage(SqlRunStorage):
def init(self, connection_string: str):
self.connection_string = connection_string
# Create the SQLAlchemy engine
self._engine = create_engine(connection_string)
@contextmanager
def connect(self):
"""Provide a connection to the SQL Server database."""
conn = pyodbc.connect(self.connection_string)
try:
yield conn
finally:
conn.close()
def upgrade(self):
# Create tables without indexes
RunStorageSqlMetadata.create_all(self._engine)
I expected that the run storage could be set with the subclass based on the SqlRunStorage base class. But I keep getting the error that the module could not be found.
How to reproduce?
See provided code and use dagster dev to launch.
Dagster version
dagster, version 1.9.3
Deployment type
Local
Deployment details
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
By submitting this issue, you agree to follow Dagster's Code of Conduct.
The text was updated successfully, but these errors were encountered:
What's the issue?
I have a subclass defined like this to store data in MS SQL Server. I could use the python upgrade function to create the tables and I can use the custom_module.py file in another python file, but when I try to use the module and class in the dagster.yaml file to set the run_storage to the custom class and configure the connection_string in the dagster file.
Both the dagster.yaml file and the custom_module.py file are in the same directory.
class SqlServerRunStorage(SqlRunStorage):
def init(self, connection_string: str):
self.connection_string = connection_string
# Create the SQLAlchemy engine
self._engine = create_engine(connection_string)
Yaml file:
run_storage:
module: custom_module
class: SqlServerRunStorage
config:
conncetion_string: <connection_string>
What did you expect to happen?
I expected that the run storage could be set with the subclass based on the SqlRunStorage base class. But I keep getting the error that the module could not be found.
How to reproduce?
See provided code and use dagster dev to launch.
Dagster version
dagster, version 1.9.3
Deployment type
Local
Deployment details
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
By submitting this issue, you agree to follow Dagster's Code of Conduct.
The text was updated successfully, but these errors were encountered: