Hey there, you salty sea dog! As the mighty captain of this pirate crew, you have amassed a treasure trove worthy of legend! Your booty, gathered from distant islands and fierce naval skirmishes, is a veritable mountain of riches, including a fine assortment of valuable trinkets and captured ships. But the time has come to make it easier for your crew to locate all the precious loot hidden in our vault.
To do this job, you’ll need to set up a search system using Snowflake’s Cortex search service so that your crew can quickly find any gems or pieces of gold they’re looking for among the pile.
Your treasure here!
CREATE OR REPLACE TABLE Treasures_Collected (
Treasure_ID INT AUTOINCREMENT,
Treasure_Name VARCHAR(255),
Treasure_Type VARCHAR(255),
Estimated_Value DECIMAL(10, 2),
Discovery_Date DATE,
Discovery_Island VARCHAR(255)
);
INSERT INTO Treasures_Collected (Treasure_Name, Treasure_Type, Estimated_Value, Discovery_Date, Discovery_Island) VALUES
('Golden Chest', 'Jewels', 5000.00, '1721-04-20', 'Tortuga'),
('Pearl Necklace', 'Jewels', 3000.00, '1720-08-15', 'Nassau'),
('Silver Coins', 'Coins', 1500.00, '1722-06-01', 'Cayman'),
('Royal Scepter', 'Relics', 7500.00, '1723-02-25', 'Bermuda'),
('King’s Sapphire', 'Precious Stones', 12000.00, '1723-09-20', 'Havana'),
('Ancient Map', 'Artifacts', 1800.00, '1721-11-12', 'Tortuga'),
('Emerald Ring', 'Jewels', 2500.00, '1721-06-25', 'Nassau'),
('Gold Goblet', 'Relics', 3000.00, '1722-07-18', 'Cayman'),
('Ivory Dagger', 'Weapons', 4000.00, '1723-05-30', 'Bermuda'),
('Opal Necklace', 'Jewels', 13000.00, '1723-12-15', 'Havana'),
('Bronze Statue', 'Artifacts', 2200.00, '1722-09-01', 'Tortuga'),
('Diamond Earrings', 'Jewels', 4000.00, '1721-10-10', 'Nassau'),
('Silver Chalice', 'Relics', 2800.00, '1722-04-12', 'Cayman'),
('Ancient Sword', 'Weapons', 5000.00, '1723-01-05', 'Bermuda'),
('Ruby Pendant', 'Jewels', 15000.00, '1723-08-22', 'Havana'),
('Ceremonial Mask', 'Artifacts', 1900.00, '1721-03-19', 'Tortuga'),
('Gold Bracelets', 'Jewels', 3500.00, '1722-02-10', 'Nassau'),
('Platinum Coins', 'Coins', 1800.00, '1722-11-14', 'Cayman'),
('Sapphire Ring', 'Jewels', 8000.00, '1723-07-07', 'Bermuda'),
('Emerald Necklace', 'Jewels', 16000.00, '1723-11-30', 'Havana');
Here’s what you need to do:
- Create the search index: First, set up the treasure_search_service to catalog all our loot. This will help the crew quickly find every shiny piece and sparkling gem.
- Check the search service: Once the index is ready, make sure the search service is in Bristol shape and fashion. (Here the author has gotten into character a bit too much). Run a preview query to locate all treasures of the type “jewelry.” Use the SNOWFLAKE.CORTEX.SEARCH_PREVIEW function to make sure everything is working properly.
- Get specific: For a more precise search, run a preview query to find all the jewels looted from the island of “Nassau.” This will help your crew reach the right cache without any problems. (The intended result in the picture below).
Set sail on this quest and soon your crew will find its treasure like child’s play!
Leave a Reply
You must be logged in to post a comment.