Solved

SQL Analysis Services JDBC Driver detects all column as VARCHAR

  • 1 December 2023
  • 1 reply
  • 161 views

Userlevel 3
Badge

Hi Cdata folks,

Cdata driver latest version v23

Weird thing is that SQL Analysis Services JDBC Driver detects all column as VARCHAR no matter what type of the model column:

 

This is the model in Visual Studio:
 

Before importing, the data type is also detected correctly in Visual Studio:
 

 

 

But in meta data, type for all columns is VARCHAR
This is how I get the metadata:

Connection conn = DriverManager.getConnection("jdbc:ssas:AuthScheme=BASIC;User=user;Password=pwd;URL=http://HOST/OLAP/msmdpump.dll;");
Statement stat = conn.createStatement();
DatabaseMetaData databaseMetaData = conn.getMetaData();

try(ResultSet columns = databaseMetaData.getColumns("TabularProject3","Model","Table","integer")){
while(columns.next()) {
System.out.println(columns.getString("COLUMN_NAME"));
System.out.println(columns.getString("DATA_TYPE"));
System.out.println(columns.getString("COLUMN_SIZE"));
System.out.println(columns.getString("TYPE_NAME"));
}
}

 

In document, there is no other connection string param that I think can apply to change how Cdata driver detects column type.Am I missing anything else?

 

icon

Best answer by ekanshd 4 January 2024, 07:00

View original

1 reply

Userlevel 1
Badge

Hello @quangdutran809 , we're trying to reproduce the issue on our end. Meanwhile could you please send us the verbosity 5 logfile so that we can better troubleshoot the issue? To generate the logs, 

please set the following connection properties on the connection manager/JDBC URL and send it to us:
-Set “Logfile” to an accessible valid file (i.e C:\Users\<user>\Desktop\logfile.txt).
-Set “Verbosity” to 5.

This log file will allow us to see exactly what data is being sent between our driver and the data source, which will give us a better idea of what may be causing the issue. It also includes the full response from the data provider. Knowing this will let me have a much better idea of what exactly the issue is, and how to best go about resolving it. Rerun the query and send us the resulting log so that I can narrow down the issue.

Also, you can email us the logfiles and other details at support@cdata.com which would make the process much easier for us.

Reply