---json
{
"name":"List SQL Tables",
"canonical":"howto:database:list_tables",
"title":"How to list SQL Tables",
"description":"This howto will show you how to list SQL Tables"
}
---
====== Tabli - How to list SQL Tables ======
===== About =====
This [[howto:howto|How-to]] will show you how to use the [[docs:tabli:data:list|tabli data list]] command to list [[docs:resource:table|SQL Table]].
===== Steps =====
==== Prerequisites ====
You should have ''Tabulify'' installed on your computer. [[howto:getting_started:1_install]]
==== Listing all tables ====
Listing all the tables from the [[docs:connection:tpcds|Tpcds connection]] with a [[docs:resource:data_selector|data uri selector]] and the star ''*'' [[docs:resource:data_selector#glob pattern|glob wildcard character]]
tabli data list *@tpcds
PATH
------------------------
call_center
catalog_page
catalog_returns
catalog_sales
customer
customer_address
customer_demographics
date_dim
dbgen_version
household_demographics
income_band
inventory
item
promotion
reason
s_call_center
s_catalog_order
s_catalog_order_lineitem
s_catalog_page
s_catalog_returns
s_customer
s_customer_address
s_inventory
s_item
s_promotion
s_purchase
s_purchase_lineitem
s_store
s_store_returns
s_warehouse
s_web_order
s_web_order_lineitem
s_web_page
s_web_returns
s_web_site
s_zip_to_gmt
ship_mode
store
store_returns
store_sales
time_dim
warehouse
web_page
web_returns
web_sales
web_site
==== Listing one table with its dependencies ====
Listing the table ''store_sales'' from the [[docs:connection:tpcds|Tpcds connection]] and its [[docs:resource:dependency|dependencies]]
tabli data list --with-dependencies store_sales@tpcds
PATH
----------------------
customer
customer_address
customer_demographics
date_dim
household_demographics
income_band
item
promotion
store
store_sales
time_dim
==== Filtering the output with a glob pattern ====
=== Listing all returns ===
Listing all the tables that have ''return'' in their name with a [[docs:resource:data_selector|data uri selector]] and its [[docs:resource:data_selector#glob pattern|glob pattern]]
tabli data list *return*@tpcds
PATH
-----------------
catalog_returns
s_catalog_returns
s_store_returns
s_web_returns
store_returns
web_returns
=== Listing all ''returns'' and ''sales'' tables ===
With [[docs:system:tpcds|tpcds]], the [[docs:resource:data_selector#glob pattern|glob expression]] ''{*returns,*sales}'' will returns all ''returns'' and ''sales'' tables.
tabli data list {*returns,*sales}@tpcds
PATH
-----------------
catalog_returns
catalog_sales
s_catalog_returns
s_store_returns
s_web_returns
store_returns
store_sales
web_returns
web_sales