Ian OLeary
04/05/2024, 1:45 PMTypeError: ConfigurableResourceFactory.__init__() takes 1 positional argument but 6 were given
File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_core\errors.py", line 287, in user_code_error_boundary
yield
File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_grpc\server.py", line 242, in __init__
loadable_targets = get_loadable_targets(
File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_grpc\utils.py", line 40, in get_loadable_targets
else loadable_targets_from_python_file(python_file, working_directory)
File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_core\workspace\autodiscovery.py", line 26, in loadable_targets_from_python_file
loaded_module = load_python_file(python_file, working_directory)
File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_core\code_pointer.py", line 83, in load_python_file
return import_module_from_path(module_name, python_file)
File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_seven\__init__.py", line 49, in import_module_from_path
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\user\Documents\GitHub\datawarehouse\meltano/orchestrate/dagster/repository.py", line 25, in <module>
"dbt": DbtCliResource(
I'm getting weird behavior with dagster. I had it working when it was in my old repo, but I had to move my project to another repository, and after running meltano install in that repo it isn't working.
from dagster_dbt import load_assets_from_dbt_project, DbtCliResource
DBT_PROJECT_PATH = str(Path(__file__).parent.parent.parent / "transform")
DBT_PROFILE_PATH = str(Path(__file__).parent.parent.parent / "transform/profiles/snowflake")
DBT_TARGET_PATH = str(Path(__file__).parent.parent.parent / "transform/target")
DBT_PROFILE = os.getenv('DBT_PROFILE')
DBT_TARGET = os.getenv('DBT_TARGET_PATH')
class MeltanoEnv(enum.Enum):
dev = enum.auto()
prod = enum.auto()
MELTANO_PROJECT_DIR = os.getenv("MELTANO_PROJECT_ROOT", os.getcwd())
MELTANO_BIN = os.getenv("MELTANO_BIN", "meltano")
resources= {
"dbt": DbtCliResource(
DBT_PROJECT_PATH,
DBT_PROFILE_PATH,
[],
DBT_TARGET,
DBT_PROFILE),
# "meltano": meltano_resource,
}
Here's what my repository.py looks like. I had just changed this to (ironically) fix the same issue I was having before I moved the repo. Side note - when I run the meltano invoke dagster:start
my command line doesn't have the green/blue colored text like it usually does. and the CLI level logs look a bit different so I don't know if my install is weird or something. I have meltano installed with pipx but I also tried creating a venv in my project with my old requirements installed and that failed too.Andy Carter
04/05/2024, 1:54 PMAndy Carter
04/05/2024, 1:55 PM@v0.1.0
at the end of your dagster_ext pip_url to revert to the older one. You might have 0.1.1 installed which allows you to use higher versions of dagster and dbtIan OLeary
04/05/2024, 2:00 PMIan OLeary
04/05/2024, 2:00 PM- name: dagster
variant: quantile-development
pip_url: dagster-ext==0.1.0 dbt-core~=1.7.0 dbt-snowflake~=1.7.0 pendulum<3
Andy Carter
04/05/2024, 2:07 PMIan OLeary
04/05/2024, 3:49 PMIan OLeary
04/05/2024, 3:49 PMAndy Carter
04/05/2024, 3:55 PMAndy Carter
04/05/2024, 3:56 PM