In addition to each connector’s details, there are some additional options that can be configured in any source. These options can either be set in the config object of the source schema to set a default configuration for all the queries, or in each query itself using a special keyword.

Example

type: 'postgres'

details:
  # Connection details
  # ...

config:
  ttl: 3600 # 1 hour of lifetime
  materialize: false # Do not materialize the query (default)

Specific query configuration

You can also set a specific configuration for each query by adding a custom tag in the query itself. For more information, go to Queries advanced configuration.

Available options

ttl
number

The number of seconds that the data will be cached in the Latitude cache. If the data is older than the TTL, Latitude will fetch the data again from the source. If not set, the default TTL is infinite, so the only way to refresh the data is by actually sending a fetch request with the force flag. More information.

materialize
boolean

Set this value to true to materialize the query. More information.

Be careful setting materialize: true in all the source. It will materialize all the queries. Is better to set this setting at query level as explained in queries documentation