I have a table in Athena. New data gets added to S3 and this gives updated results when i run the Select statement. I have created a view on this select statement . But problem is the view does not give the updated results as given by Select query. Is there a way that the view gives the same result as a select query? How can i refresh the view in AThena. Please reply if anyone faced the issue and found a solution. Thanks in advance.
A view could have filters or where clauses that stop the full result set from coming. Assuming view was based on a query like create view some_vw as select * from table then all records should come through.
Related
I am currently using a view in BigQuery to aggregate data from many different large tables. I then use this view to create a materialized flat table, with a MERGE statement to update it. However, the most recent LEFT JOIN I've added to the view caused the query that instantiates the materialized table to return the error: "Resources exceeded during query execution." The view right now is estimated to churn through 60GB of data.
To try to solve this issue, I tried using scripting to create temporary tables for the different subqueries in the view, thinking that this might save on resources. However, it appears that I am not able to save a view that uses scripting. Is there some way that this can be done?
I assume that is not supported today. I had the errors weeks ago and I bet that is due to beta version.
For answering the comment, a very simple query
DECLARE dummy STRING;
set dummy="not work";
select dummy
This simply answers not work. Try to create a view from this, I have an error Syntax error: Unexpected keyword DECLARE at [1:1]. Not a data error, not a query error, simply not supported!
Using stored procedure not help because you use "script" command CALL for calling your stored procedure.
For information, there is a feature request on this
I would like to create view by using multiple tables . While creating view getting "FAiled to save View , column not found do u mean that this column" but if you run the query . I am getting data. Can you please help to resolve this issue
Most likely you are missing project(s) to be specified in your query
You should fully qualify tables as
[project:dataset.table] if you are using Legacy SQL or
`project.dataset.table` if you are using Standard SQL
I am using view to fire SQL query in Oracle. Where condition contains column on which index is already created but still its running slow. If i replace the view code directly in query than result is fast. Using Explain plan i figured out when query is fired on View filter predicate is created but when it is run directly no such predicate is created which is hampering the performance severely. Any help or link will be appreciated. I am using Oracle 11 g database?
Select * from View1 where col1='xyz' (very slow)
select * from (Full query of View) where col1='xyz'(very fast)
On col1 index is created
I have two database named Main and OutputTax using Firefox SQLite database.My aim is to update database in OutputTax while data in Main is input by selecting certain columns.
The columns in Main are "Date", "Particular", "InvNoSimp", "InvNoFull", "AmountTaxSimp", "GSTSimp", "AmountTaxFull"
While I just need "Date","Particular","InvNoSimp","AmountTaxSimp", "GSTSimp", in OutPutTax database.
String query="insert into OutputTax SELECT
Date,Particular,InvNoSimp,AmountTaxSimp,GSTSimp, from Main";
Whenever I call this query, It shows Query does not return results.
Can anybody tell me what is the problem? Thank you, your answer is much appreciated!
Have you tried this
insert into OutputTax( Date,Particular,InvNoSimp,AmountTaxSimp,GSTSimp) SELECT
Date,Particular,InvNoSimp,AmountTaxSimp,GSTSimp from Main;
I have a storedproc which has multiple select statement.
When it is executed in sql server , it returns multiple tables.
I need a query which will select a particular table from the storedproc e.g. sp_help.
Please help.
If i have a look at this link, it seems that it is not possible.
Astander is right. From the number of tables available in ur SP, it is not possible directly.
However, you can apply some trick to accomplish your work. I am giving an example here. May be you can generate some idea based on this line.
SELECT * FROM sys.Tables where name =
'my_tbl'
As you can make out that I am filtering out the query by a table among all the tables available in my database.
Something of this sort may help you.
Else, if can get the dataset and then from that get the needed datatable from ur frontend code.