12-09-2009
OK my biggest problem is that I want to be able to use this on a number of different queries, and most of my queries / CSV have 10-25 columns, and I'm not about to write out in scripts for each and every column depending on the particular query. I want to write this in a nice easy function.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a CSV file which contains number series as one of the fields. Some of the records of the field look like :
079661/3
I have to convert the above series as
079661
079662
079663
and store it as 3 different records.
Looking for help on how to achieve this. Am a newbie at Shell... (10 Replies)
Discussion started by: mihirk
10 Replies
2. Shell Programming and Scripting
I am trying to parse a csv file in the below 'name-value pair' format and then use the values corresponding to the name.
Type:G,Instance:instance1,FunctionalID:funcid,Env:dev,AppName:appname... (6 Replies)
Discussion started by: chiru_h
6 Replies
3. Shell Programming and Scripting
I have a CSV file that needs to through two seperate processes (in the end there will be 2 files (Dload.unl and Tload.unl and we'll say the input file name is mass.csv). I have a processfile() function that will call the process Dload funtion. In Dload I want to read mass.csv into Dload and then... (1 Reply)
Discussion started by: dolo21taf
1 Replies
4. Shell Programming and Scripting
Hey guys,
I'm in the process of learning PHP and BASH scripting. I'm getting there, slowly ;)
I would like some help with parsing a CSV file. This file contains a list of hostnames, dates, and either Valid, Expired, or Expired Soon in the last column.
Basically, I want to parse the file,... (12 Replies)
Discussion started by: dzl
12 Replies
5. Shell Programming and Scripting
Yes, there is a great doc out there that discusses parsing csv files with sed, and this topic has been covered before but not enough to answer my question (unix.com forums).
I'm trying to parse a CSV file that has optional quotes like the following:
"Apple","Apples, are fun",3.60,4.4,"I... (3 Replies)
Discussion started by: analog999
3 Replies
6. Shell Programming and Scripting
Hello list,
I am working on a csv file which contains two fields per record which contain IP addresses. What I am trying to do is find records which have identical fields(IP addresses) which occur 4(four) times, and if they do, delete all records with that specific identical field(ip address).
... (4 Replies)
Discussion started by: landossa
4 Replies
7. Shell Programming and Scripting
Hi Members, I am stuck with the following problem. Request your kind help
I have an csv file which contains, 1 header record, data records and 1 footer record. Sample is as below
Contents of cm_update_file_101010.csv
--------------------------------------------------
... (6 Replies)
Discussion started by: ramakanth_burra
6 Replies
8. Shell Programming and Scripting
Hi,
Newbie here and I need some help to parse a csv file that contains fields separated by ",". What I need to achieve here is, read the 1 line file and extract 240 fields and pass to a variable and then read the next 240 fields and pass to a variable, over and over. If anyone can assist that... (4 Replies)
Discussion started by: tmslixx
4 Replies
9. Shell Programming and Scripting
Hi,
I have basic knowledge on unix shell scripting(not an expert).
My requirement is reading the csv file using the schema defined in the configuration file and if the condition is not mached then move the unmatched record to a error file and matched good records into other file.
In brief: ... (43 Replies)
Discussion started by: shree11
43 Replies
10. Shell Programming and Scripting
Hello All,
I have an input CSV file like below, where first row data can be in different position after every run of the tool, i.e. pzTest in below example is in column 1, but it can be also in 3 column and same for all the headers in the first row.
pzTest, pzExtract, pxUpdate, pzInfo... (1 Reply)
Discussion started by: asirohi
1 Replies
LEARN ABOUT DEBIAN
tangram::sucks
Tangram::Sucks(3pm) User Contributed Perl Documentation Tangram::Sucks(3pm)
NAME
Tangram::Sucks - what there is to be improved in Tangram
DESCRIPTION
Tangram has taken a concept very familiar to programmers in Java land to its logical completion.
This document is an attempt by the coders of Tangram to summarise the major problems that are inherant in the design, describe cases for
which the Tangram metaphor does not work well, and list long standing TO-DO items.
DESIGN CAVEATS
query language does not cover all SQL expressions
Whilst there is no underlying fault with the query object metaphor per se, there are currently lots of queries that cannot be expressed
in current versions of Tangram, and adding new parts to the language is not easy.
some loss of encapsulation with queries
It could be said this is not a problem. After all, adding properties to a schema of an object is akin to declaring them as "public".
Some people banter on about data access patterns, which the Tangram schema represents. But OO terms like that are usually treated as
buzzwords anyway.
HARD PROBLEMS
partial column select
This optimisation has some serious dangers associated with it.
It could either be
no support for SQL UPDATE
It may be possible to write a version of "$storage->select()" that does this, which would look something like:
$storage->update
( $r_object,
set => [ $r_object->{bar} == $r_object->{baz} + 2 ],
filter => ($r_object->{frop} != undef)
);
no explicit support for re-orgs
The situation where you have a large amount of schema reshaping to do, with a complex enough data structure can turn into a fairly dif-
ficult problem.
It is possible to have two Tangram stores with different schema and simply load objects from one and put them in the other - however
the on-demand autoloading combined with the automatic insertion of unknown objects will result in the entire database being loaded into
core if it is sufficiently interlinked.
replace SQL expression core
The whole SQL expression core needs to be replaced with a SQL abstraction module that is a little better planned. For instance, there
should be placeholders used in a lot more places where the code just sticks in an integer etc.
support for `large' collections
Where it is impractical or undesirable to load all of a collection into memory, when you are adding a member and then updating the con-
tainer, it should be possible to
This could actually be achieved with a new Tangram::Type.
MISSING FEATURES
concise query expressions
For simple selects, this is too long:
...
non-ID joins
tables with no primary key
tables with multi-column primary keys
tables with auto_increment keys
tables without a `type' column
tables with custom `type' columns
tables with implicit (presence) `type' columns
fully symmetric relationships
back-refs are read-only.
bulk inserts
Inserting lots of similar objects should be more efficient. Right now it generates a new STH for each object.
`empty subclass' schema support
You should not need to explicitly add new classes to a schema if a superclass of them is already in the schema.
perl v5.8.8 2006-03-29 Tangram::Sucks(3pm)