Creating a CDA
Data Connection & Access in one file ..

Mandatory Connection Attributes
ID
• Defines a unique identifier
• Used to reference specific connections in queries
• Must be unique across all connections
Type
• Specifies the connection type
• Determines required internal elements
• In CDE: Automatically configured based on selected data source
Creating Data Access
Once connections are established, proceed to create data access queries. Each query should follow this structure:
id
This is used to define the data access identifier that will be used in the components.
connection
This is the identifier of the connection created previously. Different DataAccess id can share the same connection id.
access
This defines whether the data access is visible. Here we can have one of two values: private or public. Private will say that the data access will not be visible, and public says the opposite. You may want to define that a data source is private when it is just to be used inside compound queries to create unions or joins between queries.
cache
This defines whether the results of the query will be cached. Possible values are true and false. You should set it to true if you want your query to be cached. The default value is true.
cacheDuration
This defines the cache duration in seconds. The query will be executed again after the specified seconds have passed. The query will be executed and the results cached again. This attribute will be ignored when the cache is set to false. The default value is 3600, the same as one hour expressed in seconds.
type
We have the same goal when defining a connection and a Data Access, but they have different purposes, so we also need to specify the query type.
Here's an outline of a connection and data access using a JSON query.
x
x
Scripting data sources should be used cautiously for two key reasons.
First, they execute extremely quickly, which can mask potential performance issues in your dashboard that would be apparent with real data sources. This could lead to overlooking important optimization opportunities.
Second, scripting data sources typically return static results, unlike real queries that respond dynamically to parameter changes. This makes it difficult to test how your dashboard will behave with varying data conditions. Therefore, it's recommended to primarily work with real data sources to ensure your dashboards are properly optimized and functioning as intended.
Last updated
Was this helpful?
