How to refresh view using DBT? - sql

I couldn't find any docs about refresh view. Like i did using SQL on PostgreSQL REFRESH MARTERILZED VIEW
dbt run # create view/table
dbt refresh ?
There no option for refresh view that created by dbt right?

Related

Is there a way to FORCE BigQuery to CREATE OR REPLACE VIEW even if the View has a Syntax Error

This would be useful when trying to add many views without having to consider the proper order when creating them, or creating a view before the referenced table even exists.
CREATE OR REPLACE FORCE VIEW doesn't work

How to diplay in xml without using create method?

Can I display data from the database without using the create method?
Only a view in a tree views and after modification I use create method to persist in the database.

Where does Odoo save the contents of My Dashboard

I need to know where Odoo saves the views that will be shown in (My Dashboard) when we click (Add to My Dashboard).
I looked in the table scheme and I could only find one related table: board_create
which is used to save the custom dashboards the user creates.
But I only want to find out where the contents (the views not the data) of the default Dashboard are saved in the database.
In OpenERP 7 and 8 you can find the view for dashboard in 'ir_ui_view_custom' table.
The view will be saved inside 'arch' column.
From OpenERP web interface this is will happened when you click 'add to my dashboard'
Javascript will invoke 'add_dashboard'
Javascript will make rpc request using '/board/add_to_dashboard' to openerp server
Openerp server will invoke "add_to_dashboard" function
Openerp server will save the view inside 'ir_ui_view_custom' table
Openerp use these files to process 'add to my dashboard'
/OpenErp7/addons/board/static/src/js/dashboard.js
/OpenErp7/src/main/openerp/addons/board/controllers.py
I hope this help.

Rails create static page from dynamic page

This seems like it should not be that hard but I am trying to figure out how to create a 'snapshot' or 'locked' view from one on my views. This view currently is dynamic but I want to lock it so that any changes I make will not propagate until I want them too.
This would be a front facing page that should not get updated until I choose to update it such as by timestamping a field like updated_lock or something to that effect.
Any ideas?
Thanks,
BR
You might try caches_action in your controller. It will create the static version and save it. You could either create it in dev and checkin, or have it generated in production. You'd need to fine a way to delete it in production if it's not checked in. Requires caching to be turned on.
If you are OK with checking it in - you can always save from the browser.
Basically - if there is a file in public at the same location as the view, it will be served instead of the dynamic one.

How to access a view once you have generated it with GII (via YII)?

I've managed to create several forms using YII and GII, but I'll be honest, I don't understand it perfectly. If anyone can explain this to me, I'd really appreciate it.
Basically, I create accessed the form creator here:
index.php/gii/form
I then filled in:
Model Class: Product
View Name: createProduct
View Path: application.views (default)
Scenario: createProduct
When I generate the code, I end up with a file called "createProduct.php" located at:
protected\views\createProduct.php
How do I access this view? I figured something like this should work: http://mysite.com/createProduct (but it doesn't)
What do I do if I want to change the link to be: http://mysite.com/admin/products/createProduct
Any help would be greatly appreciated!
Gii tells you to modify your controller. It shows the code you should insert after generating process. When you do this you'll be able to access your form by http://yoursite.com/controller/action
You can manage your urls using UrlManager. Look this article in docs - http://www.yiiframework.com/doc/guide/1.1/en/topics.url