Qlik Community

Groupe des Utilisateurs Francophones

Vous êtes francophone? Ce groupe est pour vous. Venez découvrir comment démarrer avec Qlik Sense et QlikView, poser vos questions et partager vos tutos et astuces avec les membres de notre communauté.

Highlighted
juliana_mia
Contributor II

file csv whitout first line

HELLO,

I have a CSV file without a header and delimiter.


I would like to specify in QLIK SENSE that the first data is not the title of the column and put a title to that column.


Is it possible to do this in the Qlik Sense script? Here is my CSV file:

2051772_01.jpg

2051772_02.jpg

2051772_03.jpg

2051772_04.jpg



Thanks in advance


1 Solution

Accepted Solutions
christophebrault
Valued Contributor

Re: file csv whitout first line

You can rename field in two way :

with a mapping table using : rename fields MapTableName

or manually with : rename fields @1 to FIeldName1,@2 to FieldName2, etc.

But you need to rename and then do you left join to make it work properly

https://help.qlik.com/fr-FR/sense/February2018/Subsystems/Hub/Content/Scripting/ScriptRegularStateme...

4 Replies

Re: file csv whitout first line

This is possible while loading.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
juliana_mia
Contributor II

Re: file csv whitout first line

Hello Anil ,

Thanks you for your answer.

I know it's possible in load script. But i would like to know what is the syntax for insert a label in CSV column in Qlik Sense.

I try this the option "NO LABELS" in load script :

ARTICLES:

load *

from [ARTICLES.QVD](qvd)


LEFT JOIN (ARTICLES)

LOAD

*

FROM [HTTP://media.com/jpg/liste.csv]

(txt, utf8, no labels ,delimiter is '\t', msq);

;


And the name of column is "@1" but i want rename the colonne.

I would like to know what is the option for insert a label

christophebrault
Valued Contributor

Re: file csv whitout first line

You can rename field in two way :

with a mapping table using : rename fields MapTableName

or manually with : rename fields @1 to FIeldName1,@2 to FieldName2, etc.

But you need to rename and then do you left join to make it work properly

https://help.qlik.com/fr-FR/sense/February2018/Subsystems/Hub/Content/Scripting/ScriptRegularStateme...

Partner
Partner

Re: file csv whitout first line

Bonjour,

essai qqlchose comme :

ARTICLES:

load *

from [ARTICLES.QVD](qvd)


LEFT JOIN (ARTICLES)

LOAD

@1 as Champs1,

@2 as Champs2,

......

FROM [HTTP://media.com/jpg/liste.csv]

(txt, utf8, no labels ,delimiter is '\t', msq);

Note: pour la jointure, il faut au moins un nom de champs commun entre les deux tables, sinon il y aura un produit cartesien.