Skip to main content

final class atoti_jdbc.JdbcLoad

The definition of a JDBC query.
Inferring data types:
Creating a table from the inferred data types:
Loading query results into the table:
Using a parametrized query:
The load() outcome depends on the error_handling argument. For instance, the following SQLite database has a table with a MY_VALUE column typed as integer but with a string on row #3:
  • "fail" raises an error on the first invalid row and interrupts the load:
  • "warn" skips the invalid rows and raises a Python warning:
  • "log" skips the invalid rows and logs the errors:
  • "skip" skips the invalid rows without logging:
See also: The other DataLoad implementations.

driver : Annotated[str | None, AfterValidator(_validate_driver)] = None

The Java class name of the driver to use. This defines Hibernate’s DRIVER option. Inferred from url if None.

parameters : FrozenSequence[Constant] = ()

The query parameters, sometimes also called bind variables.

query : str

The query (usually SQL) to execute.

url : Annotated[str, AfterValidator(normalize_jdbc_url)]

The JDBC connection string of the database. The "jdbc" scheme is optional but the database specific scheme (such as "h2") is mandatory. For instance:
  • "h2:/home/user/database/file/path;USER=username;PASSWORD=passwd"
  • "postgresql://postgresql.db.server:5430/example?user=username&password=passwd"
More examples can be found here. This defines Hibernate’s URL option.