Skip to content

Using uppercase names in Lakehouse

0

Snowflake federated catalog uses uppercase names but sagemaker lakehouse does not support it. Is there a workaround?

AWS
EXPERT

asked a year ago168 views

1 Answer
0

You're correct that there's a case sensitivity challenge when working with Snowflake data in Amazon SageMaker Lakehouse. The Amazon SageMaker Lakehouse architecture currently only supports lowercase table, column, and database names for optimal experience, while Snowflake object names are case sensitive by default.

For the Athena Snowflake connector specifically, there are several workarounds:

  1. Use query hints: When using Athena Federated Query without Glue Catalog, you can provide @schemaCase and @tableCase query hints to retrieve data from tables with case-sensitive names. For example:
SELECT * FROM "lambda:snowflakeconnector".SYSTEM."MY_TABLE@schemaCase=upper&tableCase=upper"
  1. Casing modes: The Snowflake connector supports different casing modes:
  • NONE (default when using Glue Connection)
  • CASE_INSENSITIVE_SEARCH
  • ANNOTATION (default without Glue Connection)
  1. Create lowercase objects in Snowflake: If possible, create your Snowflake objects with lowercase names to align with Lakehouse requirements.

  2. Use double quotation marks: In Snowflake, you can enclose object names in double quotation marks to preserve case sensitivity when needed.

For the best experience with SageMaker Lakehouse, it's recommended to ensure all database identifiers are in lowercase when possible.
Sources
Amazon Athena Snowflake connector - Amazon Athena
Data connections in the lakehouse architecture of Amazon SageMaker - lakehouse architecture
Catalog and govern Amazon Athena federated queries with Amazon SageMaker Lakehouse | AWS Big Data Blog
Case sensitivity differences for ANSI SQL - SQL Server to Aurora PostgreSQL Migration Playbook
Creating connections in lakehouse architecture - lakehouse architecture

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.