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

JDBC source fails on a strange error when information date sql type is not correct #516

Closed
yruslan opened this issue Nov 8, 2024 · 0 comments · Fixed by #517
Closed
Labels
bug Something isn't working

Comments

@yruslan
Copy link
Collaborator

yruslan commented Nov 8, 2024

Describe the bug

A clear and concise description of what the bug is.

Code and/or configuration snippet that caused the issue

{
  name = "jdbc3"
  factory.class = "za.co.absa.pramen.core.source.JdbcSource"
  jdbc {
    driver = "driver2"
    connection.string = "url2"
    user = "user2"
    password = "password2"
  }

  has.information.date.column = false
  information.date.type = "wrong"
}

Stack trace

Class 'za.co.absa.pramen.core.source.JdbcSource' is not an instance of 'za.co.absa.pramen.api.ExternalChannelFactory[za.co.absa.pramen.api.Source]'
java.lang.IllegalArgumentException: Class 'za.co.absa.pramen.core.source.JdbcSource' is not an instance of 'za.co.absa.pramen.api.ExternalChannelFactory[za.co.absa.pramen.api.Source]'
	at za.co.absa.pramen.core.utils.ClassLoaderUtils$.loadSingletonClassOfType(ClassLoaderUtils.scala:37)
	at za.co.absa.pramen.core.ExternalChannelFactoryReflect$.fromConfig(ExternalChannelFactoryReflect.scala:49)
	at za.co.absa.pramen.core.ExternalChannelFactoryReflect$.fromConfigByName(ExternalChannelFactoryReflect.scala:105)
	at za.co.absa.pramen.core.source.JdbcSourceSuite.$anonfun$new$4(JdbcSourceSuite.scala:137)

Expected behavior

  1. information.date.type should be ignored when has.information.date.column = false
  2. If has.information.date.column = true the error should reflect the actual error.

Context

  • Pramen/pramen-py version: 1.10.0
  • Spark version: 3.4.4
  • Scala/Python version: 2.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant