Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

Aliases are added to the field names when loading from Cloudera with Data Gateway

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrea_Bertazzo
Support
Support

Aliases are added to the field names when loading from Cloudera with Data Gateway

Last Update:

May 14, 2024 2:57:48 AM

Updated By:

Sonja_Bauernfeind

Created date:

May 13, 2024 6:50:57 AM

The problem occurs when running a reload from Data Gateway to a Cloudera DB (Cloudera Hive).

The reload is completed correctly, but the fields are imported with aliases. This means that the reload imports the fields as 'TableName.FieldName' instead of importing them as just 'FieldName'.

For example, with this script:

LOAD meter_id,
Field1,
Field2,
Field3;

[meter_attribute]:
SELECT "meter_id",
"Field1",
"Field2",
"Field3"
FROM internaldb."meter_attribute";

Fields are imported as: meter_attribute.Field1, meter_attribute.Field2, meter_attribute.Field3.

 

Resolution

The problem can be fixed adding the row EnableUniqueColumnName=0 to the connection string.

  1. Edit your Cloudera ODBC connection
  2. Locate Connection string
  3. Add EnableUniqueColumnName=0, separating it with a semicolon (;) from the previous parameters: 

    string.png

 

Additional Notes:

  • It is not necessary to select the  "Allow non-SELECT queries" option in the connector.
  • In order to make Data Preview work reliably with any new Cloudera connections, we recommend adding the following syntax to its syntax.json file:

    1. Open C:\ProgramData\Qlik\Gateway\genericodbc_database_syntax.json in a text editor with elevated permissions (administrator)

    2. Add:
        {
          "SyntaxId": "ClouderaHive",
          "DisplayName": "Cloudera Hive syntax",
          "DelimiterStart": "`",
          "DelimiterEnd": "`",
          "DataPreviewSelectTemplate": "SELECT ${COLUMN_LIST} FROM ${TABLE_NAME} ${FILTER} LIMIT ${LIMIT_VALUE}",
          "DatabaseTerm": "catalog",
          "OwnerTerm": "schema"
        }
    3. Restart the Data Gateway service.

      This snippet re-configures all the custom syntax settings for the driver.

      Please, notice that the block must have a comma (,) either immediately before or after it as shown in the screenshot below.

      genericodbc_database_syntax_json_screenshot.png

    4. Once restarted, open the data connection editor again and the "Cloudera Hive syntax" option should appear, as in this image:

      cloudera-hive-syntax-for-dag-1.png

 

 

Internal Investigation ID

QB-26342

 

Environment

  • Qlik Cloud
  • Qlik Data Gateway Direct Access all versions
Labels (1)
Version history
Last update:
‎2024-05-14 02:57 AM
Updated by: