hi, I'm getting an error of loading false data, ca...
# plugins-general
d
hi, I'm getting an error of loading false data, can anyone help me with the error
a
Can you copy some more of the error above? And paste the text rather than an image? What command are you running?
d
2023-05-30T084345.839786Z [error ] Loader failed 2023-05-30T084345.842298Z [error ] Block run completed. block_type=ExtractLoadBlocks err=RunnerError('Loader failed') exit_codes={<PluginType.LOADERS: 'loaders'>: 1} set_number=0 success=False Need help fixing this problem? Visit http://melta.no/ for troubleshooting steps, or to join our friendly Slack community. Run invocation could not be completed as block failed: Loader failed
i run command "meltano run tap-shopify target-jsonl"
a
Can you copy more lines above? Maybe 50 more lines? There is probably a Python error somewhere above.
d
lof@lof-H110M-Gaming-3:~/DEV/Python/dagster-meltano/meltano_project$ meltano run tap-shopify target-jsonl 2023-05-30T084343.075147Z [info ] Environment 'dev' is active 2023-05-30T084343.472162Z [warning ] No state was found, complete import. 2023-05-30T084343.799509Z [info ] time=2023-05-30 154343 name=tap-shopify level=INFO message=tap-shopify v0.0.1, Meltano SDK v0.4.9) cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084343.799918Z [info ] time=2023-05-30 154343 name=tap-shopify level=INFO message=Skipping parse of env var settings... cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084343.800058Z [info ] time=2023-05-30 154343 name=tap-shopify level=INFO message=Config validation passed with 0 warnings. cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084343.804391Z [info ] time=2023-05-30 154343 name=root level=INFO message=Operator '__else__=None' was not found. Unmapped streams will be included in output. cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084343.812949Z [info ] time=2023-05-30 154343 name=tap-shopify level=INFO message=Added 'inventory_items' as child stream to 'inventory_levels' cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084343.813170Z [info ] time=2023-05-30 154343 name=tap-shopify level=INFO message=Added 'inventory_levels' as child stream to 'locations' cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084343.813322Z [info ] time=2023-05-30 154343 name=tap-shopify level=INFO message=Added 'transactions' as child stream to 'orders' cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084343.813759Z [info ] time=2023-05-30 154343 name=tap-shopify level=INFO message=Beginning incremental sync of 'abandoned_checkouts'... cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084343.813946Z [info ] time=2023-05-30 154343 name=tap-shopify level=INFO message=Tap has custom mapper. Using 1 provided map(s). cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084344.172858Z [info ] time=2023-05-30 154344 name=tap-shopify level=INFO message=INFO METRIC: {'type': 'timer', 'metric': 'http_request_duration', 'value': 0.355799, 'tags': {'endpoint': '/api/2022-01/checkouts.json', 'http_status_code': 200, 'status': 'succeeded'}} cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084344.224956Z [info ] time=2023-05-30 154344 name=tap-shopify level=INFO message=INFO METRIC: {'type': 'counter', 'metric': 'record_count', 'value': 0, 'tags': {'stream': 'abandoned_checkouts'}} cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084344.225390Z [info ] time=2023-05-30 154344 name=tap-shopify level=INFO message=Beginning incremental sync of 'collects'... cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084344.225607Z [info ] time=2023-05-30 154344 name=tap-shopify level=INFO message=Tap has custom mapper. Using 1 provided map(s). cmd_type=elb consumer=False name=tap-shopify producer=True stdio=stderr string_id=tap-shopify 2023-05-30T084344.584962Z [info ] time=2023-05-30 154344 name=tap-shopify level=INFO message=INFO METRIC: {'type': 'timer', 'metric': 'http_request_duration', 'value': 0.356935, 'tags': {'endpoint': '/api/2022-01/collects.json', 'http_status_code': 200, 'status': 'succeeded'}} cmd_type=elb consumer=False name=tap-shopify producer=True stdio=std…
a
Copy code
stdio=stderr string_id=target-jsonl
2023-05-30T08:43:45.814691Z [info     ] jsonschema.exceptions.ValidationError: None is not of type 'string' cmd_type=elb consumer=True name=target-jsonl producer=False stdio=stderr string_id=target-jsonl
2023-05-30T08:43:45.815176Z [info     ]                                cmd_type=elb consumer=True name=target-jsonl producer=False stdio=stderr string_id=target-jsonl
2023-05-30T08:43:45.815484Z [info     ] Failed validating 'type' in schema['properties']['first_name']: cmd_type=elb consumer=True name=target-jsonl producer=False stdio=stderr string_id=target-jsonl
Not familiar with the tap but looks like some kind of validation issue on 'first_name'.
Can you run
meltano invoke tap-shopify
and see if you get any other issues?
d
i run the command meltano invoke tap-shopify paid for my data
i have integrated in dagster job but system still return error like this
Copy code
Exceeded max_retries of 1
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/execute_plan.py", line 262, in dagster_event_sequence_for_step
    for step_event in check.generator(step_events):
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/execute_step.py", line 369, in core_dagster_event_sequence_for_step
    for user_event in check.generator(
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/execute_step.py", line 90, in _step_output_error_checked_user_event_sequence
    for user_event in user_event_sequence:
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/compute.py", line 192, in execute_core_compute
    for step_output in _yield_compute_results(step_context, inputs, compute_fn):
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/compute.py", line 161, in _yield_compute_results
    for event in iterate_with_context(
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_utils/__init__.py", line 447, in iterate_with_context
    return
  File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/utils.py", line 72, in op_execution_error_boundary
    raise RetryRequestedFromPolicy(
The above exception was caused by the following exception:
dagster_meltano.exceptions.MeltanoCommandError: Command 'run tap-shopify target-jsonl' failed with exit code 1
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/utils.py", line 54, in op_execution_error_boundary
    yield
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_utils/__init__.py", line 445, in iterate_with_context
    next_output = next(iterator)
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/compute_generator.py", line 124, in _coerce_op_compute_fn_to_iterator
    result = invoke_compute_fn(
  File "/home/lof/DEV/Python/dagster-meltano/meltano_project/.meltano/utilities/dagster/venv/lib/python3.8/site-packages/dagster/_core/execution/plan/compute_generator.py", line 118, in invoke_compute_fn
    return fn(context, **args_to_pass) if context_arg_provided else fn(**args_to_pass)
  File "/home/lof/DEV/Python/dagster-meltano/dagster_meltano/ops.py", line 94, in dagster_op
    output = meltano_resource.execute_command(
  File "/home/lof/DEV/Python/dagster-meltano/dagster_meltano/meltano_resource.py", line 70, in execute_command
    raise MeltanoCommandError(
a
What about the output when running
invoke
? Do you get a similar error?
meltano invoke tap-shopify
It looks like your customers stream has a first_name of None, but the schema expects a string. https://github.com/Matatika/tap-shopify/blob/master/tap_shopify/schemas/customer.json
Can you check the raw data from shopify via postman/curl?
d
I run on the command, the system has obtained the data on shopify
I'm seeing tap-shopify cluttering up the orders, products, and customer data, which is probably why the first_name error is generated.
a
It's the validation step which is failing, as you have a blank 'first_name'. The validation doesn't happen if you run 'invoke', it's only when you run a tap & target combination.
e
@daniel_walker it seems like a schema needs a quick patch 👆
d
Hey, I'm taking a look into this now. Should be able to quickly change this schema, but in testing it myself I've run into another schema expect
string
got
null
issue. @edgar_ramirez_mondragon I think when using the SDK to build a schema as a python class it makes values nullable by default, is there any way to make the
.json
schemas nullable on import as well? Might just be a case that I switch this tap over to SDK schemas.
e
is there any way to make the
.json
schemas nullable on import as well?
There’s not and we probably won’t prioritize that ourselves since we’ll encourage the use of
singer_sdk.typing
classes
r
We can fix the issue with
first_name
easily by updating the schema, but I think that might be just the tip of the iceberg here (related). I think that our best course of action is probably to retire the
.json
schemas in favour of the SDK class-based approach, but that will not be a quick fix. In the meantime, we have pushed a fix to make
first_name
and
last_name
nullable to hopefully resolve this issue with what information we have here. @dinh_d___c_d____ng You will need to
meltano install --clean extractor tap-shopify
. If you still have problems, it would be great if you could provide some sample record data that we can work with to narrow down the what constitutes a valid schema for each stream. 🙂
a
@edgar_ramirez_mondragon just to confirm from Reubens earlier message, if you use typing classes as opposed to a JSON file for schema, do you get 'nullable' by default?
e
@Andy Carter yes, all properties with
required=False
(the default) will be serialized with
"type": […, "null"]