-
Trying to Find the Top 10 part numbers by $'s for the year for each plant department.
I have a large table showing plant department and their part numbers with the quantity scraped / dollar amount scraped as the values. Is there a way to only show the top 10 part numbers by department in dollars? Trying to be able to always keep track of what top part numbers are being scraped. Thanks
-
Status tracking for hot board
I am wanting to track a hot board status for part numbers and want to use the status to track through the process. Is there a formula or beastmode that can remove the in process data once the ticket has been fulfilled and reads 'completed'. For example… Once the part number 3333-000 by Robert Storey was completed can the…
-
MySQL Join Optimisation - 2 hours, for what should take seconds!!
Hi, I have been trying to optimise a MySQL script, which for some reason is taking over 2 hours to run! I've been unable to figure out why the script takes so long to run, so any help and tips for identifying the cause of the problem would be appreciated. The script is very simple, essentially: SELECT x.*, y.field1,…
-
Is there a better way to perform a variable-length recursive query using MySQL ver. 5.6?
I'm looking to perform a recursive query on a data hierarchy with an unknown amount of levels. I've found that making use of stored procedures (or simple self-joins if the there are very few levels) works well enough most of the time, but it can be messy and time-consuming. From what I understand, Common Table Expressions…
-
Add Data that has been modified in the last 7 days
I have a snowflake dataset that has a modified date column. I want to merge the data that has been modified in the last 7 days to the dataset. Sometimes an order is modified after its placed and we want to capture the new values of the order. I have used this query but its not working SELECT * FROM "TABLE" WHERE…
-
How can I use the MATCH() function with a declared variable string in a MySQL dataflow?
I am looking for assistance in determining how to use the value of a string variable to DECLARE a persistent variable AS a STRING that can be passed into the MATCH() function in MySQL transform.
-
Can someone give me DDX Bricks examples which use traditional SQL (using JOIN) to query?
I want to use traditional SQL to query to fetch data from database in ddx bricks. My sql query contains INNER JOIN. Can it be possible? If yes, please refer to some existing example ddx cards or give me some example where using join and access result parameters from array-of-objects format are explained. Thanks in advance.
-
Need help reviewing sql query used to create domo sql dataflow
Hello, I am working on moving one of our SQL Queries to Domo. This query looks for users who have made a purchase in a month and no purchases in any month before or after. I was able to move this query but I am getting slightly different results. Since dates are used differently in both queries I wonder if I made a mistake…
-
Generate Date Range Column from Two Date Columns
Hi all ! Im trying to generate a date column with a range of dates from two columns: Table I have (date format (mm/dd/yyyy) ) Id start_date end_date field1 1 01/01/2019 07/01/2019 text1 1 07/01/2019 12/01/2019 text2 2 01/01/2019 02/01/2019 text3 The idea is to generate a list of dates between start and end date with an…
-
Deduplicating a table based on the content of certain columns
I have a dataset that has about 20 columns in it. The first column contains ID numbers and a lot of the ID numbers are duplicated multiple times. All the other data in the columns are also duplicated multiple times except one column named last_updated. The last_updated column lists a date. I would like to de-dupe this…
-
Using a View as a input dataset to mysql dataflow
Hi All, I am trying to have (a view) as one of the inputs to the mysql dataflow...But its not being accepted ...Can you please help me with this... Thanks, Arun
-
Creating a join from a lookup table
I have created a dataflow that joins two sets of data together, however when i join them together it's dropping data because it doesn't have anything to match with. How would i create a dataflow that would match all the data and any of the unmatched records would also stay?
-
LISTAGG or equivalent during data import from NetSuite
What SQL should I be using during an import to collapse data from a column into ',' delimited strings? when I use: listagg(item.NAME,',') "ITEM(S)", I get the error: [NetSuite][SuiteAnalytics Connect JDBC Driver][OpenAccess SDK SQL Engine]Failed to retrieve data. Error ticket# l27jpdhw1857xj1xsmvi0[400] with just item.NAME…
-
Calculate rank so that the smaller number is higher rank
I need to calculate the rank on a metric where the lower value is higher in rank, and the higher values are lower in rank. This is how I've been calculating standard rank (where higher values are high in rank) SELECT `Metric` ,`TimeFrame` ,`VALUE` ,`Name` ,`Grouping` ,`ProcessorName` ,CASE WHEN @priorMetric = `MetricID`…
-
How to use Escape characters in Beast Modes?
Hi, I am trying to create a web link for a card using a beast mode and some of the values that will be passed through the beast mode contain apostrophes ' . When they are passed through the beast mode the link is broken because the value is cut off early. For example the value 'Square's Lake' is cut off early and ends up…
-
Is AS valid in Beast mode?
Good afternoon, Can AS be used in Beast Modes to create aliases? It doesn't seem like it but I might also be super bad with SQL. Thanks! -Joe
-
Rolling Average for Each Category
I have a dataset containing total monthly units by month and by person. I'd like to calculate the 3 month rolling average for each person. How should I group the data so that the rolling average calculation goes by person and not by date?
-
has anyone had any luck creating dynamic columns in mysql
what I'm trying to do is for sql to check and see if a column missing, if it is then i want sql to create the column. I've done several attempts with no luck. the alter table add column sql works but it fails when i add it to the if condition. any thoughts? CREATE PROCEDURE addcol() BEGIN IF NOT EXISTS( SELECT * FROM…
-
Table vs SQL Data Flows and which functions does Domo not recognize? (I'm confused)
Hi, My CSM informed us that window functions are enabled. I would like to write the following via ETL, or a My SQL dataflow (either way is fine), but I don't know whether to pick a Table or SQL transform, and either one I pick will not accept the following statement. SELECT *, sum(a) over (partition by b order by a range…
-
Moving Values One Row Down - Conversion Rates
Hello! Does anyone know how to move the "Stage Count" column down one row (Stage Count 2) rather than erasing the top value? I am trying to get the Stage Count 2 column to read: blank 3821 336 122 33 32 I attempted a LAG, but this version of mysql is too old to use I believe :( Thanks, Keirsten
-
Can I write SQL directly to my data sources?
I know I can click on "SQL" in the top ribbon to write SQL against my data sources using a data flow. However, does Domo provide a direct option? Many of my users just want to open an interface to write SQL and then preview and download results.
-
Rolling 30 Day Formula in magic ETL
Hi, I am trying to write the formula above within magic ETL. Column A consists of static values. Column B starts with 0 as the first value and has the formula shown in the image. The formula resets its count every time it gets to a number greater than or equal to 30. The only way I can find to do this is with a LAG()…
-
Do MySQL dataflows support the use of the WITH clause?
I'm trying to use a WITH clause as outlined here: https://dev.mysql.com/doc/refman/8.0/en/with.html in one of my MySQL dataflows. But I keep getting this error: "The database reported a syntax error. You have an error in your SQL syntax" My (very simple) code is: WITH test AS (SELECT`EmaiName` FROM transform_data_2) SELECT…
-
MySQL Protocol Version Error
I'm trying to connect to a MySQL Account. When I enter in my credentials and CA Cert I get the error "Failed to authenticate. Verify the credentials and try again. Error setting up SQL connection. Could not connect to: Received fatal alert: protocol_version" I've verified the user is using TSL v 1.2. I'm also able to…
-
MYSQL - Trouble adding new column via LEFT JOIN
Hello! I am having trouble adding a new column, "Dummy", to my output dataset. Although the query is valid, the output does not produce the "Dummy" column when ran. I am trying to identify rows to remove based on the criteria defined in the LEFT JOIN. See below. SELECT A.`Posting Title`, A.`Weekly Reporting Date`,…
-
Schema not keeping changes, but no error given - have you run into this?
Hello, So I have set up a job using MySQL ODBC - executed, all good. Job T Then set up another job with a local CSV file - executed all good. Job A So then I want to update Job T to do a lookup transform of the results from Job A. This seems to run well. But I also need to update the schema. I need to remove a column and I…
-
'Incorrect column name' doing a Dynamic Pivot
Hi there! I've been following this tutorial for dynamic pivot and so far it has worked: https://domohelp.domo.com/hc/en-us/articles/360042923454-Dynamic-Pivot. However, I get this error: I thought it was because the name was too long, but the character limit is 1024 and even performing a substring I got the same error. 😓…
-
How to Create Monthly Averages for Headcount?
Hi All, I'm in the process of building an attrition model in Domo in the form: Total Terms / Average headcount Terms is easy, that's just a count of everyone with a term status for that time period. Headcount is where I'm getting stuck. My headcount numbers are currently aggregated based on headcount at the end of each…
-
use fields from different tables group by date to calculate percentage
Hi, I am trying to calculate a percentage using two fields from two different tables in SQL Magic Transformation. Table a looks like this: Date All Revenue 09/01/21 100 09/02/21 200 Table b looks like this: Date HDM Revenue 09/01/21 90 09/02/21 170 I need to build a table that would calculate the percentage of HDM Revenue,…