-
Syntax for null
Hi all, I am trying to create a formula in ETL that deals with the null values in multiple columns. So far, no matter what kind of formula I use, I am unable to get the blanks filled in Here is what I am trying right now based off of all of the other posts I have read Again, nothing is turning up XYX like I would expect. I…
-
SQL Writeback - Importing to Existing Schema
Is there a way to specify a specific SQL schema the SQL Writeback connector uses? The documentation mentions it's possible, but doesn't mention the syntax. I can easily import to dbo, but would like to import existing schema.
-
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…
-
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.
-
Adrenaline version of SQL
Hi All, Can you please let me know what version of SQL does adrenaline use.. Thanks, Arun
-
Troubleshooting on Dynamic SQL in MySQL
Hello, I am having trouble on running below Dynamic SQL query. Can someone have a look and troubleshoot what am I doing incorrectly? Also, is there any way I can able to print Dynamic SQL query? SET @sql = NULL; SELECT GROUP_CONCAT(DISTINCT CONCAT( 'sum(case when x.question_text = ''', question_text, ''' then x.answer_text…
-
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…
-
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`…
-
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…
-
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.
-
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. 😓…
-
Problem with SQL for WordCloud Chart
Hi all! So, I am trying to run SQL code using these instructions https://domohelp.domo.com/hc/en-us/articles/360042925094-Word-Cloud-Chart When I am at step 9 and trying to run this code CALL word_cloud('nuvaira_patientlogreport_recursive', '`Notes`' , 'y','y' ); It gives me an error 'Invalid. Whoops! Something went…
-
MySQL Recursion Performance/Speed Issues
Hello! I am looking for suggestions on how to improve the performance of my mysql dataflow. Currently I have a recursive dataflow built with a Google Analytics connector, and I'm using a concatenated key created by joining multiple columns together to delete and upsert new data from the historical dataset. I'm using the…
-
Appending an update set to itself
Hi, I have a MySQL dataflow that is built from API reports from a vendors application. The idea is that we did a one time historical pull of the API as dataset 1. Then, the same API that only pulls 1 day of data and appends to the historical dataset as dataset 2. But, every once and a while it seems as if data is dropping…
-
access max.date from sql table
Hi. I have two input datasets in SQL Magic Transformation. One table called daily the other one estimated . Both tables have the same columns. I need to fetch the data from estimated table but only for the date that is later than max(`Date`) in table dail Data looks like this. Table daily Date Name Revenue 2021-08-01 A 10…
-
How do I used a Create / Use / output table using a SQL transform SQL type / CREATE PROCEDURE?
I'm trying to just work out the basic syntax / method in DOMO SQL transform of: Create Stored Procedure (creates a result table after some manipulation of the data) Execute Stored Procedure (to get result table) Output Result table into DOMO for use in charts etc.. I'm trying to get this to work but I can't get the results…
-
SQL - join where a column is between a number range
Hello, I cannot for the life of me figure out why this "where" clause is giving me troubles, I have used this logic a thousand times with no problems. The problem is coming on my join of c to a. Specifically, it seems to happen with my "where c.result_code is greater or equal to 9.5 and c.result_code is less than or equal…
-
Join based on filter criteria
Table A (Completed Evaluations w/ dates & locations) Table B (Locations Universe, all available locations) Table A has all the same location columns as Table B. Table A also has completed dates and evaluation data, We want to show locations with completed evaluations for a user specified date period (i.e. using a date…
-
Is it possible to use while/do loops in MySQL in Domo Dataflows?
I have data that has varying rows of data for each identifier, from one row to 26. For each identifier, I have four different columns that change with the various rows. For each new identifier, I want to loop through the rows that follow that have the same identifier and build the row out with the unique values in these…
-
Dividing in SQL
I currently have this code: categorizing some leads. Select `Year-Month` ,`Lead Source` ,`Product Line` ,`Product Models` ,`Country` ,`Early Stage No Movement` ,`Stage 0 to Early` ,`Early to Lost` ,`Early to Won` ,`Early to Late` ,`Late to Lost` ,`Late to Won` ,Sum(`Early to Lost`+`Early to Won`+`Early to Late`) AS 'Total…
-
Is 'Partition by' supported in DOMO SQL?
I tried to create a new table in DOMO SQL using the following syntax in sql : SELECT `G_L Account No_`,`AcctLen`,`fund#`, `Fund No_`,`Dept#`, `Obj#`, `Global Dimension 1 Code`, `Posting Date`, `Description`, `Amount`, `Transaction Type`, `Actual_Amt`, `Budget_Amt`, sum(sum(case when `Transaction Type` = 1 then `Amount`…
-
Is it possible to do CTE hierarchical recursive query in MySQL?
I have a table with thousands of rows in which there is a relationship of child/parent between the rows. For each record I would like to have all the hierarchy related with that record. As an example, I have the following table and for the id=19 I would like to return all its related children, which are [20, 21, 22] I have…
-
MySQL Data Flows clarification: MySQL version & window functions (row_number)
I've neglected MySQL Data Flows because I'd passingly assumed that they were for MySQL-derived DataSets. It seems not, it looks like a MySQL DataFlow is a DataFlow that uses an embedded version of MySQL. Is this correct? I've seen mention of Window Functions in passing, and assumed the MySQL must be 8.0+, as that's when…