Is there a way to activate 1-way TLS on the MySQL ...
# prefect-server
l
Is there a way to activate 1-way TLS on the MySQL task ? I'm using :
Copy code
my_query = 'SELECT * FROM my_db LIMIT 10'
MySQLFetch("my_db ", "user_read_only", "Abcd1234", "mysql.test.domain", port=3306, query=my_query)
k
Hi @Lionel! Unfortunately, it looks like the current task does not support it. Would you know how to do it in pymysql?
l
are you suggesting to do it manually ?? do you have an example of Prefect flow with manual pymysql implementation ??
Unfortunately, it looks like the current task does not support it. Would you know how to do it in pymysql?
if that's the case, then it seems like the majority of Prefect Tasks are unusable in production environment.
k
I’m just asking if you knew so I could help add it to the current implementation of the task because I don’t know how immediately. The task library is majority community contributed so we don’t make guarantees around it.
And I think you should have gotten a welcome message when you joined Slack. I suggest read Rule 1 of the community guidelines.
l
I'm sorry if I come out as negative but I'm trying to be direct and honest as possible. Also being new to Prefect I do understand that I may lack understanding in many Prefect Concepts. Sorry for that. Which is why I was sincerely asking if it's possible or recommended to use 3rd party libraries to run the Flow, instead of the provided Tasks by Prefect. If yes then great we can continue with Prefect. After all I guess most of the new joiners here are looking for reasons to make their Prefect setup work (albeit abit hacky) while the community continues with the awesome work of enriching the features.
k
No worries. As long as you can do something with Python code, you can do it with Prefect. A lot of our users write their own Tasks, even if there is already an implemented one because the Task library often makes assumptions on general use cases. It’s pretty easy to write a Task with the
@task
decorator or seeing how that MySQL Task was written and modifying it.
l
nice!! thanks a lot I'll take a look at it 😄