Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass task_id to be used for parent class on LoadFileOperator initialisation #1259

Merged
merged 2 commits into from
Nov 16, 2022

Conversation

pankajkoti
Copy link
Contributor

@pankajkoti pankajkoti commented Nov 16, 2022

The SQL CLI render task for the load_file interface when calling LoadFileOperator needs task_id to be available
as part of the initialisation, hence generate a task_id if it is not provided already and pass it to the parent class for initialisation.

Does this introduce a breaking change?

No

Issue screenshot:
Screenshot 2022-11-16 at 10 12 26 PM

…sation

The SQL CLI render task for the load_file interface when calling
LoadFileOperator needs task_id to be available
as part of the initialisation, hence generate a task_id if it is not
provided already and pass it to the parent class for initialisation.
@feluelle
Copy link
Member

Also, isn't it possible to add task_id as part of **kwargs to the constructor?

I think the change you propose has the benefit of not having to set it i.e. by setting a default. But it should also work by explicitly setting it, no?

@codecov
Copy link

codecov bot commented Nov 16, 2022

Codecov Report

Base: 94.13% // Head: 94.13% // No change to project coverage 👍

Coverage data is based on head (05cf11f) compared to base (e345796).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1259   +/-   ##
=======================================
  Coverage   94.13%   94.13%           
=======================================
  Files          17       17           
  Lines         597      597           
  Branches       67       67           
=======================================
  Hits          562      562           
  Misses         22       22           
  Partials       13       13           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pankajkoti
Copy link
Contributor Author

Also, isn't it possible to add task_id as part of **kwargs to the constructor?

I think the change you propose has the benefit of not having to set it i.e. by setting a default. But it should also work by explicitly setting it, no?

yes, like we tested, we can pass it from SQL CLI too, and it is good to have this in the operator too that this PR implements.

@kaxil kaxil merged commit 392a450 into main Nov 16, 2022
@kaxil kaxil deleted the 1227-load-operator-task-id branch November 16, 2022 20:02
kaxil pushed a commit that referenced this pull request Nov 16, 2022
…sation (#1259)

The SQL CLI render task for the load_file interface when calling
LoadFileOperator needs task_id to be available
as part of the initialisation, hence generate a task_id if it is not
provided already and pass it to the parent class for initialisation.
## Does this introduce a breaking change?
No

Issue screenshot:
<img width="1657" alt="Screenshot 2022-11-16 at 10 12 26 PM"
src="https://user-images.githubusercontent.com/10206082/202240926-fe4250b8-c0db-4d37-97ca-1266fc68eb91.png">

(cherry picked from commit 392a450)
pankajkoti added a commit that referenced this pull request Nov 17, 2022
…sation (#1259)

The SQL CLI render task for the load_file interface when calling
LoadFileOperator needs task_id to be available
as part of the initialisation, hence generate a task_id if it is not
provided already and pass it to the parent class for initialisation.
No

Issue screenshot:
<img width="1657" alt="Screenshot 2022-11-16 at 10 12 26 PM"
src="https://user-images.githubusercontent.com/10206082/202240926-fe4250b8-c0db-4d37-97ca-1266fc68eb91.png">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants