Skip to content

Conversation

@eric-wang-1990
Copy link
Contributor

@eric-wang-1990 eric-wang-1990 commented May 21, 2025

Description

This PR adds support for configuring multiple catalog behavior in the C# Databricks ADBC driver. It introduces a new connection parameter adbc.databricks.enable_multiple_catalog_support that allows users to control whether the driver should use multiple catalogs or restrict to a default catalog.

Proposed Changes

  • Add new connection parameter adbc.databricks.enable_multiple_catalog_support to control multiple catalog behavior
  • Implement parameter parsing with support for boolean values and string values "1"/"0" for compatibility with tools like PowerBI
  • Add tests to verify the behavior of metadata queries with different parameter settings

How is this tested?

Added unit tests that verify the behavior of metadata queries (GetSchemas, GetTables) with different settings of the CanUseMultipleCatalogs parameter. Tests confirm that when disabled, only the default catalog is used, and when enabled, multiple catalogs can be accessed.

…g support

Adds a new connection parameter 'adbc.databricks.enable_multiple_catalog_support' to control whether the driver should use multiple catalogs or restrict to a default catalog. Default is true for backward compatibility. This parameter accepts boolean values 'true'/'false' or '1'/'0' for compatibility with tools like PowerBI.
@github-actions github-actions bot added this to the ADBC Libraries 19 milestone May 21, 2025
@eric-wang-1990 eric-wang-1990 changed the title feat(csharp/src/Drivers/Databricks): Add configurable multiple catalo… feat(csharp/src/Drivers/Databricks): Add configurable multiple catalog support May 21, 2025
Copy link
Contributor

@CurtHagenlocher CurtHagenlocher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Is there a reason not to use "true" and "false" instead of "0" and "1" in the connection string?

{
_enableMultipleCatalogSupport = enableMultipleCatalogSupportValue;
}
// PowerBI will pass in "1" and "0" as strings, so we need to handle that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ADBC convention is to use "true" and "false" for boolean-valued settings. Is it important to retain compatibility with ODBC here? The property name will be different anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing Power BI connector passed in "0", "1" etc, do you recommend changing the connector code to overwrite as true/false rather than handle here in the driver?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Contributor

@CurtHagenlocher CurtHagenlocher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@CurtHagenlocher CurtHagenlocher merged commit 4f6c6b3 into apache:main May 27, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants