Problem importing specific data from .csv file
Hello!I use JDev 11.1.3.0 with JSF ui and I followed the excellent example on the importation of values separated by commas of a file .csv, M. Bors, but I have a specific problem...
(1) when I try to import a value date (format dd/mm/yyyy) to a date field in my table of the adf, the date will not be accepted and it is not shown (I use Row.setAttribute ('field', text) for this purpose). I guess I have to enter in a specific format, but do not know how!
(2) the same with double values. I tried showing 1.50 and it's on the table of the adf 0.02. Tried of 1.50 (with a different text separator) and he throws me an error and doesn't show anything on the table (again I use Row.setAttribute ('field', text) for that one too)...
Any help would be appreciated!
Thank you
Published by: Nikolas Saridakis on 6 Νοε 2010 11:10 πμ
I don't know, but it the seam that you set the type inappropriate at the table of the adf. I guess you read the CSV as string data. When you use
row.setAttribute("filed_name", value);
You must pass an object of the appropriate type of the attribute defined in the table. Therefore, convert the string containing the date to a Date object before asking in the previous row. Even with the double, you must convert the string "1.50' to a dual purpose."
Timo
Tags: Java
Similar Questions
-
Dear friends,
I have already created the directory DIR1.
I get the following warning message
1 CREATE OR REPLACE PROCEDURE P2
2 is
3 BEGIN
4. create table (ext_table_csv1)
5 I have the number,
Varchar2 (20) n 6,.
7 m Varchar2 (20)
4%
9 organization external)
type oracle_loader 10
By default 11 Dir1 directory
(settings) 12 access
13 records delimited by newline
14 fields completed by «,»
15 field missing values are null
16)
17 location ("file.csv")
18)
19 reject limit unlimited;
20 * END P2;
QL > /.
CAUTION: Procedure created with compilation errors.
QL > show err
rreurs for PROCEDURE P2:
ERROR OF INE / COL
------- -----------------------------------------------------------------
/ 1 PLS-00103: encountered the symbol "CREATE" when expecting one of
What follows:
begin case declare exit for goto if loop mod null pragma
raise return select update while < ID >
< between double quote delimited identifiers of > < a variable binding > < <
Close current delete fetch locking insert open rollback
SAVEPOINT SQLExecute set pipe fusion commit forall
Please help me.NGK246 wrote:
If at all, I want to recover data from another file CSV (say 'test20101214.txt') to the external table defined so I just need to
change the location of the CSV pointing to the table, as shown below...
run immediately "change the location of the table ext_test (" test ' |) " to_char(sysdate-1,'YYYYMMDD') |'. txt ")';
And then use INSERT... SELECT to inject data into my actual table residing on my database.Please correct me if I'm wrong.
Yes, that's about all.
-
How to import data from CSV files to IOM?
Hello
We have to import some files in the csv format and are set up in a specific folder hierarchy. Please help as I am not able to go further.
Thank you very much!So you mean, you want to create users in the IOM based on the data contained in these files...
Then, you should probably create GTC file connector to consume your CSV file and create users in the IOM.Thank you
Suren -
How to import data from CSV file in a table using oracle forms
Hello
I have a CSV file and I want to insert in the oracle database in a table by using a button under forms of oracle.
the user can select the CSV file by using the open dialog box.
can someone help me find the method to import and select the client machine file?
THX.You want to import the contents of the file or the file itself? I assume that you want to import the contents of the file. For this, there are really only two options to make an Excel (.csv) file and import into shapes; WebUtil or a JavaBean. Some examples of both:
WebUtil: How to read an Excel file in a form of Oracle
Oracle is CJP/BEAN - project ExcelTry them both and see which works best for you.
Craig...
-
Tracing of data from CSV file to XY Chart
Hi all
I need to read data from a worksheet (*.) CSV) and then to trace in LabVIEW.
The file contains three values
Time, Date, temperature value
For example, here are the Logs.
16:46:59,31/01/14,+018.2C
16:47:59,31/01/14,+018.2C
16:48:59,31/01/14,+018.2C
16:49:59,31/01/14,+018.2C
16:50:59,31/01/14,+018.5C
16:51:59,31/01/14,+018.5C
16:52:59,31/01/14,+018.5C
16:53:59,31/01/14,+018.5C
16:54:59,31/01/14,+018.5C
16:56:40,31/01/14,+018.5C
16:57:40,31/01/14,+018.5C.
.
.
.
.
.
23:51:24,31/01/14,+015.0C
23:52:24,31/01/14,+015.0C
23:53:24,31/01/14,+015.0C
23:54:24,31/01/14,+015.0C
23:55:36,31/01/14,+015.0C
23:56:44,31/01/14,+015.0C
23:57:44,31/01/14,+014.6C
23:58:44,31/01/14,+015.0C
23:59:44,31/01/14,+015.0CWhat I have to do is create a VI in LabVIEW to visualize these data.
I did it as below:
It seems correct, but the x axis is the axis of time and 16:46:59 it's just to show 16, I know that I have not done something to handle this.
But I'm not able to find what I can do in this case.
Please suggest how to get exact values full time on the x-axis.
Code of your VI contains a bit of 'orphan' reading of the worksheet"which has wired the file path. Diagram-disable (or remove) this superfluous code and your VI will work very well with Temp.txt in control of the path of the file.
Bob Schor
-
load data from csv file into table
Hello
I'm working on Oracle 11 g r2 on UNIX platform.
We have an obligation to load data to the table to a flat file, but on one condition, need to make the comparison between filed primary key if the file is available then update another filed and if the recording is not available, we need to insert.
How can achieve us.
SQLLoader to load the CSV file data into a staging Table.
Then use the MERGE SQL command to the lines of insert/update of table setting for the target table.
Hemant K Collette
-
An error in loading data from .csv file using sql * loader
Hello
I wrote a control file, to load data into the table.
The .csv (input file) contains a value that contains within it. So that the value is placed in "" (double quotes)
The record that contains the value that is quoted is not loaded into the file.
example: -.
input file (.csv file)
001, apple, 1, 31 December 00
002, "abc, def & ltd", December 1, 31 00
in the example above second row is not inserted into the table.
How can I insert all the rows in the table.
any help is appreciated.
Thanks in advance...
RXGlooks like your control file?
Try this.
fields ended by ',' optionally surrounded "" " -
Import data from txt file and name the channels
Hello
I want to import data from a file txt (see attachment). Well well, no proplem, but I want to also read the information on the channel names and units and rename the imported channels. Is it possible to do? It is also important that the number of channels may vary.
Can someone give me some examples of code?
Thank you very much
Gabriel
Hello Andreas,
Thanks for your work. I'll adjust the code.
Gabriel
-
5 Lightroom sometimes fails to load EXIF GPS data from .jpg files
Until I Lightroom, I used geoSetter to add GPS data to my .jpg files. Most of them have loaded up in LR without problem, but for some of them, Lightroom could not import the GPS data. I used to compare GPS data in the loaded files OK and those who have not noticed that some of the problem files do not have exiftool: GPS, GPS Time Stamp, dater GPS map data. I used exiftool to change these in the file, Lightroom still not managed to load GPS data. Anyone has an idea why Lightroom 5 sometimes fails to load EXIF GPS data from .jpg file
= P3207532.jpg - data from GPS not imported into Lightroom
ID of the GPS Version 2.2.0.0
GPS Latitude Ref North
GPS Longitude Ref is
REF Altitude GPS altitude
Time GPS 2015:03:20 02:18:36Z
GPS Latitude 20 deg 54' 41.68 '' N
GPS Longitude 107 deg 0' 5.47 "E
GPS Position 20 deg 54' 41.68 '' N, 107 deg 0' 5.47 "E
= P3207533. JPG - Imported data GPS OK in Lightroom
ID of the GPS Version 2.2.0.0
GPS timestamp 02:22:26
GPS map Datum WGS-84
GPS Date Stamp 2015:03:20
Time GPS 2015:03:20 02:22:26Z
GPS Latitude 20 deg 54' 43,41 "N
GPS Latitude Ref North
GPS Longitude 107 deg 1 9.10 ' E
GPS Longitude Ref is
GPS Position 20 deg 54' 43,41 "N, 107 deg 1 9.10 ' E
= P3207532.edited.jpg - data from GPS not imported into Lightroom
ID of the GPS Version 2.2.0.0
GPS Latitude Ref North
GPS Longitude Ref is
REF Altitude GPS altitude
GPS timestamp 02:22:26
GPS map Datum WGS-84
GPS Date Stamp 2015:03:20
Time GPS 2015:03:20 02:22:26Z
GPS Latitude 20 deg 54' 41.68 '' N
GPS Longitude 107 deg 0' 5.47 "E
GPS Position 20 deg 54' 41.68 '' N, 107 deg 0' 5.47 "E
The problem with P3207532.jpg is that it contains two sets of GPS, a values in the section of EXIF metadata in the XMP metadata section:
$ exiftool -a -G P3207532.jpg | grep -i gps [EXIF] GPS Version ID : 2.2.0.0 [EXIF] GPS Latitude Ref : North [EXIF] GPS Latitude : 20 deg 54' 41.68" [EXIF] GPS Longitude Ref : East [EXIF] GPS Longitude : 107 deg 0' 5.47" [EXIF] GPS Altitude Ref : Above Sea Level [EXIF] GPS Time Stamp : 02:22:26 [EXIF] GPS Map Datum : WGS-84 [EXIF] GPS Date Stamp : 2015:03:20 [XMP] GPS Date/Time : 2015:03:20 02:18:36Z [XMP] GPS Version ID : 2.2.0.0
But the XMP section contains an incomplete set GPS fields. Note that XMP:GPSDateTime specifies a time other than EXIF:GPSTimeStamp.
I don't know which of your programs may have created these XMP values false, incomplete, but they confused LR. According to the specifications of the Working Group of the metadata, which accepted LR, LR, choose the EXIF GPS values and false XMP values should not confuse it. But LR is preferring the XMP values and then conclude it is not all the GPS coordinates.
You can work around this bug in LR by doing:
ExifTool - xmp: gpsdatetime = - xmp: gpsversionid = file
-
Acquire data from a file using a dialog popup on a stamp object tabs-delimited
I'm trying to import data from a file delimited by tabs using a dialog popup on a stamp object. I bought the book by Thom Parker -all on the stamps of the PDF in Acrobat and paperless workflow and have worked through the examples in the Appendix.
My problem is to understand how to integrate the data in the object of the file dialog box.
I'm not plagiarizing his book - so am elect at this time is not to justify my code. The script reads the file, by simply providing only not in the accounts rendered file so that I can choose which line to import into the stamp.
I typed in the code exactly how the book described, but when the popup dialog object is selected, there is nothing in the menu dropdown. When I click OK, the first record is placed on the stamp - except for the fields that I am eager to appear in the popup box object dialog box.
I searched the forums, as well as the JavaScript reference. There are examples of popup dialog object, but none of them show how to import data from a file - just for the items to be of type in the list.
Any help would be greatly appreciated! I tried to work on this for several months now.
I got the files directly from tdjohnson7700. Here are my findings:
There are two problems with your files:
You reference an object of 'Dialogue', even if you declared as 'dialogue' - JavaScript is case-sensitive, so you must use the lowercase version.
And then you have an additional column of data in your text file, Acrobat doesn't like it and reports an error. You can see when you use the tools > forms > Forms Options more > function to import data to import data from your text file. You must either add a form field named "last" to your stamp, or you need to remove this column from the text file. After these two changes, the stamp works.
-
How to read data from several files and add columns in a single file
Hi guys,.
I have a problem in adding data from files in different columns. I have the attachment a file A and B which I am reading and not able to get the data in the Result.txt file. Please give your opinion on how can I do this
You must add the data of all files before proceeding with a single entry.
-
Download data from text file for Hyperion ESSBASE by FDM.
Hello
I want to upload data from text file for Hyperion ESSBASE by FDM. The file format is given below.
Entity, Department, designation, effective, SalaryPaid
E11001, BSG, AsstManager, 12, 820000
E11001, BSG, Manager, 6, 740000
Where staff and SalaryPaid is the Member of the account dimension. Entity, Department, and designations are the dimensiosn in the ESSBASE.
Is it possible to download the file above using FDM, can we have two account member in the line?
I am brand new with FDM. ask for your help.
Kind regards
SunilCreate two scripts to import (choose Import Data Pump when you are prompted for the type of import script)
(1) call the GetAccounts 1st and 2nd PutAccounts
(2) associate GetAccounts size amount in your import format.
(3) associate PutAccounts with the account dimension in your import format
(4) adding NZP expression to dimension of amount
(5) in GetAccounts put the following code...
+' Get the names of account in the header line.
If DW. Utilities.fParseString (strRecord, 5, 4, ",") = "number of head" Then
+ ' Local variables for the account names.
+ Acct1 dim +.
+ Acct2 dim +.
+ +
+ ' Head Count (column 4 of 5) +.
+ Acct1 = DW. Utilities.fParseString (strRecord, 4, 5, ",") +.
+ ' Wages (column 5 of 5) +.
+ Acct2 = DW. Utilities.fParseString(strRecord, 5, 5, ",") +.
+ +
End IfGetAccounts strField =
(6) in PutAccounts put the following code...
+'+ Local Variables
Dim AcctName (2)
Dim AmountVal (2)
Dim z
Dim rsAppend+ "The names of individual account is analyzed and stored +"
AcctName (1) = DW. Utilities.fParseString (RES. PvarTemp1, 2, 1, ',')
AcctName (2) = DW. Utilities.fParseString (RES. PvarTemp1, 2, 2, ',')+' If student for accounts from here import file.
AmountVal (1) = DW. Utilities.fParseString (strRecord, 5, 4, ",")
AmountVal (2) = DW. Utilities.fParseString (strRecord, 5, 5, ",")+' Name of temporary importation work table +.
strWorkTableName = RES. PstrWorkTable+' Create temporary table recordset trial balance +.
Set rsAppend = DW. DataAccess.farsTable (strWorkTableName)For z = 01:58 ' this can change depending on the number of additional accounts processing
+ If IsNumeric (AmountVal (z)) Then +.
+ +
+ If (z) AmountVal <> 0 Then +.
+ +
+ ' Create a new record and to provide its field values.
+ rsAppend.AddNew +
+ rsAppend.Fields ("DataView") = "CDA" +.
+ rsAppend.Fields ("PartitionKey") = RES. PlngLocKey +.
+ rsAppend.Fields ("CatKey") = RES. PlngCatKey +.
+ rsAppend.Fields ("PeriodKey") = RES. PdtePerKey +.
+ rsAppend.Fields ("CalcAcctType") = 9 +.
+ rsAppend.Fields ("Account") = AcctName (z) +.
+ rsAppend.Fields ("Amount") = AmountVal (z) +.
+ rsAppend.Fields ("Entity") = 'chain of the entity here ' +.
+ rsAppend.Fields ("UD1") = "string C1 here +.
+ rsAppend.Fields ("node2") = "String C2 here +.
+ rsAppend.Fields ("UD3") = "String C3 here +.
+ rsAppend.Fields ("UD4") = "string C4 here +.
+ "Add folder to the collection +"
+ rsAppend.Update +
+ +
+ End if +.
+ +
+ End if +.Next
+' Close the recordset.
rsAppend.closeIf DW. Utilities.fParseString (strRecord, 5, 4, ',') <> '0' then
+ PutAccounts = DW. Utilities.fParseString (RES. PvarTemp1, 2, 1, ',') +.
On the other
+ RES. PblnSkip = True.
End IfYou may need to change the aboveto that meet your exact needs, but the basic structure of the scripts should not change too
Published by: SH on May 25, 2012 10:34
-
United Nations-editing data from a file, without eval
I play with the writing of data in a file so that it can persist between sessions. I use
f.Write (Data.toSource ());
to save my data, where f is the subject of my file, and
data var = eval (f.read ());
to retrieve the data from the file. But that seems to be a way very unsafe to do things. Of course, it is unlikely that someone will use, preference files AEscript as a door furtively, but it's always just security by obscurity.
Is there a way to read data serialized into a file without using eval()? Or I have to roll-my-own parser / serialize to do safely?
It turns out that this question has an answer here:
Read in JSON · EVAL file and to not NOT fabiantheblind/extendscript Wiki · GitHub
-
How to move data from flat file to the repository of execution
Hi all
We have 2 instances
1. development - we are able to move the data from flat file to target the DB using scenario1.
The files are in 04 who's ODI installation box
2. enforcement Repo
to scenario1 execution repo installed in ODI 07 which is ODI installation box
but not able to move the data from flat file to target DB.
We get an error - file not found.
File is located in the box 04.
My question is that what is the best process to make scenario1 course migrated to work.
Appreciate your help.I wanted to say that in view of the dev and prod in the Prod repository agent is not a good idea.
Ideally, in repo Prod, you must have prod 07 agent.
In Dev Repo, you shouldn't have dev 04 agent
makes sense
-
Read data from the file into ArrayList
Hello
I have a class called product describing the charactristics of products such as the name, id, price etc.. I have the whole set and use the get methods in my class of product. I store the information on my products in an ArrayList. I can write the information on my products in a file.
so far, but so good...
I want now to re-read the data from the file and store it in my list of tables again. I know I can use Parsing and read in data in an ArrayList as String, int, double etc. but is anyway to read in from 'Product' (then it would be up to my class of product)?
Thank you in advance.1. are you aware of serialization?
2. get a name, I love not dealing with numbers.DB
Maybe you are looking for
-
My gif files are not displayed on the web page
My web page has some gif images that are not loading
-
How can I get rid of extra space in the section toolbar?
There is an empty space between the tabs and the Navigation toolbar. It's the same height that other toolbars and is very annoying. How can I get rid of this space? I tried to paste in a screenshot to show what I mean, but he does not accept this for
-
Qosmio F10 - recovery would not work
My uncle used her its F10 recovery disc, because his machine was going very slowly (according to him he had moments where it took more than an hour to enter completely into windows). After using the recovery disk, its system refused to load windows,
-
How can I make multiple selections in a tree by using <; shift >; click
I feel like I'm something obvious missing here, but I searched a bit around without solution. I have a tree with checkboxes (ATTR_SHOW_MARKS is enabled). I am able to select multiple items in the list (ATTR_SELECTION_MODE is VAL_SELECTION_MULTIPLE).
-
LaserJet CM2320jn - no software scanning for iOS 10.8.1
I am trying to help a friend get their MacBook with iOS 10.8.1 to analyze. There do not appear to be updated on the site of HP. Please help, she needs this problem quickly. Thank you very much! Gordon