SAP Hana SQL Type mapped to OData Edm.boolean - hana-xs

In the SAP HANA developer guide there is a list explaining SQL - EDM Type mapping
Missing is how to map from a SQL Type to Edm.Boolean, anyone know how?

In the SAP HANA developer guide (SPS 07) it also says that the OData implementation in SAP HANA XS supports only those SQL types listed in the mentioned list/table. Therefore Edm.Boolean is not supported.
A workaround could be to use Edm.Byte instead of Edm.Boolean which is mapped to the TinyInt HANA SQL Type. If you only want to have a true/false or 0/1 value I think the TinyInt SQL Type is the closest you can get to a Boolean.

Related

Check HANA edition with SQL?

I have a JDBC connection to a SAP HANA database and I want to query whether it's a SAP HANA Cloud db or not. I know I can find the version with:
SELECT VERSION FROM SYS.M_DATABASE;
and this gives me 4.00.000.00.1608802791 for the cloud and 2.xx for my on-premise Dockerised version, but to avoid hard-coding version numbers everywhere, is there an equivalent query to, say, SQL Server's SELECT SERVERPROPERTY('edition')?
You could use SELECT VALUE FROM M_HOST_INFORMATION WHERE KEY='build_branch'
On premise: fa/hana2sp05
In the cloud: fa/CE2020.36
You might also like M_SYSTEM_OVERVIEW, it has interestign informations such as the server start time.

Dataflow SQL - Unsupported type Geography

I'm trying to create a Dataflow SQL on Google Big Query and I got this error
Unsupported type for column centroid.centroid: GEOGRAPHY
I couldnt find any evidence that Dataflow SQL actually does not support Geography data and in the documentation geography data is not mentioned at all. Is this the case, why is that and is there any workaround?
No unfortunately Dataflow SQL does not support Geography types. It supports a subset of BigQuery Standard SQL. Only the data types listed explicitly in the page you linked are supported, it should probably be more clear about that.
Dataflow SQL relies on ZetaSQL to parse and analyze queries, and ZetaSQL does not yet support Geography (you can see the current status here).
Unfortunately for now the only workaround is to convert any GEOGRAPHY fields to a supported type.

Hana Column Store dialect to Oracle 12c SQL

While trying to benchmark Oracle's Database Inmemory, we were looking for publicly available benchmarking data set and tools. The CH-benCHmark suited our requirement exactly, but it has HANA Column Store Dialect as part of the source files.
So, our requirement is to convert these HANA Column Store dialect SQLs to Oracle 12c SQLs. Google search returned the conversion from Oracle to Hana dialect not the reverse.
Has anyone came across this requirement? Is there a simple/direct way to do the conversion?
Any pointers will be much helpful.
Yes I have done this exercise! there's no direct way from HANA Dialect to Oracle Dialect, But you can make use of ORACLE_LOADER and it's semantics to effectively create Oracle Dialect! Only problem you may face would be the flow, where HANA's flow is totally different from Oracle's schema creation flow.
For example:
you can easily use LOAD FROM FILE... syntax in HANA, But you need an externally organized table in case of Oracle.

Why doesn't linqpad display all the columns in a table?

I am using Windows Authentication to connect to a SQL-SERVER database.
I am using version 4.47.02 of Linqpad.
If you see the attached image, the same table in Sql server has more columns than the columns displayed in Linqpad.
EDIT: The columns that do not get displayed have a UDT for a data type.
How can I get all the columns in linqpad?
LINQPad supports user-defined data type aliases, but not user-defined CLR types. The latter is not easy to deal with, as suggested by the link that Chris posted.

Field types available for use with "CREATE TABLE" in Microsoft Access

I have the displeasure of generating table creation scripts for Microsoft Access. I have not yet found any documentation describing what the syntax is for the various types. I have found the documentation for the Create Table statement in Access but there is little mention of the types that can be used. For example:
CREATE TABLE Foo (MyIdField *FIELDTYPE*)
Where FIELDTYPE is one of...? Through trial and error I've found a few like INTEGER, BYTE, TEXT, SINGLE but I would really like to find a page that documents all to make sure I'm using the right ones.
I've found the table in the link below pretty useful:
http://allenbrowne.com/ser-49.html
It lists what Access's Gui calls each data type, the DDL name, DAO name and ADO name (they are all different...).
Some of the best documentation from Microsoft on the topic of SQL Data Definition Language (SQL DDL) for ACE/Jet can be found here:
Intermediate Microsoft Jet SQL for Access 2000
Of particular interest are the synonyms, which are important for writing portable SQL code.
One thing to note is that the Jet 4.0 version of the SQL DDL syntax requires the interface to be in ANSI-92 Query Mode; the article refers to ADO because ADO always uses ANSI-92 Query Mode. The default option for the MS Access interface is ANSI-89 Query Mode, however from Access2003 onwards the UI can be put into ANSI-92 Query Mode. All versions of DAO use ANSI-89 Query Mode. I'm not sure whether SQL DDL syntax was extended for ACE for Access2007.
For more details about query modes, see
About ANSI SQL query mode (MDB)
This has it all. It's direct from MS, and actually tells you what the SQL datatype is that correlates to the GUI name.