When you use the SQL procedure to create a view in a Google BigQuery database, a CREATE TABLE statement might be passed to the database instead of a CREATE VIEW statement. The statement that is passed might look similar to the following:
This issue might occur even when the DBIDIRECTEXEC system option or the NODBIDIRECTEXEC system option is in effect.
If the table that is created is queried from within SAS, the table is read to get the original CREATE VIEW syntax. The query that was part of the CREATE VIEW statement is then submitted to the database, which results in the expected data being retrieved. However, if the table is queried outside of SAS, the contents of the actual table are given rather than the expected data.