Redash assets app
TL;DR
Learn how to crawl Redash assets and publish them to Atlan for discovery.
The Redash assets app crawls Redash queries and dashboards and publishes them to
Atlan. Build it with the AtlanRedash builder.
Creating an app creates a new connection
Each create mints a new connection and new assets. To re-crawl, re-run the existing workflow (see Re-run an existing app).
API key
- Python
Redash crawling with an API key
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.apps import AtlanRedash
client = AtlanClient()
response = (
AtlanRedash(client)
.api_key( # (1)
password="••••••", # (2)
host="redash.example.com", # (3)
)
.connection(
name="production-redash",
admin_roles=[client.role_cache.get_id_for_name("$admin")],
)
.run(name="redash-prod")
)
print(response.slug, response.run_id)
- Step 1—Credential. API-key auth; the key is vaulted.
- Required. The Redash API key.
- Required. The Redash host. The port (
port=) is optional.
Configuration options
Redash filters queries and dashboards by tag. All options are optional:
- Python
Redash metadata configuration
(
AtlanRedash(client)
.api_key(password="••••••", host="redash.example.com")
.connection(name="production-redash", admin_roles=[...])
.include_queries_with_tags(["prod"]) # (1)
.exclude_queries_with_tags(["draft"]) # (2)
.include_queries_without_tags(True) # (3)
.include_unpublished_queries(False) # (4)
.include_dashboards_with_tags(["prod"]) # (5)
.exclude_dashboards_with_tags(["draft"]) # (6)
.include_dashboards_without_tags(True) # (7)
.alternate_host_url("https://redash.mycompany.com") # (8)
.advanced_config("...") # (9)
.run(name="redash-prod")
)
- Crawl queries having these tags. Exclude takes priority over include.
- Skip queries having these tags.
- Also include queries that have no tags.
- Whether to fetch unpublished queries.
- Crawl dashboards having these tags. Exclude takes priority over include.
- Skip dashboards having these tags.
- Also include dashboards that have no tags.
- Protocol + host used in the "View in Redash" links.
- Controls advanced asset-inclusion features.