max
09/16/2019, 6:03 PMAmanda Crawford
09/16/2019, 7:02 PMCarlos Gimenez
09/16/2019, 9:19 PMAndrew Madonna
09/17/2019, 4:53 PMuser
09/17/2019, 6:01 PMmax
09/17/2019, 6:02 PMCharles Surett
09/18/2019, 1:46 PMAndrew Madonna
09/18/2019, 4:57 PMCharles Surett
09/18/2019, 5:34 PMKevin
09/19/2019, 4:23 PMrequired_resource_keys
for solidsAbhi Singh
09/26/2019, 7:06 AM@pipeline
def iris_ingestion_pipeline():
convert_csv_to_json(
download_csv_from_url_to_file()
)
Currently, I am deleting the csv file in my convert_csv_to_json
solid just to get it working. This is not ideal though because I am coupling transformation and IO logic.
One option I got working was having convert_csv_to_json
return the file to be deleted which would then get passed into a delete_file
solid like so:
@pipeline
def iris_ingestion_pipeline():
delete_file(
convert_csv_to_json(
download_csv_from_url_to_file()
)
)
This is also not ideal because the semantics of the convert_csv_to_json become brittle if you plan on reusing that solid in contexts where you don't want to delete the file
I then tried to go the tempfile route, but the issue here is that I have no way of persisting a tempfile_fp across solids unless I hack the execution context.
It is likely I am missing something obvious here with inputs but would love to get
A: Your opinions for how to do this? Just so I have a better intuition around how solids are to be composed
B: Opinions on support for tempfiles and tmpdir's?Kevin
09/26/2019, 10:23 AMeamag
09/27/2019, 11:59 AMeamag
09/27/2019, 1:04 PMClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
when I try to download a file from private bucket, I have creds in environment as usual. I can download it manually via import boto3
s3 = boto3.resource("s3")
s3.Bucket(bucket_name).download_file
thoughFarhan Husain
09/27/2019, 11:48 PMsolid_name = 'generate_date_suffix'
def assert_in_composition(solid_name):
if len(_composition_stack) < 1:
raise DagsterInvariantViolationError(
'Attempted to call solid "{solid_name}" outside of a composition function. '
'Calling solids is only valid in a function decorated with '
> '@pipeline or @composite_solid.'.format(solid_name=solid_name)
)
E dagster.core.errors.DagsterInvariantViolationError: Attempted to call solid "generate_date_suffix" outside of a composition function. Calling solids is only valid in a function decorated with @pipeline or @composite_solid.
Farhan Husain
09/27/2019, 11:48 PMdef test_generate_date_suffix():
execute_solid(generate_date_suffix("test"))
assert True
max
09/27/2019, 11:49 PMexecute_solid(generate_date_suffix)
should do what you want -- you'll want to pass the input in the input_values
param to that functionFarhan Husain
09/27/2019, 11:50 PMinput_values
required if the input is blank?max
09/27/2019, 11:50 PMexecute_solid(generate_date_suffix)
should doFarhan Husain
09/27/2019, 11:51 PMFarhan Husain
09/27/2019, 11:51 PMFarhan Husain
09/27/2019, 11:51 PMJohn S
09/30/2019, 1:49 AMAn exception was thrown during execution that is likely a framework error, rather than an error in user code.
Original error message: dagster.core.errors.DagsterResourceFunctionError: Error executing resource_fn on ResourceDefinition db_info
Stack Trace:
File "/Users/johnstory/.local/share/virtualenvs/dagster_airline_demo-WDH392CN/lib/python3.7/site-packages/dagster_graphql/implementation/pipeline_execution_manager.py", line 299, in execute_pipeline_through_queue
DagsterInstance.from_ref(instance_ref),
File "/Users/johnstory/.local/share/virtualenvs/dagster_airline_demo-WDH392CN/lib/python3.7/site-packages/dagster/core/execution/api.py", line 133, in execute_run_iterator
pipeline, pipeline_run.environment_dict, run_config, instance
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/Users/johnstory/.local/share/virtualenvs/dagster_airline_demo-WDH392CN/lib/python3.7/site-packages/dagster/core/execution/context_creation_pipeline.py", line 204, in scoped_pipeline_context
raise dagster_error
File "/Users/johnstory/.local/share/virtualenvs/dagster_airline_demo-WDH392CN/lib/python3.7/site-packages/dagster/core/execution/context_creation_pipeline.py", line 179, in scoped_pipeline_context
log_manager,
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/Users/johnstory/.local/share/virtualenvs/dagster_airline_demo-WDH392CN/lib/python3.7/site-packages/dagster/core/execution/context_creation_pipeline.py", line 63, in create_resource_builder
yield resources_stack.create()
File "/Users/johnstory/.local/share/virtualenvs/dagster_airline_demo-WDH392CN/lib/python3.7/site-packages/dagster/core/execution/context_creation_pipeline.py", line 346, in create
user_fn, DagsterResourceFunctionError, _create_msg_fn(resource_name)
File "/Users/johnstory/.local/share/virtualenvs/dagster_airline_demo-WDH392CN/lib/python3.7/site-packages/contextlib2.py", line 442, in enter_context
result = _cm_type.__enter__(cm)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/Users/johnstory/.local/share/virtualenvs/dagster_airline_demo-WDH392CN/lib/python3.7/site-packages/dagster/core/execution/context_creation_pipeline.py", line 462, in user_code_context_manager
check.invariant(stopped, 'Must yield one item. Yielded more than one item')
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/johnstory/.local/share/virtualenvs/dagster_airline_demo-WDH392CN/lib/python3.7/site-packages/dagster/core/errors.py", line 112, in user_code_error_boundary
error_cls(msg_fn(), user_exception=e, original_exc_info=sys.exc_info(), **kwargs), e
File "/Users/johnstory/.local/share/virtualenvs/dagster_airline_demo-WDH392CN/lib/python3.7/site-packages/future/utils/__init__.py", line 398, in raise_from
exec(execstr, myglobals, mylocals)
File "<string>", line 1, in <module>
Anyone have a clue? cc @nateeamag
09/30/2019, 7:15 AMJohn S
10/02/2019, 11:56 PMpip install dagster dagit
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m_/wf6sq5_d3xx7x1gd5b2xpfwm0000gn/T/pip-install-191_6L/dagster/setup.py'"'"'; __file__='"'"'/private/var/folders/m_/wf6sq5_d3xx7x1gd5b2xpfwm0000gn/T/pip-install-191_6L/dagster/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /private/var/folders/m_/wf6sq5_d3xx7x1gd5b2xpfwm0000gn/T/pip-install-191_6L/dagster/
Complete output (3 lines):
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
error in dagster setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected ',' or end-of-list in pathlib2>=2.3.4; python_version<"3" at ; python_version<"3"
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
What am I doing wrong here?user
10/04/2019, 12:48 AMschrockn
10/04/2019, 1:11 AMuser
10/04/2019, 1:13 AMeamag
10/04/2019, 10:04 AMPhilipp G
10/04/2019, 2:01 PM