Learn how to view and save charts in Tathya for insightful data visualization.
You will now be redirected to the “Main Chart Panel” where your chart is ready to view.
When creating charts using SQL queries, Tathya by default provides visualization in a “table” format, but you can customize it based on your requirement.
Navigate to the "data" tab. This is where you can transform the query results into a visual representation.
Here you will encounter two options under the "Data" tab, specifically under the "QUERY MODE" section: "Aggregate" and "Raw Records." These options determine how the data is processed and presented in the resulting chart. Let's delve into each option:
Aggregate Mode Aggregate mode is used when you want to perform aggregate functions (e.g., COUNT, SUM, AVG) on your dataset. It is suitable for summarizing and visualizing data at a higher level.
Aggregation Functions Allows you to apply aggregation functions to your selected columns. For example, you can count the number of records, calculate the sum of a numeric column, or find the average.
Aggregate mode is commonly used when creating charts like bar charts, pie charts, or line charts where you want to visualize summarized information.
Raw Records Mode Raw Records mode is used when you want to retrieve individual, unaggregated records from your dataset. It provides a detailed view of each record.
No Aggregation Functions Does not require the use of aggregation functions. The query retrieves raw, unprocessed records from the specified columns.
Raw Records mode is useful when you need a detailed, record-level view of the data. It's suitable for creating charts that display individual data points without summarization.
How the Raw Mode works:
Column Names The column names in your SQL query result set become the headers or fields in the table. Each column in the result set is mapped to a corresponding column in the visualization.
Data Types Tathya attempts to infer the data types of each column based on the values in the result set. This helps in appropriately formatting and displaying the data.
Automatic Table Creation When you execute the query in "Raw Records" mode, Tathya automatically creates a table or chart with the mapped columns, displaying the individual records retrieved by the query.
Dynamic Mapping The mapping is dynamic, meaning that if your SQL query result set structure changes (e.g., adding or removing columns), Tathya adjusts the mapping accordingly when you execute the query.
No Aggregation Since "Raw Records" mode is focused on displaying individual records without aggregation, each row in the result set is treated as a separate data point.
You also have additional configurable options such as Filters, Ordering, and Row Limit.
Filters Filters allow you to narrow down the rows displayed in your result set based on specific conditions. You can filter the data to show only rows that meet certain criteria.
Ordering Ordering allows you to sort the result set based on one or more columns. You can specify the order (ascending or descending) for each column.
Row Limit Row Limit allows you to control the number of rows displayed in the result set. This is particularly useful when dealing with large datasets, allowing you to view a manageable subset of the data.
Be cautious when using row limits, especially when conducting analysis or reporting. Setting a too-low limit might lead to incomplete insights, and it's essential to balance performance considerations with the need for comprehensive data.
In your SQL queries, you can write specific details and conditions to retrieve data that matches your requirements without the need for additional filters in the chart.
For example, you can use the WHERE clause in your SQL queries to filter data at the database level before it even reaches Tathya. This can be more efficient as it reduces the amount of data transferred between the database and Tathya.
Similarly, you can use ORDER BY in your SQL queries to specify the sorting order of the results, and LIMIT to control the number of rows returned.
Writing precise and optimized SQL queries can streamline the data retrieval process, ensuring that the results align with your expectations without relying heavily on post-processing in the visualization chart.
Adjust other settings such as colors, labels, and tooltips as needed from the “Customize” option, present right next to the data tab.
You can also choose the type of chart that best suits your data. (e.g. A Line Chart can be ideal for displaying trends over time, a Bar Chart can be useful for comparing values across different categories, a Pie Chart can be effective for illustrating parts of a whole.)
For example, if you choose a Line Chart, specify the columns you want on the x-axis and y-axis. the date might be on the x-axis, and total sales on the y-axis.
Once you have made the required modifications, click on “Update chart”.
In the top-left corner, give your chart a descriptive name for easy identification within Tathya.
Navigate to the top-right corner and click on the "SAVE" button. A Save Chart panel will appear with the Chart Name field auto-populated.
After saving, find your chart in the Charts tab for quick access.
Learn how to navigate the SQL Lab interface in Tathya and execute SQL queries by selecting the appropriate database and schema.
To effectively navigate through the SQL Lab interface in Tathya and execute SQL queries, follow these steps for selecting the database and schema.
In the top navigation menu, locate and click on the SQL Lab
option. This action will direct you to the SQL Lab interface designed for crafting and executing SQL queries.
In SQL Lab, Tathya provides dropdown menus where you can choose the desired database and schema before writing and executing your SQL queries. This step is crucial for accurately pinpointing the location of your data and ensuring that your queries fetch information from the correct database and schema.
We have access to multiple databases as we are dealing with data from different projects and sources. All the configured databases will be visible here.
Additional information: In MySQL, the term schema
is synonymous with a database,
while in PostgreSQL, schemas represent different categorizations within a project. If your data source supports schemas, selecting the correct schema ensures that your SQL queries target the specific subset of data you intend to analyze.
Utilize various clauses such as SELECT, FROM, WHERE, GROUP BY, and others to shape the logic of your SQL query.
Tathya offers a multi-tab environment, enabling you to work on multiple queries simultaneously.
Based on the output you desire, insert the query here and click the Run Query
button to execute the query.
Upon executing the SQL query, Tathya sends the query to the connected database. The database parses the query, breaking it down into its structural components, checking for syntax errors, and understanding the logical flow.
Result Set Interpretation
Post successful parsing, the database retrieves a result set—a table of data that matches the specified criteria. Tathya then automatically interprets the structure of this result set, analyzing the columns and their data types.
Dynamic Dataset Creation
Leveraging the information obtained from the parsed result set, Tathya dynamically generates a dataset. This dataset mirrors the structure of the result set, capturing the columns and their data types.
Column Mapping
Each column in the result set is mapped to a corresponding field in the dataset. This mapping ensures that the dataset accurately represents the data retrieved by the SQL query.
Ensure the dataset returned aligns with your expectations. This is the dataset that will be used to create the chart.
Now, navigate to Save and then select “Save dataset” from the dropdown menu, so that you can use the same dataset to create multiple charts in future.
There are a number of query errors that can occur due to a misalignment between your query and the database. Some examples include:
Bad Reference: A query can fail because it is referencing a column and/or table that no longer exists in the datasource. You can either modify the query accordingly or remove the column from the query.
Unsubmitted Query: A query will not even be submitted to the database if it is missing required parameters. You should define all the parameters referenced in the query in a valid JSON document.
Once satisfied with the derived output, click on Create Chart.
The ability to create charts based on specific queries within Tathya empowers users to derive actionable insights from their data. By allowing users to visualize specific subsets of data, this feature enhances decision-making processes and enables users to identify trends, patterns, and anomalies efficiently.
Access SQL Lab: Log in to Tathya and navigate to the SQL Lab feature.
Craft SQL Query: Select the database for which you want to create the Query. Write an SQL query with a WHERE clause specifying the desired criteria. For example, to create a chart showing orders created in the past hour:
Execute Query: Click the Run Query
button to execute the SQL query and generate the dataset.
Save Dataset: Once the dataset is generated, save it by following the prompted steps. This will open a new page with options to customize the dataset.
Add Chart Details: Enter a descriptive name for the chart, select the desired chart type, and configure additional settings as needed.
Create Chart: Click on the Create Chart
button to generate the chart based on the dataset created from the specific query.
Creating charts in Tathya without specific queries is essential for flexible data analysis. This feature allows users to prepare for future data scenarios by initially including all available data, even when subsets may not exist at the time of dataset creation.
Access SQL Lab: Navigate to the SQL Lab within Tathya.
Craft General SQL Query: Select the database and write a general SQL query to retrieve all available data without specific conditions. For example:
Execute Query: Click the Run Query
button to execute the SQL query and generate the dataset containing all available data.
Save Dataset: Once the dataset is generated, save it by clicking on the save button. This will open a new page with options to customize the dataset.
Create Chart: Proceed to create a chart from the dataset to visualize the overall data trends.
Unlock Dataset: Click on the options icon against the dataset's name to open a new form. Unlock the dataset by clicking on the lock icon to make changes.
Add WHERE Clause: If necessary, add a WHERE clause to the SQL query to filter the dataset based on specific criteria whenever there is data that follows the WHERE clause. For example:
Save Dataset: Save the dataset by clicking on the save button to retain the modifications made.
Update Chart: After saving the dataset, update the chart to reflect the changes made to the dataset and visualize the updated insights.
Creating datasets with empty data is crucial in Tathya. It prepares charts for future data arrivals, enabling users to proactively set up their analytics. By allowing users to create charts with empty datasets, this feature fosters adaptability to changing data conditions.
Create Empty Dataset: Open SQL Lab and create an SQL query that returns no data.
Save Dataset: Once the query is selected or created, click on the Save Dataset
button to save the empty dataset.
Redirect to Chart: After saving the dataset, you will be redirected to the chart creation page automatically.
Name the Chart: Provide a descriptive name for the chart to identify its purpose or intended data source.
Custom SQL: Under Custom SQL,
paste the names of columns one by one to define the dataset structure accurately.
Save Chart: Click on the save chart button to save the chart configuration for future use.
Discover how to grant access to charts in Tathya for seamless collaboration and editing, as well as adding charts to dashboards without visibility issues.
In Tathya, it's essential to grant access to charts to other users to facilitate seamless collaboration and editing processes. Moreover, granting access allows users to add the chart to dashboards without encountering visibility issues. Here's how to grant access:
Navigate to the charts section within Tathya.
Find the specific chart you wish to grant access to.
Go to the chart and locate the "Actions" section, located on the right-hand side.
Click on the "Edit" option within the actions menu.
A popup window will appear, providing various options for chart management. Navigate to the "Access" tab within this popup.
In the "Access" tab, you'll find a section where you can add relevant users who are allowed to alter the chart.
Enter the names or usernames of the users you wish to grant access to. This list should include individuals who may need to edit the chart or add it to dashboards.
Once you've added the relevant users, save your changes. This ensures that the specified users have the necessary permissions to edit the chart and include it in dashboards.
Editing a chart without access rights creates a new chart instead of modifying the original, leading to duplication. Access is crucial to maintain chart integrity and avoid unnecessary duplication. Additionally, lacking access to a chart prevents it from appearing in the list of options when adding charts to an existing dashboard.
When you create charts using SQL queries, Tathya lets you use the generated dataset to create new charts. (Dataset serves as the primary source of your data. It contains the information you want to visualize)
This way you can create multiple charts to represent the same dataset in different ways. This is especially beneficial when you want to represent different facets of the data or tailor visuals for specific user groups.
Navigate to the "Charts" section in Tathya.
Choose the Saved Dataset
When creating a new chart, you'll have the option to choose an existing dataset. Look for the option "Datasets" and select the dataset you saved earlier.
Select the Chart Type
Choose the chart type that best suits the insights you want to convey.
Configure the New Chart
Configure the new chart using the selected dataset. You can define metrics, dimensions, and customize the chart settings.
When creating charts directly from SQL queries, columns are pre-mapped based on the query's output. However, using the "Create Chart" option allows you to drag and drop individual columns so that you have fine-grained control over what data is visualized. This is especially useful when dealing with large datasets where not all columns are relevant to every analysis.
Save the New Chart
Once satisfied with the new chart configuration, save it.
HotWax Commerce facilitates the exchange of data between systems, but errors can occur during import/export processes, potentially leading to inaccuracies. To address this, the platform provides LogInsights reports, which are stored in Solr-index core. By leveraging the powerful indexing capabilities of Solr, HotWax Commerce enables efficient data retrieval and analysis, supporting performance monitoring, troubleshooting, and reporting activities. These reports offer insights derived from system logs, allowing users to easily identify any data transfer failures.
LogInSight charts can be set with the following steps:
The logInsights
core within HotWax Commerce provides users with valuable insights derived from system logs, facilitating the generation of superset reports. This feature is crucial for users who need to analyze system performance, troubleshoot issues, and make informed decisions based on data-driven insights.
Steps to set LogInsight Core:
Accessing the Search Admin Page:
Navigate to the hamburger menu in the HotWax Commerce interface for the specific instance.
Click on Search Admin
to access the page for managing Solr indexing.
Managing Solr Cores with Core Operations:
Within the Search Admin page, locate the Core Operations
section.
This feature allows users to effectively manage Solr cores, ensuring optimal performance and organization of indexed data.
Refreshing the logInsights Core:
Identify the logInsights
core within the list of Solr cores.
Click on the Refresh Core
button associated with the logInsights core.
This action updates the Solr index with the latest data from system logs, ensuring synchronization with any recent changes or updates.
NiFi, an open-source data integration tool, is utilized to automate data flow between systems in real time. A flow is to be configured in NiFi to filter out failed JSON files from SFTP locations and redirect error-prone data to logInsights core for logging purposes.
After the flow setup, it is imperative to insert dummy data. This step is crucial for querying as fields are dynamically indexed in the Solr core based on the dummy data. The dummy data should be inserted with a docType of TEST
to ensure exclusion from Superset charts.
System administrators can utilize the Solr database creation feature to set up and manage databases for log data, facilitating effective monitoring and troubleshooting of system performance.
Step-by-Step Usage Instructions
Access Settings:
Navigate to the Settings
section within the HotWax Commerce interface.
Select Database Connections:
Within Settings, locate and select the Database Connections
option.
Add a New Database:
Click on Add a New Database
located in the top right corner of the interface.
Choose Database Type:
Under the supported dashboard search bar, select the Others
option.
Name the Database:
Provide a descriptive name for the database under the Display Name
category to easily identify it.
Construct URL:
Create the database URL in the following format: solr://test-oms.hotwax.io:443/search/logInsights?&use_ssl=true&token=<JWT_token>
Generate JWT Token:
Generate a JWT token from the OMS using an integration user. Refer to this document to know how to generate the JWT token.
Replace Token Placeholder:
Replace <JWT_token>
in the URL with the generated token.
Specify Instance Name:
Write the instance name of the brand for which you are creating the dashboard. For example, if the instance name is test-oms
, input it accordingly.
Test Connection:
Paste the constructed URL as a SQLAlchemy URL and test the connection.
Set Chart Cache Timeout:
In the advanced tab -> performance, set the CHART CACHE TIMEOUT
property to a desired value, such as 10000, to manage cached data effectively.
Connect:
If the connection test is successful, click on the Connect
button to finalize the database creation process.
Creating Solr queries within Tathya requires a different syntax compared to traditional SQL queries used in Tathya dashboards. Here's how you can create Solr Queries:
Define Time Range:
Use the appropriate time syntax to specify the desired time range for the query. For example:
Specify Fields:
List each field required in the query's result set. Provide aliases if necessary. For example:
Handle Special Characters:
If any field name contains special characters, enclose it within back-quotes (`).
Order Results (Optional):
If sorting is needed, include the attribute in the select clause and specify the desired sorting order. For example:
Limit Results:
Ensure to include the limit
method to restrict the number of returned records, especially for large result sets.
Solr Dashboard Creation is a crucial feature within the HotWax Commerce platform, providing users with the capability to visualize data from Solr databases through intuitive charts. This feature significantly enhances users' ability to analyze and interpret data, empowering them to make informed decisions and optimizations within their business operations.
Step-by-Step Usage Instructions:
Navigate to SQL Lab: From the home page, access the SQL Lab section within the HotWax Commerce interface.
Select Solr Database: Choose the Solr database you have created to run the query from. This ensures that the query retrieves data from the correct source.
Write Solr Query: Write the Solr query in the SQL Lab editor to fetch the desired data from the selected Solr database.
Retrieve Data: Once you have formulated the query and retrieved the desired data, proceed to the next step.
Create Chart: Click on the Create chart
button to initiate the chart creation process.
Name and Save Chart: Give the chart a descriptive name that reflects its content or purpose, and save it for future reference.
Add to Dashboard: Optionally, add the created chart to the dashboard of your choice for easy access and visibility alongside other relevant data visualizations.