Rajib Deb
Rajib Deb

Reputation: 1772

Demo Db and UTIL Db in snowflake

When we create a new snowflake account, it comes with two blank databases DEMO_DB and UTIL_DB. I always wonder what is the reason for providing two blank databases. Would not DEMO_DB be enough? Does anyone know why the util_db is required?

Upvotes: 1

Views: 816

Answers (1)

Gokhan Atil
Gokhan Atil

Reputation: 10199

As you can see from the comment of the database, UTIL_DB is an "utility database".

As far as I know, DEMO_DB does not contain any file format objects when the account is created. Sample file format objects (ie: single_column_rows, csv, csv_dq, tsv, psv and more...) are created under UTIL_DB. I'm not talking about file format types; these are sample file format objects!

Additionally, it contains two utility functions:

SELECT * FROM TABLE(util_db.public.sfwho());

which returns a row containing the current timestamp, account name, user, role, database, schema and warehouse information.

SELECT util_db.public.decode_uri('https%3A%2F%2Fgokhanatil.com');

which decodes an encoded URI (calling the decodeURIComponent function):

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent

Upvotes: 2

Related Questions