How to load a simple CSV?

Moderator: NorbertKrupa

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: How to load a simple CSV?

Post by id10t » Mon Apr 15, 2013 10:20 am

Hi!

To promote a consistent database and reduce the need for scripts to transform data at the source, Vertica lets you transform data as part of loading it into the target database. Transforming data during loads is useful for computing values to insert into a target database column from other columns in the source database.

FILLER like a temporary variable used for data transformation, data loaded to FILLER and after a transformation (in example is TRIM function) you fill it to appropriate column.

Regards Daniel.

khine
Beginner
Beginner
Posts: 33
Joined: Wed Apr 03, 2013 2:54 am

Re: How to load a simple CSV?

Post by khine » Mon Apr 15, 2013 5:19 pm

Thanks for the reply , If possible can you recommand me any book or website that i can learn more about it .As you can see my data that i want to load into vertica is mixture of varchar and integer and this is very important for me .



Thanks in advance :)

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: How to load a simple CSV?

Post by id10t » Mon Apr 15, 2013 11:52 pm

HI!

I don't know any book about Vertica RDBMS, but official documentation is good enough (only a search is annoying).

If you want a quick help with loading data, describe little better your table definition and data and we will help you.
So far you can learn from examples in documentation and forum.

As i understand:
* "Cat" - means "Category"
* "Rd" - means Revenue Department
* ":S" - means sum
* delimiter is SPACE
Is it correct?
If so, it little more complicated to parse such data, because of spaces.

khine
Beginner
Beginner
Posts: 33
Joined: Wed Apr 03, 2013 2:54 am

Re: How to load a simple CSV?

Post by khine » Tue Apr 16, 2013 3:54 am

Glad to hear that you can help me .I wanna load a csv file in vertica .Below is the data from my csv file.

Cat A Jan 2013 1st Rd :S$92100
Cat A Jan 2013 2nd Rd :S$91010
Cat A Feb 2013 1st Rd :S$87109
Cat A Feb 2013 2nd Rd :S$78301
Cat A Mar 2013 1st Rd :S$74689
Cat A Mar 2013 2nd Rd :S$64209


As jimmy show the demo that how to load the sample csv file but the data is very sample .I am wondering if u can help me with my data.By the way,Cat mean "category",Follow by year ,Rd mean "Round" ans S$ is the currency .Thanks for advance .

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: How to load a simple CSV?

Post by id10t » Tue Apr 16, 2013 9:53 am

Hi!

What is your Table definition? Post DDL please, and describe each column in data source.
I can't help basing on data source only.

khine
Beginner
Beginner
Posts: 33
Joined: Wed Apr 03, 2013 2:54 am

Re: How to load a simple CSV?

Post by khine » Tue Apr 16, 2013 3:33 pm

Thanks you ,actually i am not store my data in table format but in text file ,may be give me your advice that i should store these lkind of data in which file format ?

khine
Beginner
Beginner
Posts: 33
Joined: Wed Apr 03, 2013 2:54 am

Re: How to load a simple CSV?

Post by khine » Tue Apr 16, 2013 3:40 pm

The previous example they use "a""b","cd" as data that store in text file,for my case i want to load "Cat A Jan 2013 1st Rd :S$92100","Cat A Jan 2013 2nd Rd :S$91010","Cat A Feb 2013 1st Rd :S$87109","Cat A Feb 2013 2nd Rd :S$78301" .


Thank you :)

Post Reply

Return to “Vertica Data Load”