score:0

You can add the option "column_name" -> "on", to query using the columnNames instead of the titles (it should work for TD drivers >=16) [I've tested it with 17]

spark.read.format("jdbc")
  .options(Map(
    "url" -> tdURL,
    "user" -> yourUser,
    "password" -> yourPw,
    "dbtable" ->  table,
    "strict_names" -> "off",
    "column_name" -> "on",
    "driver" -> "com.teradata.jdbc.TeraDriver"))
  .load()

score:1

If I'm not mistaken, a title is just a way to change the display name of a column when returning the results. In your query you'd still need to reference the actual column name or alias.

That being said, if "ORDER ID" is actually an alias for the order_id column, then you just reference it like that in your query with double quotes: select "ORDER ID" from table sample 100

Just make sure you properly escape the quotes when setting the Query variable.


Related Query

More Query from same tag