Hey Everyone, I have to enforce a timeout argumen...
# questions
a
Hey Everyone, I have to enforce a timeout argument to my postgress connection in a kedro project. I have included in the catalog.yml, but I keep receiving this error:
Copy code
lib/python3.7/site-packages/kedro/io/core.py", line 191, in load
    raise DataSetError(message) from exc
kedro.io.core.DataSetError: Failed while loading data from data set SparkPostgresJDBCDataSet(load_args={'properties': {'connectTimeout': 300, 'driver': org.postgresql.Driver}}, option_args=True, save_args={'properties': {'driver': org.postgresql.Driver}}, table= , url=jdbc:postgresql:).
An error occurred while calling o49135.setProperty. Trace:
py4j.Py4JException: Method setProperty([class java.lang.String, class java.lang.Integer]) does not exist
        at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:318)
        at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:326)
        at py4j.Gateway.invoke(Gateway.java:274)
        at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
        at py4j.commands.CallCommand.execute(CallCommand.java:79)
        at py4j.ClientServerConnection.waitForCommands(ClientServerConnection.java:182)
        at py4j.ClientServerConnection.run(ClientServerConnection.java:106)
        at java.lang.Thread.run(Thread.java:750)
Does anyone know what I am doing wrong, and how to fix it? Or what are the files which I am suppose to update this timeout argument?
j
It looks like you're trying to pass an integer to setProperty, I expect it would take a string knowing Spark. Can you try initialising your dataset with 'connectTimeout': '300' (as a string, not an int)?
🥳 1
a
It seems that it worked as a string. 🙂 gratitude thank you