Informatica powercenter always can't read the file properly. All data always appears in one column - informatica

I have problem with informatica powercenter. When i want to import data from flat file csv, all datas always appear in one column. I need to edit the file first, and set define name in excel then informatica can read all data properly. How to read the data properly in powercenter without doing define name first in excel?
Thank you

You need to ensure,
You're reading file definition as delimited. Here is a file wizard where you can define it as delimited.
while reading set it so it reads col name from first row.
And then read from second row.
You can check this img.
https://2.bp.blogspot.com/-enDSMKLYyRY/UXADBtNE8WI/AAAAAAAAAu8/oVfr6IsAl8Y/s1600/8.jpg
If you set above properties up, infa should be able to read definition properly and you dont have to set col name or datatype.

Related

Reading Excel with edit on read in DataFusion

I am reading an excel file with google DataFusion Wrangler plugin. In the excel the first row needs to be discarded, as headers and data start from second row.
Problem is when Wrangler reads and parse-as-excel a file, it gives default option of choosing the first row as header. Need some help to isolate such that first row is skipped and header is 2nd row with the data following.
Thanks for the help!
This behavior is currently not supported by the Wrangler plugin. As you are already aware, Wrangler will only take a look at the first column to decode headers.
In this case, pre-processing the file to remove the first row is the easiest solution.
Yes, it is possible. You have to filter any column that will always have values (not empty). But you will have to enter the column names by hand after.
Inside the wrangler, go to the column "A", click on the arrow to open the menu.
Then you choose "Filter", and you choose to "Remove rows" if value is empty.
It will remove the first row.
You repeat the operation, but filter to remove if column "A" is equal the value that is the header for the A column.

Compare line excel and line table sql

I will need help or leads for a seemingly simple problem but I am blocking a lot on it. (I'm still a beginner in C ++ / mysql)
I have to fill a table of my database under MySQL by importing the data from a .csv file (it's OK, I succeeded) but before doing this import, I must compare the data of my first line , second, third etc ... until the end of the excel file (which corresponds to the names of the columns that there must be in my table) with the name of the columns of my table under MySQL in order to verify that we have a good scheduling and we put the right data in the right places.

Google cloud not recognizing header with string column

When I try to create a dataset in Bigquery it is not able to autodetect my header (which is the first row) since I have a column containing only string values. Is there any way to circumvent this?

Extract data from JSON field with Power BI desktop

I'm using Power BI desktop to connect to a MySQL database.
One of the fields contains data with the following structure:
a:1:{s:3:"IVA";O:8:"stdClass":3:{s:11:"tax_namekey";s:3:"IVA";s:8:"tax_rate";s:7:"0.23000";s:10:"tax_amount";d:25.07000000000000028421709430404007434844970703125;}}
I need to transform the data in a way that allows the extraction of the value of the tax amount. That is, I need to transform this column to: 25.07.
How can I do this? I tried splitting the column by semicolon, but since not all the columns have the same number of semicolons it didn't work.
Thanks in advance!
Use this function
Works only for your task - parse number 25.07 from source string
(src) => Splitter.SplitTextByEachDelimiter({";d:",";"})(src){1}
The value in the column is not actual JSON file .There is option in power bi itself to split json column but it should be valid json.To check whether is a json file or not try using the link
https://jsonformatter.curiousconcept.com/
After that go to edit query right click on the json column and transform-> JSON .
It will transform your json file into columns.

Pentaho DI (Kettle) best way to select flow based on csv file header?

I'm using Pentaho DI (kettle) and not sure what's the best way to do the following:
From a downloaded csv file, check if a column exists, and based on that select the right next step.
There are 3 possible options.
Thanks,
Isaac
You did not mention possible options, so I'll just provide you with a sketch showing how to check if a column exists in a file.
For this you will need a CSV file input step and Metadata structure of stream step which will read the metadata of the incoming stream.
For a sample csv file with 3 columns named col1, col2 and col3 you get every column in a separate row with its name as a value in Fieldname column in Metadata step.
Then depending on your needs you could use for example Filter Rows or Switch / Case step for further processing.