Ben Spead · Dec 16, 2021 go to post

as Vivian explained, you can delete the property definition and then change the name in the storage definition to make it clear that that slot should be ignored.  This of course should be done while keeping versions of everything in source control so that the reason for the change is documented and discoverable in the future should someone need to understand why the property was removed.  

Ben Spead · Dec 10, 2021 go to post

Thanks for quick fix @Evgeny Shvarov!!  Also, thanks for the details that some types are not supported, that is good to know.  At this point I think I am good with letting it take it's best guess and then editing the class afterwards if needed.  With SQL LOAD coming hopefully there will be less need to one-off utilities that do this but I am thankful that it was available for what I needed this week!!

Ben Spead · Dec 9, 2021 go to post

Wow - this looks like it is going to be an incredibly helpful feature!!  Thank you for pointing out the new docs on it :)

Ben Spead · Dec 8, 2021 go to post

Partially answered my own question ... if I edit the auto-generated class' When property and set it to %Library.DateTime, I can then call the generated Import() classmethod of the auto-generated class and import will succeed.  So I am able to push forward ... is this the intended path to do this?  

Should I create an issue for the DateTime column to be property set as a DateTime object and not a Date object?  

Ben Spead · Dec 8, 2021 go to post

There appears to be an issue on Windows as it doesn't strip out the ":" from the filename when auto-generating the class( https://github.com/evshvarov/csvgen/issues/13). 

But beyond that I am stuck because is autodetecting my data/time column as Date and it is failing validation:

USER>s sc=##class(community.csvgen).Generate("C:\temp\badge\data.csv",,"my.data") 
USER>w $system.Status.GetErrorText(sc)                                          
ERROR #5540: SQLCODE: -400 Message: ERROR #5002: ObjectScript error: <ZODAT>zWhenOdbcToLogical+1^my.data.1  

This is that the file looks like:

What,Where,Who,When,CardNum,Fac/CustCode
Granted Access [31358],"MYSPACE ""IN"" READER","Smith, John",12/06/2021 03:46AM,31358,314

So it is blowing up when it tries to read "12/06/2021 03:46AM" into the When field, which it auto-generated as:

Property When As %Library.Date 

I could obviously hand-correct the auto-generated class but that wouldn't help if it just re-generates it the wrong way again when I try to do the import.

Any suggestions on a way around this?  Is there a way to force it to %Library.DateTime?  

Thanks!

Ben

Ben Spead · Dec 7, 2021 go to post

Well done to the winners!  Thank you for participating in the contest and contributing to our community as a result!!

Ben Spead · Nov 30, 2021 go to post

In case this is helpful for any other AOC noobs, the '130669-ab1f69bf' code doesn't go in the sponsor code field that you will be shown when you first create an account.  You need to click on the 'Private leaderboard' link in red to the right of that field, and that will bring you to a new page where you can enter the above code.

Ben Spead · Nov 23, 2021 go to post

Don't worry about it - I have been writing ObjectScript code for 18 years and I had no idea about this method - I have always done it the way you did in your example :)  Thanks for asking the question so I could learn something new as well!

Ben Spead · Nov 23, 2021 go to post

This looks like an excellent resource and I hadn't heard of it before.  Thank you so much for sharing!

Ben Spead · Nov 19, 2021 go to post

@Guillaume Rongier - an interesting (and indeed radical) take on this ;)  I agree that broader use of Python will allow gaps and new best practices to be identified more quickly, to the benefit of all.  Your suggestion of not needing to use [language = python] is thought-provoking ... have you logged an enhancement to allow a descriptor at the class level which will allow python to be assumed across the entire class without requiring the python language to be specified in each method?  

I am generally quite conservative in nature, but your 'liberal' ideas are indeed thought provoking ;) 

Ben Spead · Nov 18, 2021 go to post

""My aim is to get DC members who a really fond of some particular aspect of ObjectScript, or Adapters, or Devices, or IRIS HL7 and IRIS FHIR to create cheat sheets which I will collect into one volume and have them styled in ISC colours and logo's and add them to the ISC Learning, Documentation, Global Masters repertoire"  

I really love this idea!!  I know that @Michael Breen is also playing with ideas of how to crowd-source the simplification of ObjectScript reference resources to make it easier for new people to ramp up with the technology.
 

Ben Spead · Nov 15, 2021 go to post

Congratulations @Matthew Giesmann!!  Nice work on this challenging project.  

One small note - please change the font on your first paragraph - looks like it might be using Header or something like that.

I look forward to seeing this extended

Ben Spead · Nov 15, 2021 go to post

Thank you for sharing ... this looks like a great resource to keep on hand for Python newbies!

Ben Spead · Nov 12, 2021 go to post

@Nicola Sartore - what does your organization use for a source control strategy?  if you use server-side source control hooks and you are on at least Cache 2017.1 (or any version of IRIS) then you can mix and match Studio and VS Code as VSCode fully supports server side source control (as well as client side, but if you are a Studio shop then you don't have any client side source control in place)

Ben Spead · Nov 12, 2021 go to post

@Robert Cemper - I am so glad we can frequently stay in touch and share technical ideas 7 years after your retirement via the D.C. :)  thank you for all of your contributions!!