Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Congratulations to the new Qlik Luminary and Partner Ambassador class! Meet them here
cancel
Showing results for 
Search instead for 
Did you mean: 
Lokesh_Del_45
Contributor
Contributor

Empty field/column is generated and unable to proceed further in QDI

Dear Qlik community,

I have a csv file which contains the data as follows (',' present at the end of each row).

Field1,Field2,Field3,
1,ABC,100,
2,DEF,200,
3,GHI,300,

I have created a pipeline and chose replication task. Before running the preparation, it showed an empty column as below.

Empty column.png

The error is shown in the below screenshot.

Error log message screenshot.png

Error: E: RetCode: SQL_ERROR SqlState: 42000 NativeError: 1038 Message: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name. Line: 1 Column: -1 [1022502] (ar_odbc_stmt.c:5077)
00014464: 2026-09-01T14:17:05 [TARGET_LOAD ]E: execute create table statement failed, statement IF OBJECT_ID(N'[iocl_raw].[Fact_STK]') IS NULL BEGIN EXECUTE('CREATE TABLE [iocl_raw].[Fact_STK] ( [] NVARCHAR(1), [CMS_DATE_UPDATED] NVARCHAR(1), [DENSITY] NVARCHAR(1), [DENSITY_15C] NVARCHAR(1), [DIP_UOM] NVARCHAR(1), [NET_QTY] NVARCHAR(1), [PRODCODE] NVARCHAR(1), [PRODUCT_DIP] NVARCHAR(1), [PRODUCT_QTY] NVARCHAR(1), [RO_CODE] NVARCHAR(1), [STK_DATE] NVARCHAR(1), [STK_TIME] NVARCHAR(1), [STK_TRAN_CODE] NVARCHAR(1), [STK_TXN_ID] NVARCHAR(1), [TANK_NO] NVARCHAR(1), [TANK_STATUS] NVARCHAR(1), [TEMP] NVARCHAR(1), [UOM] NVARCHAR(1), [WATER_DIP] NVARCHAR(1), [WATER_QTY] NVARCHAR(1), [XFR_DATETIME] NVARCHAR(1) ) ');

Question 1: Is it because of ',' present at the end of each row in the table?

Question 2: How can we resolve this error without editing in the csv file?

cc: @Halesha_Bandri @hbandri 

Labels (2)
2 Replies
Chanty4u
MVP
MVP

Hi

Yes, the trailing comma creates an additional empty column, which QDI detects and generates as [], causing SQL Server error 1038.

You can resolve it without editing the original CSV by excluding/ignoring the empty column in the QDI file-source mapping/parsing configuration. If that option isn't available, use a preprocessing/staging step to remove the trailing delimiter.

Lokesh_Del_45
Contributor
Contributor
Author

QDI is not allowing us to edit/remove/ignore that column. When we create the connection, it is creating an empty column which is not responding to any steps and we are also unable to proceed further.