Closed ChronosSong closed 1 year ago
Hi @ChronosRoot, thank you for opening an issue! I'll tag some folks who can help and we'll get back to you as soon as possible.
Thank you for your feedback. This has been routed to the support team for assistance.
@ChronosRoot Thanks for your feedback! We will investigate and update as appropriate.
@ChronosSong I am seeing the same behavior and looking into it. I will update you back on this.
Hi @ChronosSong thanks for your feedback!
I found that there is some problem with the parameter format you fill in the function since filters
in RunFilterParameters
shall be list
, I suggest you try the following ways to solve your problem,like
filter_parameters = RunFilterParameters(
last_updated_after=last_sunday,
last_updated_before=this_monday,
filters=[RunQueryFilter(operand="PipelineName", operator="Equals", values=["D365"])]
)
query_data = datafactory_client.pipeline_runs.query_by_factory(
resource_group_name=conf[azure_env]['resource_group_name'],
factory_name=conf[azure_env]['factory_name'],
filter_parameters=filter_parameters
)
Hi @ChronosSong. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve
” to remove the “issue-addressed” label and continue the conversation.
@Wzb123456789 Thanks for looking into this but I have tried your code, but it is throwing error.
@SaurabhSharma-MSFT
The above solution is a little wrong, it has been corrected, please try again.
I found that some parameters were lost during the serialization and conversion of json by filter_parameters.
Code azure/mgmt/datafactory/operations/_pipeline_runs_operations.py
Line 283
_json = self._serialize.body(filter_parameters, "RunFilterParameters")
When i run the code.
filter_parameters {'additional_properties': {}, 'continuation_token': None, 'last_updated_after': datetime.datetime(2022, 10, 17, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Asia/Shanghai')), 'last_updated_before': datetime.datetime(2022, 10, 24, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Asia/Shanghai')), 'filters': <azure.mgmt.datafactory.models._models_py3.RunQueryFilter object at 0x1031aec70>, 'order_by': None}
But the returned json only has time left.
_json {'lastUpdatedAfter': '2022-10-16T16:00:00.000Z', 'lastUpdatedBefore': '2022-10-23T16:00:00.000Z'}
I'm not very good at python serialization and am confused about it
Thanks @Wzb123456789 but I am still seeing error with the new code.
Hi @ChronosSong The serialization error shall be caused by wrong input of values
:
I fix it and please try https://github.com/Azure/azure-sdk-for-python/issues/26558#issuecomment-1288455249 again.
Thanks @msyyc. It works for me now.
@ChronosSong Waiting for your confirmation.
Hi @ChronosSong. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve
” to remove the “issue-addressed” label and continue the conversation.
@mccoyp Thanks for the guidance, it worked
I query the specified pipeline within a week, add filters, no error is reported, but the returned result is all records in the time period