I get a SQLException when attempting to run a query. The column appears when I use AquaData studio to access the CSV file... I am running latest version of the JAR.
sqle= SQLException (id=198)
cause= SQLException (id=198)
detailMessage= "Invalid column: Physician First"
next= null
SQLState= "S0022"
stackTrace= null
vendorCode= 213249
Stack Trace
Thread [main] (Suspended (exception SQLException))
cl.a(af, aj, int, Object, Object, ab, boolean) line: not available
cl.a(Object, int, ab, int) line: not available
cl.a(bc, ac, d, int, boolean, int, String) line: not available
i(a7).a(y, m, b5, int, String) line: not available
i(a7).a(y, int, b5, m, Object) line: not available
cm(y).a(int, b5, m, Object) line: not available
cm.executeQuery() line: not available
NonBatchingBatcher(AbstractBatcher).getResultSet(PreparedStatement) line: 139
CustomLoader(Loader).getResultSet(PreparedStatement, boolean, boolean, RowSelection, SessionImplementor) line: 1669
CustomLoader(Loader).doQuery(SessionImplementor, QueryParameters, boolean) line: 662
CustomLoader(Loader).doQueryAndInitializeNonLazyCollections(SessionImplementor, QueryParameters, boolean) line: 224
CustomLoader(Loader).doList(SessionImplementor, QueryParameters) line: 2150
CustomLoader(Loader).listIgnoreQueryCache(SessionImplementor, QueryParameters) line: 2029
CustomLoader(Loader).list(SessionImplementor, QueryParameters, Set, Type[]) line: 2024
CustomLoader.list(SessionImplementor, QueryParameters) line: 117
SessionImpl.listCustomQuery(CustomQuery, QueryParameters) line: 1607
SessionImpl(AbstractSessionImpl).list(NativeSQLQuerySpecification, QueryParameters) line: 121
SQLQueryImpl.list() line: 169
NightingaleDocDB.createDoctorList(String) line: 112
NightingaleDocDB.connect() line: 49
BridgeDoctorDBCommandTest.testBridgeDoctorDBCommand() line: 56
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
BridgeDoctorDBCommandTest(TestCase).runTest() line: 154
BridgeDoctorDBCommandTest(TestCase).runBare() line: 127
TestResult$1.protect() line: 106
TestResult.runProtected(Test, Protectable) line: 124
TestResult.run(TestCase) line: 109
BridgeDoctorDBCommandTest(TestCase).run(TestResult) line: 118
TestSuite.runTest(Test, TestResult) line: 208
TestSuite.run(TestResult) line: 203
RemoteTestRunner.runTests(String[], String) line: 478
RemoteTestRunner.run() line: 344
RemoteTestRunner.main(String[]) line: 196
JDBC URL: jdbc:csv://///David/direct mail/Doctors/Patient Info/Hasson/Extract
The SQL Attempting to execute: select distinct "Physician First" as firstName, "Physician Last" as lastName, '' as uniqueDoctorID, '' as addressLine1, '' as addressLine2, '' as city, '' as postalCode from NightingalePatients
CSV Header for NightinGalePatients.csv
Physician Last,Physician First,Last,First,DOB,Chart #,Sex,Address,Address2,City,Prov,Post Code,Phone,Ext,Email,# of Visits,Last Service Date Billed,Last Blled,Last Billed Date,HealthNum,HealthVersion
|
>JDBC URL: jdbc:csv://///David/direct mail/Doctors/Patient Info/Hasson/Extract
You should use jdbc:csv://///David/direct mail/Doctors/Patient Info/Hasson/Extract?_CSV_Header=true
> select distinct "Physician First" as firstName, "Physician Last" as
> lastName, '' as uniqueDoctorID, '' as addressLine1, '' as addressLine2,
> '' as city, '' as postalCode from NightingalePatients
Your sal is correct, but maybe you wish to use:
select distinct "Physician First" as firstName, "Physician Last" as lastName, "DOB" as uniqueDoctorID, "Address" as addressLine1, "Address2" as addressLine2, city, "Post Code" as postalCode from NightingalePatients
|
You can close this issue. It was a problem with _CSV_Header=true not being set via Hibernate.
Thanks,
Martin
|