How to Use a 64-bit ODBC Driver for Databricks and SSAS Cube Development in Visual Studio

Question:

How can I successfully save a 32-bit ODBC connection to Databricks in Visual Studio for SSAS cube development? I have a 64-bit OS and I could not connect with a 64-bit ODBC driver. I managed to connect and view my data with a 32-bit ODBC driver, but I get the following error when I try to save the connection: (error message). What could be the cause and solution for this issue?

Answer:

How to Save a 32-bit ODBC Connection to Databricks in Visual Studio for SSAS Cube Development

Databricks is a cloud-based platform that provides data engineering, data science, and analytics solutions. It supports various data sources, including ODBC connections, which allow users to access data from different databases and applications.

Visual Studio is an integrated development environment (IDE) that supports various programming languages and tools, including SQL Server Analysis Services (SSAS), which is a data analysis and modeling tool that allows users to create multidimensional cubes and tabular models.

In this article, we will explore how to save a 32-bit ODBC connection to Databricks in Visual Studio for SSAS cube development. We will assume that you have a 64-bit operating system (OS) and that you could not connect with a 64-bit ODBC driver. We will also assume that you managed to connect and view your data with a 32-bit ODBC driver, but you get the following error when you try to save the connection:

> The following system error occurred: The specified DSN contains an architecture mismatch between the Driver and Application

We will explain what could be the cause and solution for this issue.

Cause of the Error

The error message indicates that there is a mismatch between the architecture of the ODBC driver and the application that is trying to use it. In other words, the ODBC driver and the application have different bitness, either 32-bit or 64-bit.

This can happen when you have a 64-bit OS, but you are using a 32-bit ODBC driver to connect to Databricks. The 32-bit ODBC driver can work with 32-bit applications, such as the ODBC Data Source Administrator or the ODBC Test tool, but it cannot work with 64-bit applications, such as Visual Studio or SSAS.

To verify the bitness of your ODBC driver, you can open the ODBC Data Source Administrator and check the version of the driver. For example, if you are using the Simba Spark ODBC Driver, you can see the version number in the Driver field. If the version number ends with x86, it means that the driver is 32-bit. If the version number ends with x64, it means that the driver is 64-bit.

To verify the bitness of your application, you can check the properties of the executable file. For example, if you are using Visual Studio 2019, you can right-click on the devenv.exe file and select Properties. Then, you can go to the Details tab and look for the File version field. If the file version starts with 16.0, it means that the application is 64-bit. If the file version starts with 16.1, it means that the application is 32-bit.

Solution for the Error

The solution for the error is to use a 64-bit ODBC driver to connect to Databricks in Visual Studio for SSAS cube development. This way, you can avoid the architecture mismatch between the driver and the application.

To use a 64-bit ODBC driver, you need to do the following steps:

1. Download and install the 64-bit ODBC driver for Databricks from the official website. For example, if you are using the Simba Spark ODBC Driver, you can download it from [here](https://www.simba.com/drivers/spark-odbc-jdbc/).

2. Open the 64-bit ODBC Data Source Administrator and create a new system DSN for the 64-bit ODBC driver. You can use the same configuration settings as the 32-bit ODBC driver, except for the DSN name, which should be different. For example, if you named the 32-bit DSN as Databricks32, you can name the 64-bit DSN as Databricks64.

3. Open Visual Studio and create a new SSAS project or open an existing one. Then, go to the Data Source View tab and create a new data source or edit an existing one. In the Data Source Wizard, select ODBC as the data source type and choose the 64-bit DSN that you created in the previous step. For example, select Databricks64 as the DSN name. Then, follow the rest of the steps to complete the wizard and test the connection.

4. Save the data source and proceed with the SSAS cube development as usual.

Conclusion

In this article, we learned how to save a 32-bit ODBC connection to Databricks in Visual Studio for SSAS cube development. We explained that the error that occurs when trying to save the connection is caused by the architecture mismatch between the 32-bit ODBC driver and the 64-bit application. We also provided the solution for the error, which is to use a 64-bit ODBC driver instead of a 32-bit one. We hope that this article was helpful and that you can successfully connect to Databricks in Visual Studio for SSAS cube development.

Leave a Reply

Your email address will not be published. Required fields are marked *

Privacy Terms Contacts About Us