I have a pipe delimited file and want to find out how to align my informatica target data to header.
For example: Current output
FullNameofPerson|ChangedNameofPerson
JohnDoe|JonDoe
Wanted/Expected Output in txt flat file.
FullNameofPerson|ChangedNameofPerson
JohnDoe |JonDoe
We can use padding to fill up the gaps after the data to align with header.
You can use
out_FullNameofPerson= RPAD( FullNameofPerson, length('FullNameofPerson'),' ') in an EXP to fix this issue for FullNameofPerson.
You have to modify all columns in this way.
And then attach this out_FullNameofPerson port to file target.
Also make sure you are adding header to the output file.
Related
I am trying to create a program that can read out to a csv (comma separated). Is there a way to manipulate say the column width or whether a cell is left or right justified internally from my code so that when i open up the file in excel it looks better than a bunch of strings cramped into tiny cells. My goal is for the user to do as little thinking as possible. If they open up the file and have to size everything right just to see it that seems a little crummy.
CSV is a plain text file format. It doesn't support any visual formatting. For that, you need to write the data to another file format such as .xlsx or .ods.
I have a qlikview data file.
The file includes:
An XML formatted table header, after loading XML table header in sas system, I received some sasdatasets that describe about structure of qlikview data file, I made empty sasdataset that correspond with structure of qlickview data file.
The actual data like that: " à# à# à# # ÁZ¦EÀ ÁZ¦EÀÁZ¦EÀ ", but I don't know what is format data is stored in?
Now I need load actual data into this empty sasdataset, but I don't know how can I do. My leader suggested using ''READING BYNARY DATA". I tried read by using statement INFILE and INPUT with ENCODING, but my implements aren't successful because very hard determine Binary Informat.
Can somebody give me suggestion ? thank so much!
I have a file written using gzwrite. Now i want to edit this file and insert some data in the middle by seeking. Is this possible with gzseek/gzwrite in cpp?
No, it isn't possible. You have to create a new file by successively writing the pieces.
So it is not much different from inserting data in the middle of an uncompressed file, except for one thing: with the uncompressed file, you could leave a hole of the right size (a series of spaces, for example) and later on overwrite that with the data to be inserted, but of course that is not possible with the compressed file because you cannot predict its compressed length.
I have a very large gzipped csv file. I would like to split it into two gz files based on the string pattern in a particular column. I know it is possible to loop through the content and create two files, but is there a better way to do it in python in terms of efficiency?
In addition, the original file has one line header. I would like to either have the headers in each of the two result files, or remove headers altogether.
I have a textfile (*.css Cascading Style Sheets) file, which is a plain text.
Then I have additional program information, just some double and int values, which has noithing to do with the text file directly.
I would like to store that state in a file, so that when I open that file I have access to the content of the *.css and the double and int values.
So I would be able the applications last state with the text file content and those double and int values.
What would be the most effective way?
I guess, you'll want the result to still be usable as a CSS File. In that case, add a comment block with a marker at the beginning, where you can store your data in some ASCII-Format, e.g. JSON. Like e.g.:
/* --#--
{x=42, y=47.11, whatever="blabla"}
*/
/* here comes the original css */
Then you can easily find out, if the data is already there by looking for /* --#--. You can use existing JSON parsers to retrieve your data and existing JSON writers to generate the file. You don't have to parse the whole CSS, but only the comments with the marker.