Hi Lens Developers,

I found some issues with Lens metadata. For example, I tried to create a
dimtable and failed, but Lens will create the metadata for the table. And
when I try to create it again, it complains 'table already exist', but I
cannot drop this dimtable until I run 'show dimtables'.


*lens-shell>create dimtable ***/schemas/dimension1_table3.xml*
*failed*

*lens-shell>show dimtables*
*...*
*dimension1_division2*
*dimension1_table3*

*lens-shell>drop dimtable dimension1_table3*
*succeeded*

*-----------------------------*

*lens-shell>create dimtable
/export/home/dev_svc/lens/schemas/dimension1_table3.xml*
*failed*

*lens-shell>drop dimtable dimension1_table3*
*failed*

*lens-shell>show dimtables*
*...*
*dimension1_division2*
*dimension1_table3*

*lens-shell>drop dimtable dimension1_table3*
*succeeded*


*Dimension definition:*
<x_dimension name="dimension1" xmlns="uri:lens:cube:0.1" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="uri:lens:cube:0.1 cube-0.1.xsd ">
  <attributes>
    <dim_attribute name="primary_key" _type="BIGINT"/>
    <dim_attribute name="attr1" _type="BIGINT"/>
    <dim_attribute name="attr2" _type="BIGINT"/>
    <dim_attribute name="attr3" _type="BIGINT"/>
    <dim_attribute name="attr4" _type="BIGINT"/>
    <dim_attribute name="attr5" _type="BIGINT"/>
    <dim_attribute name="attr6" _type="BIGINT"/>
    <dim_attribute name="attr7" _type="BIGINT"/>
    <dim_attribute name="attr8" _type="BIGINT"/>
  </attributes>
  <properties>
    <property name="dimension.dimension1.timed.dimension" value="dt"/>
  </properties>
</x_dimension>

*Dimtable definition:*
<x_dimension_table dimension_name="dimension1"
table_name="dimension1_table3" weight="5.0" xmlns="uri:lens:cube:0.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="uri:lens:cube:0.1 cube-0.1.xsd ">
  <columns>
    <column name="primary_key" _type="BIGINT"/>
    <column name="attr1" _type="BIGINT"/>
    <column name="attr5" _type="BIGINT"/>
  </columns>
  <properties>
    <property name="dimension1.prop" value="t3"/>
  </properties>
  <storage_tables>
    <storage_table>
      <update_periods>
        <update_period>HOURLY</update_period>
      </update_periods>
      <storage_name>mysql</storage_name>
      <table_desc external="true">
      </table_desc>
    </storage_table>
  </storage_tables>
</x_dimension_table>

Thanks,
-- 

*Tao Yan*
Software Engineer
Data Analytics Infrastructure Tools and Services



206.250.5345
t...@linkedin.com
https://www.linkedin.com/in/taousc

Reply via email to