Refresh database schema

If the tables available to Count through its database credentials change, then you will need to ask Count to fetch the latest schema to see those changes reflected your workspace.

Option 1: from the connection settings

Select your connection from the workspace home page, then Manage connection. The option to refresh the schema is available near the bottom of the page.

If your database contains a large number of tables, Count may not import all of them. To reduce the number of tables that Count attempts to import, an optional filter may be applied that is applied to the schema of the table.

There are two options for the form of this filter.

  1. Javascript regular expression. This regular expression is applied to the schema of each row of table metadata streamed to Count's servers. For example, to only fetch schema that begin with the text "production", the filter should be ^production. To only fetch schema that end with the text "_prod", the filter should be _prod$.
  2. Database native expression. This regular expression is applied to the query executed on your database to retrieve the table metadata. As this is applied to the query, not the table metadata stream, this may give improved performance when executing database schema refreshes. However, the regex itself is database dependent (see table below) and may not be as expressive as the JavaScript filter above. The table below, shows how each filter is implemented.

To test your regular expression, you may want to use a free tool such as RegExr.

A common difference between JavaScript regex and Database native regexes is that the former will match on substring matches by default, but Database native regexes will match the full string. To perform partial matches in Database native regex, you will need to explicitly add a wildcard parameter (e.g. %).

Database regex engine

Database Filter implementationDocumentation link
PostgresschemaName SIMILAR TO <database-regex> in WHERE clausehttps://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP
RedshiftschemaName SIMILAR TO <database-regex> in WHERE clausehttps://docs.aws.amazon.com/redshift/latest/dg/pattern-matching-conditions-similar-to.html
OtherSupported soon - watch this space!

Option 2: from a canvas

You can also refresh the schema directly from the canvas by clicking the refresh icon in the data bar

View the schema refresh status from the icon in the data bar
View the schema refresh status from the icon in the data bar
Loading...