|
63 KB
|
23 KB
|
28 KB
I have made modifications to the scripting of insert data for hana. In the process of making and testing these changes I have discovered that hana also supports [binary] datatype with a max length of 2000. This datatype is not documented. I added the binary type to the datatypes list and column init information.
Create a table using binary data type and insert the data:
o/p
c1
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Create a table using binary data type and insert the data:
o/p
c1
---------------------------------------------------------------------------------------------------------------------------------------------------------------
working as designed. User is allowed to do this, though I am not sure why you would want to do this. In this case you are asking the extraction to convert the data to hex and then reinserting it into a binary field. data studio is doing what is been asked correctly, but this will not store the same data as you have converted it.
working as designed. User is allowed to do this, though I am not sure why you would want to do this. In this case you are asking the extraction to convert the data to hex and then reinserting it into a binary field. data studio is doing what is been asked correctly, but this will not store the same data as you have converted it.
Because of this Import Export also not working for Binary Data type.
Because of this Import Export also not working for Binary Data type.
In alpha-31 import is not working for VARBINARY data type.
In alpha-31 import is not working for VARBINARY data type.
Step 1: Create table
CREATE ROW TABLE "SYSTEM"."VarbinaryTable" (
"c1" VARBINARY(5000)
)
UNLOAD PRIORITY 5
GO
Step 2: Insert data into table
INSERT INTO "SYSTEM"."VarbinaryTable"("c1")
VALUES(CAST('wahid' AS VARBINARY(5000)))
GO
Step 3: Execute SELECT * query to verify inserted data.
Grid View shows value as
c1
7761686964
Step 4: Check option "Convert Binary to Hex" in File -> Options->Results
Step 5: Observe Insert Statements in Preview Export option of Tools –> Export Data.
Step 6: Uncheck option "Convert Binary to Hex" in File -> Options->Results
Step 7: Observe Insert Statements in Preview Export option of Tools –> Export Data.
Result : For Varbinary datatype correct Insert SQL script is displayed depending upon
Check/Uncheck option "Convert Binary to Hex" in File -> Options->Results.
Refer : Varbinary_13646.png
Scenario 2: Import of Varbinary and binary
For Import in Varbinary / Binary datatypes we must check option
"Convert Binary to Hex" in File -> Options->Results
Try to import CSV or Excel file
Result : Data imported successfully.
Refer : Import_13646.png
Step 1: Create table
CREATE ROW TABLE "SYSTEM"."VarbinaryTable" (
"c1" VARBINARY(5000)
)
UNLOAD PRIORITY 5
GO
Step 2: Insert data into table
INSERT INTO "SYSTEM"."VarbinaryTable"("c1")
VALUES(CAST('wahid' AS VARBINARY(5000)))
GO
Step 3: Execute SELECT * query to verify inserted data.
Grid View shows value as
c1
7761686964
Step 4: Check option "Convert Binary to Hex" in File -> Options->Results
Step 5: Observe Insert Statements in Preview Export option of Tools –> Export Data.
Step 6: Uncheck option "Convert Binary to Hex" in File -> Options->Results
Step 7: Observe Insert Statements in Preview Export option of Tools –> Export Data.
Result : For Varbinary datatype correct Insert SQL script is displayed depending upon
Check/Uncheck option "Convert Binary to Hex" in File -> Options->Results.
Refer : Varbinary_13646.png
Scenario 2: Import of Varbinary and binary
For Import in Varbinary / Binary datatypes we must check option
"Convert Binary to Hex" in File -> Options->Results
Try to import CSV or Excel file
Result : Data imported successfully.
Refer : Import_13646.png
Issue #13646 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v17.0.0-alpha-15 |
No time estimate |
1 issue link |
relates to #14343
Issue #14343SAP HANA -> import into binary datatype incorrectly creating insert |
I have made modifications to the scripting of insert data for hana. In the process of making and testing these changes I have discovered that hana also supports [binary] datatype with a max length of 2000. This datatype is not documented. I added the binary type to the datatypes list and column init information.