Best Of
Re: Stacked Bar Chart with Line Graph
Okay…I get it. Something like this Domo blank brick….
Re: I converted a DDX bricks to App in edit mode
I'm not seeing any way to convert back, or undo.
Considering there was no confirmation dialog this was a surprise to me!
I put an idea into the Ideas Exchange for this here:
Confirmation Dialog for Convert to App button — Domo Community Forum
Re: Templated ETLs
I created a browser extension that does this!
It will be releasing in the next 1-3 weeks. You can sign up to be notified when it is released on my website:
Re: Automate file upload
I was only introduced to using Python inside Jupyter Notebooks in the past few months. But it has worked well. Somewhere out there are demo pages and videos. Short and sweet - I go to "Data" and on the left side, there are three dots. Click there and you will find Jupyter Notebooks. Within your Python code you can edit, check responses, debug portions at a time, save and schedule like you do Magic ETLs. It didn't take me long after watching some video I found through Google, to muster up the courage and create a "sample" workbook. I created a Python page and hit the run icon and it did what I told it. Then I got a little more advanced.
My first attempt at your question would be something like:
pip install pandas domo-py glob2
This would install the pandas, domo, and glob libraries. Then something like:
import os
import glob
import pandas as pd
from domo import Domo
# Configuration for Domo API
DOMO_CLIENT_ID = 'your_client_id'
DOMO_CLIENT_SECRET = 'your_client_secret'
DOMO_API_HOST = 'api.domo.com' # or use 'api.domo.com' for production
# Folder where CSV files are located
CSV_FOLDER_PATH = '/path/to/your/csv_folder'
# Domo dataset details
DATASET_ID = 'your_dataset_id' # Replace with your actual Dataset ID
def read_csv_files(folder_path):
# List all CSV files in the specified folder
csv_files = glob.glob(os.path.join(folder_path, '*.csv'))
# Initialize an empty list to hold DataFrames
dataframes = []
# Loop through the list of CSV files
for file in csv_files:
# Read each CSV file into a DataFrame
df = pd.read_csv(file)
# Append the DataFrame to the list
dataframes.append(df)
# Concatenate all DataFrames into a single DataFrame
combined_df = pd.concat(dataframes, ignore_index=True)
return combined_df
def upload_to_domo(df, dataset_id):
# Initialize Domo client
domo = Domo(DOMO_CLIENT_ID, DOMO_CLIENT_SECRET, host=DOMO_API_HOST)
# Convert DataFrame to CSV for upload
csv_data = df.to_csv(index=False)
# Upload the CSV data to Domo
domo.datasets.data_import(dataset_id, csv_data, content_type='text/csv')
print(f'Data uploaded to Domo dataset {dataset_id} successfully.')
# Main execution
if __name__ == '__main__':
# Read and combine CSV files
combined_df = read_csv_files(CSV_FOLDER_PATH)
# Upload combined DataFrame to Domo
upload_to_domo(combined_df, DATASET_ID)
Re: Automate file upload
I like @MarkSnodgrass suggestion. You could also use Python scripts using the imaplib, email, and os libraries to automate the download of attachments from emails. Alternatively, third-party tools could possibly automate the download process.
Domo Workbench could probably do it, but you would need to handle the specifics for files, subfolders, and transformations.
Re: Automate file upload
Even though your e-mail has multiple files, you can set up multiple forwarding rules and use the dataset via e-mail connector to handle each file. You can use the attachment name expression field to differentiate which file you want to connect to. Check out the documentation in this KB article.
https://domo-support.domo.com/s/article/360042931954?language=en_US
Re: Automate file upload
@vaco take a look at the Amazon S3 Advanced connector. I think this will pickup multiple files.
https://domo-support.domo.com/s/article/360043436353?language=en_US
Re: Filter Based on Percentage Change of Chart
Hi @Josh_Evans20,
Here's an example of calculating the percentage difference in Beast Mode:
(ZZ_VALUE_THIS_M-ZZ_VALUE_LAST_M)/((ZZ_VALUE_THIS_M+ZZ_VALUE_LAST_M)/2)
This month's turnover (ZZ_VALUE_THIS_M):
SUM(CASE WHEN YEAR(CURRENT_DATE()) = YEAR(Date) AND MONTH(CURRENT_DATE()) = MONTH(Date) THEN Parts Kits Value ELSE 0 END)
Previous month's turnover (ZZ_VALUE_LAST_M):
SUM(CASE WHEN YEAR(CURRENT_DATE()) = YEAR(Date) AND MONTH(CURRENT_DATE())-1 = MONTH(Date) THEN Parts Kits Value ELSE 0 END)
Filter formula (ZZ_FILTER). You can customize it to suit your requirements. You can also implement a slider variable or free input variable to easily select the filtering value for the difference.
CASE
WHEN (ZZ_VALUE_THIS_M-ZZ_VALUE_LAST_M)/((ZZ_VALUE_THIS_M+ZZ_VALUE_LAST_M)/2) > 0 THEN 'Above'
ELSE 'Below'
END
Here is the result using the HTML table:
You can adjust the table by selecting the filter:
Re: Dataflow wont run!
@MichelleH I checked to see if it was already running, and it wasn’t. I left it for a day and came back to it, but I’m still getting the same error.
Re: Substitute for if / then statements
The main difference between the two is that the IFNULL function takes two arguments and returns the first one if it's not NULL or the second if the first one is NULL.
The COALESCE function can take two or more parameters and returns the first non-NULL parameter, or NULL if all parameters are null.
In your case, either one will work.





