Flex table
Hi,
I tried to materialize some fields for a Flex table and got the following:
testdb=> select materialize_flextable_columns('stagging_2015_03_04',3);
ERROR 6035: Table "public.stagging_2015_03_04_keys" has no non-null records under the column key_name
HINT: Please ensure Table "public.stagging_2015_03_04" contains data and run compute_flextable_keys()
Basically, I just manually added some fields (key_name, frequency, data_type_guess)'s needed to be materialized into the table public.stagging_2015_03_04_keys, instead of populating the table with the Vertica
function compute_flextable_keys and got the above error. Is there any people knows how to fix this?
Thanks.
Ey-Chih Chow
0
Comments
Hello, Ey-Chih.
Which version of Vertica are you using? The earliest released versions with Flex tables had some trouble associating the key table and view back to the base table. The later versions resolve this by requiring a manual first step:
select public.restore_flextable_default_keys_table_and_view('stagging_2015_03_04');
If that function is not available, I would recommend upgrading.
If you cannot upgrade, then as a work-around you can drop your key table and view (if any) and use the compute_flextable_keys() function, followed by truncating the resulting keys table and inserting your own information.
If compute_flextable_keys is slow - perhaps because you have a lot of data - then you can run compute_flextable_keys before you load most of your data. You need to have only 1 row of data in the table, first.
Hope this helps!
- Derrick