You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
We have a table in BigQuery with 4 columns
originaleventtime | TIMESTAMP | REQUIRED
operationcontextid | INTEGER | REQUIRED
identifier | INTEGER | REQUIRED
region | STRING | NULLABLE
The JDBC URL is
connection = DriverManager.getConnection("jdbc:BQDriver:int-a-fas-pdo/kkdataset?withServiceAccount=true&user=[email protected]&password=c:\FASGITHUB\int-a-fas-pdo-0757cb5e11b8.json");
We execute a select * on this table
PreparedStatement pstmt = connection.prepareStatement("select * from kk1");
ResultSet rest = pstmt.executeQuery();
But the line
Object originaleventtime=rest.getObject("originaleventtime");
throws an error
net.starschema.clouddb.jdbc.BQSQLException: No Such column labeled: originaleventtime
at net.starschema.clouddb.jdbc.BQForwardOnlyResultSet.findColumn(BQForwardOnlyResultSet.java:588)
at net.starschema.clouddb.jdbc.BQForwardOnlyResultSet.getObject(BQForwardOnlyResultSet.java:1170)
The method findColumn(String columnLabel) has the following implementation.
Why does it use getCatalogName() instaed of getColumnName()
int columncount = this.getMetaData().getColumnCount();
for (int i = 1; i <= columncount; i++) {
if (this.getMetaData().getCatalogName(i).equals(columnLabel)) {
return i;
}
}
The getCatalogName returns the value int-a-fas-pdo
The text was updated successfully, but these errors were encountered:
This is the bug in code
if (this.getMetaData().getCatalogName(i).equals(columnLabel)) {
return i;
}
this.getMetaData().getCatalogName(i) -> returns datasetname
should e replace with
if (rest.getMetaData().getColumnName(i).equals(columnLabel)) {
return i;
}
this.getMetaData().getCatalogName(i) replace with rest.getMetaData().getColumnName(i)
Hello
We have a table in BigQuery with 4 columns
originaleventtime | TIMESTAMP | REQUIRED
operationcontextid | INTEGER | REQUIRED
identifier | INTEGER | REQUIRED
region | STRING | NULLABLE
The JDBC URL is
connection = DriverManager.getConnection("jdbc:BQDriver:int-a-fas-pdo/kkdataset?withServiceAccount=true&user=[email protected]&password=c:\FASGITHUB\int-a-fas-pdo-0757cb5e11b8.json");
We execute a select * on this table
PreparedStatement pstmt = connection.prepareStatement("select * from kk1");
ResultSet rest = pstmt.executeQuery();
But the line
Object originaleventtime=rest.getObject("originaleventtime");
throws an error
net.starschema.clouddb.jdbc.BQSQLException: No Such column labeled: originaleventtime
at net.starschema.clouddb.jdbc.BQForwardOnlyResultSet.findColumn(BQForwardOnlyResultSet.java:588)
at net.starschema.clouddb.jdbc.BQForwardOnlyResultSet.getObject(BQForwardOnlyResultSet.java:1170)
The method findColumn(String columnLabel) has the following implementation.
Why does it use getCatalogName() instaed of getColumnName()
}
The getCatalogName returns the value int-a-fas-pdo
The text was updated successfully, but these errors were encountered: