I need to execute a stored procedure in snowflake from a quick sight dashboard.
The parameters for Procedure call statement in QS dashboard is dynamically updated with the values set in the Control Filters. See attached screenshot for more insight.
Is there a way to accomplish this ?
Based on QuickSight Community:
QuickSight supports only select statements currently. Any custom SQL
that you use to create a data set should also be a select query.
https://community.amazonquicksight.com/t/quicksight-query-procedure-in-custom-sql/5782
QuickSight team is currently working on introducing parameters support within QuickSight datasets. When this work is completed, you should be able to build a dashboard where consumers can specify parameters that are passed to Snowflake.
I cannot comment on stored procedures support for Snowflake. I would recommend asking the question at https://community.amazonquicksight.com/ which is a forum provided by Amazon QuickSight team (and that AWS replies to more frequently than stackoverflow)
Related
The SQL Server Profiler for Azure Data Studio shows stored procedures, when connected to an Azure SQL Database.
Is it possible to profile the SELECT statements inside the stored procedures?
Is the reason why I seem unable to do it because there is only one (limited) template provided with the profiler when accessing Azure SQL Database?
The SQL Server Profiler GUI within Azure Data Studio is just a front-end for Extended Events. If you want to set up different data collection, such as sp_statement_completed to see individual statements within procedures, you just have to define an Extended Events session with that event and you're good to go. Here are the basics to get that done. Instead of the SSMS GUI, use the "Corresponding T-SQL" section as the guide for creating your own session. You may also want to correlate the individual statements with the start & stop of the procedure itself, rpc_starting and rpc_completed. In that case, use Causality Tracking as I show it here on my blog. Then, you can query the XML output, or, use another tool to consume the information (I do prefer DBATools for that approach).
That should give you everything you need.
I am trying to convert a ddl for a oracle view to snowflake view. But in Oracle ddl the view created is of FORCE EDITIONING type. But these keywords are not supported by snowflake. Can anyone share the ideas to replicate the same ?
Thanks
Oracle 11g Release 2 introduced "Editions" so people could upgrade an application's database objects while the application is in use, and then essentially flip a switch after all modifications were complete and users could then begin running all of their commands on the new "edition" or "release" of their objects.
Snowflake doesn't have this capability (yet), so you'll need to omit that clause from your Create View command.
Here are the docs on creating a view in Snowflake.
https://docs.snowflake.com/en/sql-reference/sql/create-view.html
I hope this helps...Rich
Looking at the Vert.x documentation here, it is possible to pass a JSON array to a stored procedure in Vert.x
However, my requirement is to pass an entire table, like you can find here which converted a table to a DataTable, and passes along to a stored procedure.
If you can describe your requirement in SQL that MSSQL can handle then in theory it should be possible, however I see that you're referencing some specific .Net API and that is not available in vert.x simply because vert.x runs on the JVM not .Net.
I am using crystal reports 2008 and my req is If i select a parameters (like it be %) then it should use a different view if it is not the it should use the same view cn I do that using a query. in Crystal reports
I don't know a way to do this in Crystal. Perhaps in .net. If you use an application like Millet Software's Visual Cut to schedule, run and distribute your reports you can set it up in such a way that the method call that triggers the report job has the ability to override the default connection parameters. That itself can be a variable too - override or not based on certain criteria.
I've deployed it in a way that uses 1 report to recursively connect to a list of different (but same schema) databases to run versions of the report, one after the other.
FULL DISCLOSURE
I do not work for Millet Software, I do not receive referral bonuses and I do not receive a reseller bonus. I simply have had great experience with them and wanted you to be aware of the possibility, not solicit your business.
If you are using database, which supports scripts or stored procedures you can do this using a command or a stored procedure. Inside the script check the value of the parameter and call one or another query.
Sample code for SQL server will look like this:
if CHARINDEX(#Parameter,'%')>0
SELECT * FROM View1
ELSE
SELECT * FROM View2
Is there a way to trace the actual MDX generated by querying a Cube in Excel, and get the actual MDX used ?
I've tried using SQL Profiler, and while that does return the MDX, it doesn't take into account the role that the connection is using (it's passed in a separate PropertySet).
I'm just wanting to get the MDX that the query is using, as it doesn't appear to be filtering correctly using different roles (but the same base MDX query).
Update: Ok, maybe I need to be a bit clearer. I'm trying to get the resulting query that is firing at the Cube, after the Role has been applied.
SQL Profiler gives me the MDX, and the name of the role in a PropertySet, so is before the Role is applied.
Update 2: In case it helps, this is an MDX query that I've been using to test the functionality.
select {[Measures].[Company Value]} on columns,
{[Dim Model].[Title Name].Members} on rows
from [DWHName]
You might want to try the following add-in from codeplex. http://olappivottableextend.codeplex.com/ It just gives you what was sent to the OLAP server. BEWARE though, it adds a bunch of extra mdx that does UI display.
I'm pretty sure you can't actually get what you're after. The security role is a property of the connection or of the user running the query and the various restrictions put on the resultset are applied in the query engine. So you never get to see what restrictions are applied (which, I suppose, could be a security issue in itself)
I'm not sure whether I've properly understood your question, but it is possible to get the MDX generated by Excel using a macro to query the PivotTable.MDX property.
See here for an example implementation.
Not sure I understand either. Are you saying that you want to see the results that role will see? (The MDX in the trace is exactly what was submitted, no?)
Have you tried executing the captured MDX through MDX Studio (where you can set the Role for your connection)?