cancel
Showing results for 
Search instead for 
Did you mean: 

Hive - Complex data types not generating in DDL

0 Kudos

Hi. I'm looking for some help with creating complex data type for the Hive PDM. The DDL that is generated does not include the abstract data type.

Here are the steps:

I've created a Hadoop Hive 1.0 PDM. I created the below abstract data type:

I then used it as a data type for a column:

I then created a new DDL by selecting the menu item 'Generate Database...'.

The Data type I created is selected to be part of the DDL.

The new data type I created is not included in the DDL and the data type of the column that was using it is set to:array < decimal(10,0) >:

I'm not sure if this is going to help but here is the Summary tab of the Database Generation dialog:

[General]

   Script name    : "HadoopTest7.sql"

   Path name      : "C:\Users\abc\Documents\Products\PowerDesigner\PowerDesigner Projects\Scripts\"

   One file only

   Generation type:  Script  

[Options]

   [Table]

      Create table

         Check inside table

         Physical options

      Drop table

      Begin Script

      End Script

   [Column]

      Default Value

      Check

   [Primary key]

      Create primary key inside table

         Physical options

      Drop primary key

   [Alternate key]

      Create alternate key inside table

         Physical options

      Drop alternate key

   [Index]

      Create index

          outside table

         Physical options

      Drop index

      Comment

      Index Filter:

         Primary key    : false

         Foreign Key    : true

         Alternate Key  : false

         Cluster        : true

         Others         : true

[Format]

   Title

   Owner Prefix

   Character case: Mixed case

   Encoding: ANSI (Active Code Page)

Am I doing something wrong or could this be a bug?

Accepted Solutions (1)

Accepted Solutions (1)

former_member200945
Contributor
0 Kudos

Most likely this is normal behavior in Hadoop Hive 1.0

Imagine the abstract data type name does show up in DDL.

Go to Database->Generate Database.

You should have seen code which defines ArrayExample.

Without the definition, the whole code will not work.

Do you have document showing how to define a complex data type in SQL?

0 Kudos

Thanks for the reply Philip but I'm not exactly sure what you mean. I did go to Database->Generate Database and the definition of ArrayDataType was not there. ArrayExample is just the name of the column which should have had the type of ArrayDataType.

So I'm wondering why the definition of ArrayDataType is not in the DDL. 

Are you suggesting I should define it manually in SQL?

Thanks.

former_member200945
Contributor
0 Kudos

My question is does Hadloop Hive allow you to do that?

If you can prove that, I'll open a case to engineering.

0 Kudos

I see your point now. In fact you are correct, after researching Hive more I found that you can't create Abstract Data Types.

Thanks for your help.

Answers (0)