Created 07-20-2023 01:23 AM
Hello! I am creating a view `view_business` with IMPALA: since the source table `table_a` is a parquet formatted table with complex data types such as array and struct, I have to always run an query option statement "SET PARQUET_ARRAY_RESOLUTION=TWO_LEVEL_THEN_THREE_LEVEL" to load the arrays; otherwise those array columns are showing NULL value.
DROP VIEW IF EXISTS discovery_database.view_business;
SET PARQUET_ARRAY_RESOLUTION=TWO_LEVEL_THEN_THREE_LEVEL;
CREATE VIEW discovery_database.view_business AS (
SELECT * FROM table_a
)
Once the view is created, if I want to query the view, I still need to run the query option statement first as follows:
SET PARQUET_ARRAY_RESOLUTION=TWO_LEVEL_THEN_THREE_LEVEL;
SELECT * FROM discovery_database.view_business
However, the query option statement above is not supported in ODBC connector when I tried to use the statements above to link the curated table `view_business` as a data source in a power BI report.
My question is: is it possible to create a view INCLUDING the query option statement "SET PARQUET_ARRAY_RESOLUTION=TWO_LEVEL_THEN_THREE_LEVEL", so every time when I query the view, I don't need to run this statement any more?
Thank you very much in advance!
Please note that IMPALA does not support scheduled query (to create a table instead a view). I also don't have a access right to create a scheduled query with HIVE in the HUE console. Therefore, creating a table with scheduled query cannot be the solution...
Created 07-21-2023 01:02 AM
Hi, I do not think we have such option to create a view along with query option, you can follow any one of below:
> Set the query option at session level before running the query.
> Add this query option globally in impala configurations -> "default_query_options" section.
> Add it in impala admission control pool for a specific pool where this query runs, edit the pool and add the property into "Default query options" section.
Regards,
Chethan YM
Created 07-21-2023 01:02 AM
Hi, I do not think we have such option to create a view along with query option, you can follow any one of below:
> Set the query option at session level before running the query.
> Add this query option globally in impala configurations -> "default_query_options" section.
> Add it in impala admission control pool for a specific pool where this query runs, edit the pool and add the property into "Default query options" section.
Regards,
Chethan YM
Created 07-24-2023 10:45 PM
@tsunamisabella, did the responses from @ChethanYM assist you in resolving your concerns? If so, could you kindly designate the most suitable response as the solution? This will be beneficial for other members who might come across a similar issue.
Regards,
Vidya Sargur,