Can I use JSON_EXTRACT in a Domo SQL DataFlow - domo

Domo calls one of the DataFlow types a "MySQL DataFlow". MySQL has a function called JSON_EXTRACT. How can I use this on a field that contains some JSON encoded data? I receive back the error:
The database reported a syntax error. FUNCTION json_extract does not exist

I know this is a somewhat old question, but I think the answer is that Domo uses an older version of MySQL (5.6) that does not support the JSON_EXTRACT function (5.7 and later).
You can check the version by running this statement in a MySQL DataFlow transformation step:
SELECT VERSION();
When I run that on the Domo instance I use at work I see 5.6.28-76.1-56
If you go to the JSON Functions page of the MySQL documentation and try to select any version before 5.7 from the dropdown in the upper right of the page you will see a message saying "The page you are viewing does not exist in version X.X"

Related

ADF Mapping Data Flow Source - can query hints (OPTION) be used?

I have a view using a CTE that exceeds the maximum recursion, so I need to select from it using the hint
OPTION (MAXRECURSION 3650)
Is that possible? I do not seem to be able to find any information on it, other than the fact that is not working in the Source Query - any documentation on what you can do as far as SQL queries would be greatly appreciated.
Error message:
at Source 'Calendar': shaded.msdataflow.com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'option'.
Source Query:
select * from dbo.ReportingCalendar option (maxrecursion 3650)
The above query is correct and runs on the SQL Server.
I refer to this documentation, but there isn't information about keyword 'option'. I also test it with data flow, got the same error with you. So it seems not support this keyword.
As an alternative, you can use copy activity, it supports 'option'. You can copy data from your SQL database to Azure data lake gen2( or someplace else that data flow support as source), then use that as source in data flow and do some transform.

Using UCanAccess to read mdb file from MATLAB

I am using the MATLAB Database toolbox to read data from MS Access *.mdb files. In the past I did this using the jdbc:odbc bridge 'sun.jdbc.odbc.JdbcOdbcDriver.' However, this driver is no longer supported or available, and I am implementing a solution using the UCanAccess driver. This is based on the solution described in the MATLAB Answers forum here. However, I am encountering a driver error and am hoping someone can help offer some suggestions!
Here is the MATLAB documentation on the database() function.
I've downloaded and installed UCanAccess 5.0.0.
Below is my MATLAB code:
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\ucanaccess-5.0.0.jar');
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\lib\commons-lang3-3.8.1.jar');
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\lib\commons-logging-1.2.jar');
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\lib\hsqldb-2.5.0.jar');
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\lib\jackcess-3.0.1.jar');
javaaddpath('C:\Program Files\MATLAB\UCanAccess\UCanAccess-5.0.0-bin\loader\ucanload.jar');
db_path = 'C:/Data/file.mdb';
url = ['jdbc:ucanaccess://' db_path];
conn = database('','','','net.ucanaccess.jdbc.UcanaccessDriver',url);
The connection object is created in MATLAB, but a Warning pops up:
WARNING:You shouldn't use 'user' reserved word as column name in the table BatchHistory_Table (it refers to the database user).
Escape it in your SQL!
(e.g. SELECT [USER] FROM TABLE WHERE [USER]='Joe')
Does this imply something is incorrect or corrupt with my mdb file itself? The mdb files are created by a 3rd party software package, and I can't alter any of the data, column names, or table names. I just want to read the data from the mdb file.
Then when I look at the connection Message, conn.Message, this is:
'JDBC Driver Error: UCAExc:::5.0.0-SNAPSHOT unexpected token: AND required: VALUE'
I don't know what steps to take next or how to find more information on this Driver Error. Does this have to do with an expected query? I haven't tried querying yet - I first want to open the connection and then make my queries on the mdb file.
Thank you in advance for your help!

ERROR: cannot execute CREATE TABLE in a read-only transaction - Jasper reporting

I'm facing this annoying problem in Jasper. I have created a report based on a PostgreSQL function. When I watch the preview, I do not have any problem with the results. However, when I publish the report and try to execute it, I get this error:
org.postgresql.util.PSQLException: ERROR: cannot execute CREATE TABLE in a read-only transaction
I've checked on the internet for a possible solution, so far this is the only thing that I have found with a similar problem:
https://community.jaspersoft.com/questions/814793/report-execution-fails-due-read-only-transaction-mode
However, adding the property to the URL does not work, or I'm not so sure if I have to write it in this way:
jdbc:postgresql://server:5432/data_base?defaultReadOnly="false"
In Jasper, what else can I do? I only can query the function, and requiring any change in it is an HUGE bureaucratic issue.
Jasper Studio 6.3.0
According to the documentation the JDBC connection parameter would be readOnly=false.
Have you verified that you are not connecting to a streaming replication standby server?

SpagoBI + Firebird DataSource (The result set is closed)

I am using Spagobi version 3.6.0, Jaybird-2.2.2JDK_1.7 and Firebird 2.5 (x64). I set up a datasource and the testing is OK.
I set up a dataset and the preview shows the correct list of colunms, only there is no data. Access via some other SQL viewer shows the data.
The error message in the Catalina log is:
org.firebirdsql.jdbc.FBSQLException: The result set is closed
Does anybody have an idea what I did wrong?
After some testing the solution to your problem is to specify the connection property defaultHoldable=true in the connection URL of the datasource, so for example:
jdbc:firebirdsql://localhost/database?defaultHoldable=true
As commented earlier you also need to upgrade to Jaybird 2.2.7, otherwise you will be confronted with bugs JDBC-304 and/or JDBC-305.
I haven't checked the code of SpagoBI, but it looks like SpagoBI assumes that result sets are always holdable over commit and executes its queries using auto commit. It should either not use auto commit, or check the DatabaseMetaData.getResultSetHoldability() and/or Connection.getHoldability() and explicitly request holdable result sets.

SSRS: Dropdown is not populated in filter in Report Builder

Whenever I try to apply filter to an attribute, which has ValueSelection= Dropdown, the dropdown is not populated and error message "The requested list could not be retrieved because the query is not valid or a connection could not be made to the data source" is shown instead.
If I set up ValueSelection=List I am getting a different error message:
An attempt has been made to use a semantic query extension associated with the data extension 'SQL' that is not registered for this report server.
(Microsoft.ReportingServices.SemanticQueryEngine)
This happens within BIDS environment and was observed both in SQL 2005 and SQL 2008.
I've already studied articles, which discussed the similiar problem, but neither of them applied to my case. The user account in data source has all necessary rights, data could be retrieved without any problem (for example if i try "Explore data" in data source view). The SQL profiler shows that no query is being sent to SQL Server when there is an attempt to populate dropdown. So nothing is wrong with the query, it is simply never executed.
Your connection is not working. Try to test you connection by trying a simple table and query output.
This will enable you to test the connection before trying anything advanced.
Got this problem and in my case it was caused by wrong connection string in Data Source - instead of just having a SQL Server name like "SOMESQLSERVER_MACHINE" I had for some reason "SOMESQLSERVER_MACHINE.our.corp.domain". It had to be the same, but then I realized that the domain is wrong, after removing it all works like a charm again. That said: it's always good idea to start with detailed checks on your basic settings.
Otherwise this could be a problem with permissions to the folders on Report Manager.