Import excel spreadsheet into Oracle using sdcli command line tool - import

I'm attempting to into import oracle 11gR2 using the command line tool for SqlDeveloper 4.0. The ultimate reason is we are attempting to import a lot of freetext fields that need to preserve the exact formatting. CR LF, etc for legal reasons. End users need to edit these in Excel.
SQLLoader baulks at the CR LF's, You can achieve this in SqlDeveloper by switching the formatting to UTF-8 for import / export. We are now trying to build up some scripts after discovering how to do this in the command line runtime sdcli64... BUT there doesn't appear to be an option to import from a flat file or .xlsx in that utility??
Any pointers or are we missing an obvious parameter?
(we are using the latest version of SqlDeveloper we can find, 4.03)
Cheers,
Chris

New version of Oracle developer 4.1 was released as an Early adopter today. You can run the sdcli or sdcli64 command line version with the new parameters. This will import excel files as possible in the sqlDeveloper GUI and it will preserve the formatting using the new [-utility] switch.
You can then use the scripting tool/method of choice to build scripts to do all files in a directory, etc.

With new SQL Developer 4.1 you may import XLSX file (and other formats too) via command line:
Use sdcli utility import.
You will need a config XML file. To create one, start the import in the UI, configure the columns, etc, and at the last step click the button 'Save State'. It will create an XML file you may re-use in command line.

Related

SPSS .sav file not reading into SAS

Attached here is my very simple code to read in .sav files into SAS for analysis.
PROC IMPORT
DATAFILE='C:\Users\Desktop\Iliu_SAS_Files_Relocated\0310_HPV-Boys\SPSS Files\BoyVacuptake.sav'
OUT=work.BoyVacuptake
DBMS=SAV REPLACE;
The error code that I keep getting is:
ERROR: DBMS type SAV not valid for import.
I am running SAS 9.4 which should allow me to import/export SPSS files using the DBMS=SAV option. Does anyone know why I may be getting this error? Or any fixes?
I've tried using the DBMS=SPSS option as well, same error. Probably going to try to just read everything into R and export into SAS from there. Need to convert everything to a .sas7bdat file. The .sav files are from an external partner, I do not have access to SPSS to just save the data in a different format.
First make sure you have SAS/Access to PC Files licensed and installed. Run PROC SETINIT to see what you have licensed.
Second try using SPSS as the DBMS= setting as this documentation page says:
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acpcref/n1h6b01uh0dm2yn1fpq85gjgwcfs.htm
Importing and Exporting SPSS Files
SPSS Files (DBMS=SPSS)
The IMPORT and EXPORT procedures support two DBMS= identifiers for SPSS .sav files. The DBMS=SPSS specification uses SPSS file formats to access data in SPSS .sav files on UNIX and Microsoft Windows operating platforms.

How to use Pentaho Spoon to rename files that do not have an extension

I am new to using Pentaho Spoon. I have about 100 text files in a folder, none of which have file extensions. I have found that if I create a job and move a file, one at a time, that I can simply rename that file, adding a .txt extension to the end. What I'd like to do is create a job that goes through and renames each file and adds the .txt extension. I've tried using the regex, but can't seem to get it to work because there's no file extension.
Any help would be greatly appreciated.
It's a pretty straightforward solution but you need to use a Transformation, as Job steps won't do it, ok?
You need the following steps:
Get File Names: just add your folder and the RegExp ".*" (without the double quotes), so everything is listed. Check if it's ok with "Show filename(s)..." button.
Modified Java Script Value: declare a new_filename var concatenating the desired extension. Remember to click "Get Variables" after adding the script to output the new field.
var new_filename = filename + '.txt';
Process Files: select Operation = Move and filename/new_filename as your source/target filenames.
That's it!
Renaming a group of files is one thing I wouldn't use Kettle for. Why not let the shell do what the shell does best?
rem example for Windows CMD shell
ren absolute-path-to-folder\*. *.txt
This can be done using a Shell job entry, if you find reason to do it in Kettle at all.
I've seen "just use a shell script" answers for this before. Works great if you can guarantee you're Kettle server is on the same OS as the developer workstation. I'm in an environment where the Dev/Spoon instance is Windows, but the Prod/Kettle environment is Linux, so you can't write one script file to rule them all.
As for "Why on earth would you do this?", my scenario is an integration scenario. We're using Pentaho for Data Integration, but a different tool for Enterprise Integration. I want a Pentaho Job to produce an output file, and I want my Enterprise Integration tool to pick up the file and do something with it, but not before Pentaho is done writing the file. Renaming helps avoid a race condition when the Enterprise Integration solution recognizes the file is there, but Pentaho isn't done writing it yet.
If I could rename a set of files, for example change from test..csv.processing to test..csv, then Pentaho would create the file initially with the .processing extension, and then remove the extension once it's done. The Enterprise Integration solution that's looking for test.*.csv won't start processing the file until Pentaho renames it. Bingo, no race condition.

How to Import/Export live code template in android studio?

In Eclipse there is simply option to import or export code template. I want to do same in android studio but there is not any direction option to do so.
I have create one template and now i want to apply it to all my other system so i need to export & import.
I have one option to do but i just want to know that is any other way to do.
Create your code template file in eclipse and export.
Exported file will be XML.
Now copy that XML file and move to ..//.AndroidStudio/config/templates
Restart Studio and Use it.
Can you please help me out.
Thanks for your time.
System-independent solution:
Go to File -> Export Settings, choose only Live templates, and export it to a file.
Then you can use File -> Import Settings and provide this file to import live templates.
(I haven't tested it myself so I'm not sure how exactly the Import Settings works. I don't know if it merges the settings with your current ones or swaps it entirely. Bare that in mind when trying...)
System-specific solutions:
Mac OS:
Go to /Users/<username>/Library/AndroidStudioX.X/templates/.
There's where user.xml file containing your Live Templates should be.
Linux:
The templates are saved inside ~/.AndroidStudioX.X/config/templates/Android.xml

Can't generate documentation with phpdocumentor 2 with Netbeans

Using Netbeans "Generate PHPDoc", I'm able to generate the structure.xml for my project, but I'm at a lost as to how to get from that XML file to the fully generated phpdoc.
I was finally able to generate my HTML files. I simply needed to activate the XSL extension manually by editing php.ini in WAMP.
I must admit that due to my lack of skills with the command line, it was somehow difficult to follow instructions that are given out on the web.

Eclipse is not applying Save Actions when I format a whole (java) package

I have configured Eclipse to format source code and trim trailing spaces on all lines on saving a file. This works as expected when I edit a source file and save it.
However these save actions are not executed when I right click on a package and execute the Source > Format command. The files do get saved after formatting but the trailing spaces are not removed. A quick experiment revealed that none of the actions defined under "Save Actions" are executed when a whole package is formatted.
How can I fix this?
I am using Eclipse Version 3.6.2 (Build id: M20110210-1200) on 64 bit Ubuntu Lucid.
You can try using Source -> Clean Up... command instead of Format for batch normalization, but you will still need to manually configure it.