# Resource Heirarchy

> The StackQL resource hierarchy: how providers, services, resources and methods map cloud and SaaS APIs onto queryable SQL tables.

Source: https://stackql.io/getting-started/resource-hierarchy

See also:  
[[` SHOW `]](/language-spec/show) [[` DESCRIBE `]](/language-spec/describe)

* * * 

Objects in StackQL are represented in the following hierarchy, with an example using the Google Cloud provider shown:

### Using the StackQL Object Notation

This hierarchy is expressed in the object notation `<provider>.<service>.<resource>` within the context of a given provider, an example of this object notation used in a [`SELECT`](/language-spec/select) statement is shown here:  

```sql
-- Selecting all resources deployed within a service using a basic SELECT statement
SELECT * FROM google.compute.instances
WHERE project = 'stackql-demo'
AND zone = 'australia-southeast1-a';
```

```sql
-- Selecting all resources deployed within a service using a basic SELECT statement
SELECT * FROM google.compute.instances
WHERE project = 'stackql-demo'
AND zone = 'australia-southeast1-a';
```

:::note

If a resource or service contains a period (`.`) in the name, use the backtick symbol (__`__) to encapsulate the resource name, for example:

```sql
SELECT * FROM google.container.`projects.zones.clusters.nodePools`;
```

:::

### Showing Services in a Provider

Services within a provider can be listed using the [`SHOW SERVICES`](/language-spec/show) command as shown here:  

```sql
-- Returns all of the available services in a cloud provider
SHOW SERVICES IN google;
```  

### Showing Resources within a Service

Similarly resources within a service can be listed using the [`SHOW RESOURCES`](/language-spec/show) as shown here:

```sql
-- Returns all of the available resources in a cloud provider service
SHOW RESOURCES IN google.compute;
```  

### Showing Fields within a Resource

Fields within a resource can be displayed using a [`DESCRIBE`](/language-spec/describe) statement as shown here:

```sql
-- Returns all of the available fields in a resource
DESCRIBE google.compute.instances;
```

### Showing Executable Methods for a Resource

Methods available for a resource can be displayed using a [`SHOW METHODS`](/language-spec/show) command as shown here:

```sql
-- Show all of the available methods for a resource
SHOW METHODS IN google.compute.instances;
```
