Alpha Video Training
Results 1 to 19 of 19

Thread: 2 Questions on Importing files

  1. #1
    Member
    Real Name
    Dave Venus
    Join Date
    Oct 2006
    Posts
    25

    Question 2 Questions on Importing files

    Hi!

    I am using the standard file import function (not the new import pack) and have 2 questions. I am using the 16NOV10 patch update.

    Question 1
    In the properties there is an option to 'overwrite' the table however the table still gets records appended to it. Seems like overwrite would mean to empty (ie. zap) the table and then load it. What am I missing here? Is this the expected behavior?

    So for now I am using an operation to zap and then load the table.

    If "overwrite" does not mean "zap" then I would request a new option to be able to "zap" a table on import.

    Question 2
    Do aliases work in the file import in a desktop application?
    I am getting an error about the fields not being defined and the path cannot be found.

    The alias name is "ApplName_Home" and the path is "C:\users\dvenus\Documents\A5V10.d\ApplName.d". In the import path I enter "[ApplName_Home]\abc.csv". And
    "[ApplName_Home]\abc.dbf" for the path to the table.

    If this is not supposed to work I would request it as new feature or a fix depending on how you look at it.

    Thanks for any help, suggestions, corrections, etc.!

    Dave Venus

  2. #2
    Member
    Real Name
    Garry M Flanigan
    Join Date
    Jul 2004
    Location
    Melbourne, Australia
    Posts
    909

    Default Re: 2 Questions on Importing files

    Dave,
    1. I agree that records get appended even when overwrite is selected.
    It is certainly misleading, but your approach to zap the table first is best and foolproof.
    In the import there is an option to check for duplicates in which case existing records can be updated (overwritten?) with the info in the import.
    2. Look at FILENAME_FROM_ALIAS() in Help.

  3. #3
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,143

    Default Re: 2 Questions on Importing files

    Quote Originally Posted by dvenus View Post
    Hi!

    I am using the standard file import function (not the new import pack) and have 2 questions. I am using the 16NOV10 patch update.

    Question 1
    In the properties there is an option to 'overwrite' the table however the table still gets records appended to it. Seems like overwrite would mean to empty (ie. zap) the table and then load it. What am I missing here? Is this the expected behavior?

    So for now I am using an operation to zap and then load the table.

    If "overwrite" does not mean "zap" then I would request a new option to be able to "zap" a table on import.

    <...snip..>
    Dave Venus
    Overwrite should zap when importing into a table with the same name. If it does not, I say that is a bug. Moreover, in my brief testing that's not the only thing not working correctly in the new the way import operations work, whether using the genie or not. I do not have time right now to put together a bug report, so I can only hope someone checks it out and submits a report.

    Raymond Lyons

  4. #4
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,298

    Default Re: 2 Questions on Importing files

    Quote Originally Posted by Raymond Lyons View Post
    Overwrite should zap when importing into a table with the same name. If it does not, I say that is a bug. Moreover, in my brief testing that's not the only thing not working correctly in the new the way import operations work, whether using the genie or not. I do not have time right now to put together a bug report, so I can only hope someone checks it out and submits a report.

    Raymond Lyons
    i have constructed two different test cases, one using .xls files and one using .csv files. in both cases the import correctly overwrote the existing file as instructed.

    i don't agree that there is any bug with the import operation.

  5. #5
    Member
    Real Name
    Garry M Flanigan
    Join Date
    Jul 2004
    Location
    Melbourne, Australia
    Posts
    909

    Default Re: 2 Questions on Importing files

    Selwyn,
    I did this a couple of days ago but from memory the steps to get the error are:
    Create an import operation into a new table and run the operation.
    Now modify that operation to import into an existing table (the new table you created in previous step) and select overwrite data, now run operation. You will see that records are appended and existing records are not overwritten.

  6. #6
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,298

    Default Re: 2 Questions on Importing files

    Quote Originally Posted by Garry Flanigan View Post
    Selwyn,
    I did this a couple of days ago but from memory the steps to get the error are:
    Create an import operation into a new table and run the operation.
    Now modify that operation to import into an existing table (the new table you created in previous step) and select overwrite data, now run operation. You will see that records are appended and existing records are not overwritten.
    the overwrite option applies when you are importing into a new table. it will overwrite the existing table (if there is one) and create a new table from the imported data.

    if you are importing into an existing table, then the overwrite option does not apply.

  7. #7
    Member
    Real Name
    Garry M Flanigan
    Join Date
    Jul 2004
    Location
    Melbourne, Australia
    Posts
    909

    Default Re: 2 Questions on Importing files

    Selwyn,
    That may be but "overwrite" in the operation is not qualified in the way you qualify it now. So if you think this is not a bug you need to make it clear to the user.

    the overwrite option applies when you are importing into a new table. it will overwrite the existing table (if there is one) and create a new table from the imported data.
    Surely if you are importing into a new table then there is never anything to overwrite?

  8. #8
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default Re: 2 Questions on Importing files

    Garry,
    I take what Selwyn stated as the import operation will overwrite an existing table if the new table option is used and imported into a table that already exists of the same name.....nice to know the subtle difference if I am correct in my interpretation.

    I have never encountered this issue due to my habit of zapping the import table prior to import or using a temp table (new table created on import) and then appending the records to the existing table.

    I do see your point however.....
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  9. #9
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,298

    Default Re: 2 Questions on Importing files

    Quote Originally Posted by Garry Flanigan View Post
    Selwyn,
    That may be but "overwrite" in the operation is not qualified in the way you qualify it now. So if you think this is not a bug you need to make it clear to the user.



    Surely if you are importing into a new table then there is never anything to overwrite?
    if you are importing into a new table, then there COULD be something to overwrite.

    say you have an existing table called 'customer.dbf'.
    you define an import operation to import into a new table, and you specify that the name of the new table is 'customer.dbf'.

    when you run the import, a5 will see that there is an existing table called 'customer.dbf'. if will put up a dialog to ask if you want to overwrite the existing table.

    if you want to suppress this dialog from coming up, you can by checking the 'overwrite' box in the import properties.

  10. #10
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,200

    Default Re: 2 Questions on Importing files

    The only ask overwrite I see is the combination to new table when an existing table of same name exists. There is no overwrite when import to existing table is chosen, its an append. Unless I am missing something. I included an example.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  11. #11
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,298

    Default Re: 2 Questions on Importing files

    Quote Originally Posted by Mike Wilson View Post
    The only ask overwrite I see is the combination to new table when an existing table of same name exists. There is no overwrite when import to existing table is chosen, its an append. Unless I am missing something. I included an example.
    i am talking about a 'classic' import operation. your example is an alphaDAO import operation. we are comparing apples an oranges here.

  12. #12
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,200

    Default Re: 2 Questions on Importing files

    This is not an issue. No need for anything further in this line. At least not for me. I do what MikeC does, zap the table before import.

    I'm just pointing out that with either import method, to get the import operation to overwrite the table requires chosing "write to new table", for the table you want to be overwritten with the import. Otherwise if you chose write to existing table, it will append, no chance for overwriting. No real issue here.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  13. #13
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,143

    Default Re: 2 Questions on Importing files

    Quote Originally Posted by Raymond Lyons View Post
    ....Moreover, in my brief testing [overwrite is] not the only thing not working correctly in the new the way import operations work, whether using the genie or not. I do not have time right now to put together a bug report, so I can only hope someone checks it out and submits a report.

    Raymond Lyons
    I need to add that what caused me to think there were "other things" not working correctly with the new import operations was a test file that apparently had some minor corruption in it, probably from it having been zipped and unzipped. That said, I for one preferred the way the old import genie worked--the old genie seems more robust in some respects than the new one.

    By the way, I too always zap before importing into an existing table, assuming that I only want the new data in the table. For that matter, I do that to a temp table even when my ultimate goal is to append the new data to another table (the append goes from the temp table to my ultimate target table). There are a number of reasons for doing this, including the fact that with an append one can put in conditional expressions and/or combine fields from the imported data into one field in the target table--something you can't do with a simple import.

    Raymond Lyons

  14. #14
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,143

    Default Re: 2 Questions on Importing files

    Quote Originally Posted by Raymond Lyons View Post
    I need to add that what caused me to think there were "other things" not working correctly with the new import operations was a test file that apparently had some minor corruption in it, probably from it having been zipped and unzipped. That said, I for one preferred the way the old import genie worked--the old genie seems more robust in some respects than the new one......
    FYI, it turns out there was no corruption in my test file--whatever the problem was with using the new import genie with my file, Selwyn is fixing it. Once it works the way it is supposed to work, there is no reason to prefer the way the old genie worked--the new one is probably the one that is more robust.

    Raymond Lyons

  15. #15
    Member
    Real Name
    Don Metzger
    Join Date
    Aug 2010
    Posts
    5

    Unhappy Re: 2 Questions on Importing files

    I'm attempting to import a file of approximately 150 fields, 158,000 records letting A5V10.5 create a new table. I've tried creating the file using ~ as a delimiter and as a Lotus WK1 file.

    A5 locks up importing a TXT file and gives an Invalid Field Name error trying to import a WK1 even though it sees all the field names.

    ??????????

  16. #16
    Member
    Real Name
    Garry M Flanigan
    Join Date
    Jul 2004
    Location
    Melbourne, Australia
    Posts
    909

    Default Re: 2 Questions on Importing files

    Even if Alpha sees the field names correctly ensure that field names do not start with a number, have spaces or are longer than 10 chars. In general just use A-Z and 0-9 in field names but do not start with a number.
    You can import into one table then append the records to another table if the names are a problem.
    Good luck!

  17. #17
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,298

    Default Re: 2 Questions on Importing files

    Quote Originally Posted by DMZMAN View Post
    I'm attempting to import a file of approximately 150 fields, 158,000 records letting A5V10.5 create a new table. I've tried creating the file using ~ as a delimiter and as a Lotus WK1 file.

    A5 locks up importing a TXT file and gives an Invalid Field Name error trying to import a WK1 even though it sees all the field names.

    ??????????
    Please send us the file so we can test it ourselves.

  18. #18
    Member
    Real Name
    Don Metzger
    Join Date
    Aug 2010
    Posts
    5

    Default Re: 2 Questions on Importing files

    Tried again, N/G. Shortened all the field names to 10 characters or less, made sure there were no field names that started with a number, and filled in spaces within field names with the underscore character _ . Used the pipe symbol, | as a delimiter.

    Still gives the Invalid Field Name error.

    The text file is 102MB.

    :(

  19. #19
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,298

    Default Re: 2 Questions on Importing files

    the text file is unlikely to be 102mb after it has been zipped.

    you can use yousendit.com to send it to us (selwyn@alphasoftware.com)

    however, it is also unlikely that the issue can't be reproduced with a smaller file. try opening the file in an exitor like textpad and copy the first few lines of the file.

Similar Threads

  1. Importing .wav files
    By Larry Gordon in forum Alpha Five Version 9 - Desktop Applications
    Replies: 11
    Last Post: 11-10-2009, 07:41 AM
  2. Importing Text Files (?)
    By piperent in forum Alpha Five Version 7
    Replies: 4
    Last Post: 12-16-2006, 11:44 AM
  3. Importing questions.
    By Jesse Vickey in forum Alpha Five Version 5
    Replies: 1
    Last Post: 07-26-2002, 01:49 PM
  4. RE: Importing from text Files
    By Ian Prime in forum Alpha Five Version 4
    Replies: 1
    Last Post: 04-14-2002, 09:52 AM
  5. Importing asci files
    By James Watson in forum Alpha Five Version 1
    Replies: 2
    Last Post: 12-03-2001, 05:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •