Using Aginity Catalog

It's yet another unique capability of the Aginity platform that reflects our philosophy's most important aspect. This feature allows you to easily create, save, access, reuse, manage, and share catalogs and items stored in them with your colleagues. Your entire team can use the same queries, templates, and catalogs for different purposes and share code changes in seconds. Aginity catalogs have various types of items and very intuitive navigation. 

 

How to Navigate Query Catalog

  1. To start browsing it, go to the left sidebar ⇨ Click on the Catalog tab, and you will see its menu field.

mceclip0.png

  1. You can also find a particular Catalog via our Discovery Panel.

πŸ”Ž TIP: For details, check out our guide on how to use Discovery Panel.

  1. To check key metadata items and statistics about a Catalog, right-click on its query and tap on Edit Details.

mceclip1.png

 

Adding Items to Catalog

  1. Aginity gives you the ability to create Catalog items from scratch – either New Entry or New Folder.

There are two ways to do it:

  • Directly from the Catalog Browser by clicking the (…) symbol on the right from the Catalog

mceclip2.png

  • Right-click in Catalog Browser and select what you would like to add.

mceclip3.png

  • When you're adding entries, fill in the details in a pop-up and choose a type of Catalog entry you want to create.
 

mceclip7.png

  1. You can organize your Catalog by any number of directories and sub-directories of queries and give each query a proper name, as shown below.

mceclip8.png

πŸ”Ž TIP: Top 5 Ways to Optimize Your Catalog in Aginity Pro

  1. To access and edit queries, use one of these options:
  • Drag a catalog query into an empty query panel, as shown below. After that, you will see the full catalog query available for editing or execution.

mceclip9.png

  • To edit queries (e.g., change the SQL itself) within a query panel, right-click on a catalog item and choose Edit code in tab. Or double left-click on a query, and Aginity will open it in a tab.

mceclip3.png

  1. To save an edited query:
  • Right-click on its tab and select Save Tab.

mceclip10.png

 

πŸ”Ž NOTE: If you see a (*) symbol next to the tab name in a query panel,

it means a change has not been saved.

  • You can also directly select a part/section/lines of SQL statement(s) in a query panel worksheet. It creates a new tab that you can save to a new Catalog, as shown below. Just click on Save Selection to Catalog and provide metadata about a query you are adding in a New Catalog Item pop-up.

mceclip4.png

πŸ”Ž NOTE: It's important to fill out the description metadata as the search engine will use it.

The more data you provide about the usage context and key business terms,

the better search results you will get.

 

Using Parameters in Catalog SQL

We consider it as one of the most innovative Aginity features. Below, you will find a helpful insight about the basic syntax required to call Catalog items from within SQL statements.

In this example, we use a parameter within a Catalog item called CitySelect.

  1. Here is the code you need for the Catalog. Note that the highlighted line has the parameter in it.

1

2

3

 SELECT *

 FROM addresses

 WHERE city = $city;

  1. To call it from the query panel, issue the following command.

1

 @{CitySelect}

Note the highlighted reference to the object in the Catalog.

  1. This is the code that Aginity will pass to the database.

1

2

3

 

 SELECT *

 FROM addresses

 WHERE city = 'Chicago';

πŸ”Ž NOTE: Upon execution of the command, Aginity will ask you to supply a parameterized value.

 

How to Create Reference and What Does it Mean

Creating a Reference means that you can take a part of the code from some query and insert it in another one without the need to copy-paste. You just refer to it via a special link. The most important benefit of this feature is that when you edit something in a part of code you referred to, Aginity will automatically update its SQL in all catalogs that use it. 

  • You can insert a reference to a Catalog directly in a query. Right-click on the needed query ⇨ Choose Insert Reference at Cursor.

mceclip11.png

  • Or refer to a Catalog through Aginity Discovery Panel.

πŸ”Ž TIP: To know more, visit our Discovery Panel guide.

 

Import and Export Items from Catalog

In Aginity, you can import and export both your entire catalogs or any folders selected within them.

Exporting Steps

  1. To export your items or Catalog, you can use several options: 
  • Right-click on a Catalog folder and select Export.

mceclip12.png

  • Or click on the (…) symbol on the right from the Catalog header ⇨ Choose Export Catalog.

mceclip13.png

  • Go to File tab ⇨ Select Export Catalog.

mceclip14.png

  1. In an Export Catalog pop-up, choose what you want to save β€” an entire folder or a selection of items within it. And specify whether you wish to include Sensitive Data.

mceclip15.png

  1. Name the file and set the location to where you will save it.

πŸ”Ž NOTE: We highly recommend regularly export your catalogs to portable

data storage devices to prevent accidental loss of queries.

 

Importing Steps

With importing, you can restore catalog items you may have lost and collaborate with other engineers by sharing your SQL. In turn, it might help make you a more efficient and consistent SQL developer.

  1. To import your items or Catalog, you can use the following options: 
  • Right-click on a designated folder and select Import.

mceclip18.png

  • Or click on the (…) symbol on the right from the Catalog header ⇨ Choose Import Catalog.

mceclip20.png

  • Go to File tab ⇨ select Import Catalog

mceclip21.png

  1. Pick the files/items you want to import. By default, Aginity Catalog files have the .aginitypkg extension.

mceclip22.png

  1. Tap the Import button, and you are all set.

πŸ”Ž TIP: Aginity also maintains a Github repository of available catalog queries.

They are either administrative queries for specific platforms,

data engineering queries that do powerful transformations against generic data,

or analytic queries showing how to do cool things in SQL.

 

How to Share Catalogs (in Aginity Premium)

The greatest advantage of our application's Premium version is that you can easily and quickly share queries and catalogs with the selected users. This accelerates communication between teammates, for example, and speeds up catalogs' management and reuse significantly.

  1. To get started, right-click on the designated folder ⇨ Choose Share.

mceclip23.png

  1. Select the Type of sharing you need β€” for individual users or a group of them. You can also filter available users by typing in their names.

mceclip24.png

  1. Specify the Access Level you want to grant to those you're sharing a Catalog with.

mceclip25.png

    4. Tap Share, and enjoy productive teamwork!

 

πŸ”Ž TIP: In Aginity Premium, you can also use drag and drop  to move any Catalog entry in another already shared folder.

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.