Member since
01-04-2019
4
Posts
0
Kudos Received
0
Solutions
01-31-2019
03:12 PM
Thank you for the reply
... View more
01-04-2019
03:39 PM
Hi, I am trying to convert Microsoft SQL Server Create Script into HIVE and below is the script from MS SQL. CREATE TABLE [dbo].[Data]( [NodeID] [int] IDENTITY(1,1) NOT NULL, [ObjectSubType] [nvarchar](50) NULL, [IP_Address] [nvarchar](50) NULL, [IP_Address_Type] [nvarchar](10) NOT NULL, [DynamicIP] [bit] NULL, [VendorIcon] [char](20) NULL, [IOSImage] [nvarchar](255) NULL, [IOSVersion] [nvarchar](255) NULL, [GroupStatus] [char](40) NULL, [TotalMemory] [real] NULL, [External] [bit] NULL, [EntityType] [nvarchar](100) NULL, [CMTS] [char](1) NULL, [BlockUntil] [datetime] NOT NULL, [IPAddressGUID] [uniqueidentifier] NULL, [CustomStatus] [bit] NOT NULL, CONSTRAINT [PK_Data] PRIMARY KEY CLUSTERED ( [NodeID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] Could you please help me understand what data type and primary key should be modified in this query that suits to HIVE please: which data type is relevant to this: IDENTITY(1,1) which data type is relevant to this in HIVE; [IPAddressGUID] [uniqueidentifier] How to define below PK constraint in HIVE: CONSTRAINT [PK_Data] PRIMARY KEY CLUSTERED ( [NodeID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] Thanks BDA.
... View more
Labels:
- Labels:
-
Apache Hive