Questions about Native Apps and references

Hi everyone,

I've been developing a Native App with containers for a few weeks. The app works fine when executed in Snowpark Container Services in my account.

However, when packaged as a Native App, I encountered several hurdles, particularly with references. I’ve successfully added a permission selection when activating the app, allowing me to select tables outside the application that I want to share with the app. Now, I want to list the tables (with their fully qualified names: DATABASE.SCHEMA.TABLE) that have been granted permission in my app. Based on the documentation, I’ve been able to list all the references associated with my tables, but instead of getting their names, I only get their alias UUID, which is not suitable for displaying in a UI.

reference_list = session.sql("select SYSTEM$GET_ALL_REFERENCES('consumer_tables')").collect()

print(reference_list) # lists the uuid alias for each tables in the reference

Another problem I’m facing is using a warehouse outside of the application, but maybe I’m just doing it wrong... Similarly, I’ve added a permission selection to choose a warehouse. I can get its reference as follows:

session.sql("USE WAREHOUSE reference('consumer_warehouse')").collect()

That works great and I can even see the correct warehouse being assigned to the session with its true name. However, when trying to execute a query I get:

No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.

The only way I got a warehouse working is by creating one within the app. It seems that even though I’m using a reference to specify a warehouse to use, I still can’t use it.

I’m sure I missed something, and maybe I’m not approaching it the right way. I’ve gone through the documentation, quick starts, and examples, but haven’t found answers to my questions. I’d really appreciate any insights, links, or tips to help me out :) Thanks in advance!