I have Qlikview installed on my pc and it takes the data from a database.
I want to write an sql query which would take the same data(for automatization).
The problem is that my sql query returns 30+k more records than Qlikview.
I believe, that Qlikview is adding more restrictions than I do in my sql code.
So is there a way to find out what limitations and filters Qlikview is applying when retrieving data, so I could copy these filters to my sql script?
Related
I'm using Data Studio to generate a financial report dashboard and I'm connecting it to CloudSQL MySQL, but my problem here is that it only requires me one table to use as a data source, and one table wouldn't help me at all to generate a financial report at all.
Here's the image of the process of selecting a Data Source:
I tried selecting Custom Query, which according to this: https://support.google.com/datastudio/answer/7088031?hl=en
Select the CUSTOM QUERY option to provide a SQL query instead of connecting to a single table. Google Data Studio uses this custom SQL as an inner select statement for each generated query to the database.
But I don't know what query should I write to have all my database tables as data sources in Google Data Studio.
Regarding Custom Queries: Had a look online, and didn't seem to find a sample CUSTOM QUERY specific to Google Data Studio and Google Cloud SQL for MySQL, however, on StackOverflow, there are a couple of posts on BigQuery Custom Queries that involve joins, that may be useful:
Data Studio query error when using Big Query view that joins tables
BigQuery Data Studio Custom Query
An alternative is to create individual Data Sources each linked to a single table and then link multiple Data Sources through the use of Data Blending, where a common Join Key links all the respective Tables.
In addition, if you could elaborate on your exact scenario, it would perhaps help users familiar with SQL to provide a more precise solution:
How are the tables structured?
How are the tables linked?
What code have you currently tried?
I also had quite a few issues with the Custom Query using the Cloud MySQL Connector by Google for Data Studio.
The resolution for me was to not run SELECT * but rather SELECT each column by name. Not sure why it doesn't like SELECT * but hopefully this helps someone else.
Example of a successful query.
Example of successful query with join.
I'm trying to use Prometheus to monitor my MySQL database but can't seem to find an area to add SQL queries. For example, I'd like to run a SQL query which returns a value and then add that value to the graph/send an alert. Is there a way to have Prometheus send SQL queries and retrieve the output?
Thank you
https://github.com/chop-dbhi/prometheus-sql will allow queries to be run against any SQL database that can then be scraped as metrics.
I want use MDX queries directly against MySQL database. Right now I am using Pentaho's MIS analytics to run the MDX queries.
You can't execute MDX Queries on DB, but the related SQL query can be executed, for that to happen you will have Enable Mondrian Logs in Pentaho. So that it will generate the SQL Query for that particular MDX Query.
Please follow the steps:
Go to \pentaho\WEB-INF\classes.
Edit. Enable all the logs in Log4j File.
Enable the following Tags:
MONDRIAN
MDXLOG
SQLLOG
I'd suspect the answer is no.
You execute MDX against a multi-dimensional structure - MySQL database is relational.
You need to store the data in a multi-dimensional format first - then mdx may be possible.
I can without any problems run a sql query in DataMethods in Business Intelligence when I use DynamicsReports.
Question: How to use the same way for MDX query?
I want to run a MDX query in DataMethod because I need to work with the results - to use Linq to Datatable.
Is any way to do that, or to run a DataSet in DataMethod?
I assume that you want data access methods similar to SQL for MDX as well.
You can created linked server for SSAS and use openquery to exec MDX.
SELECT * FROM OPENQUERY(linked_server_olap, mdx_query)
You can execute this as sql statement / store procedure
Other alternative would be using ADOMD.NET
I would like to write a query with data based on a SQL Server table and insert the results into a SQL Azure table. Is this possible in SQL Server Management Studio?
For example:
SELECT stuff
INTO AzureTable
FROM SqlServerTable
I suppose it's possible to do something similar to that with a linked server to your SQL Azure host, but using SELECT INTO explicitly will not work - you'd need the destination table to exist first (see this MSDN blog post where they describe why SELECT INTO is not supported in SQL Azure).
If the destination tables don't already exist, you can script the objects in Management Studio (as described here) or use tools like SQL Compare from Red Gate to do the grunt work for you.
Once the destination tables exist, you can just write insert statements (again assuming a linked server) or you could use a slightly different approach. For example, have you looked at the SQL Azure Migration Wizard on Codeplex or SQL Data Compare from Red Gate?