AWS Glue reading data from Sybase table

Viewed 21

While loading data from Sybase DB in AWS Glue I encounter an error:

Py4JJavaError: An error occurred while calling o261.load. : java.sql.SQLException: The identifier that starts with '__SPARK_GEN_JDBC_SUBQUERY_NAME' is too long. Maximum length is 30.

The code I use is:

spark.read.format("jdbc").
    option("driver", "net.sourceforge.jtds.jdbc.Driver").
    option("url", jdbc_url).
    option("query", query).
    option("user", db_username).
    option("password", db_password).
    load()

Is there any way to set this identifier as a custom one in order to have it shorter? What's interesting I am able to load all the data from a particular table by replacing query option with option("dbtable", table) but invoking a custom query is impossible.

Best Regards

0 Answers
Related