neo4j-import tool documentation for neo4j 3.0 - windows

Is there any documentation available for the neo4j-import command line tool for neo4j 3.0? I've used the command line tool and the powershell script version in neo4j 2.3.3, but the same commands are not working for neo4j 3.0 when using the Windows 64bit version. I can successfully run the import using The Linux/UNIX (tar) version of neo4j 3.0.
bin\neo4j-import.bat --into "C:\Neo4j\TBR_3\data\databases\graph.db" --nodes "C:\Developer\Neo4j_Staging\TBR\header_person_neo4j.psv,C:\Developer\Neo4j_Staging\TBR\nodes_person_neo4j.psv" --nodes "C:\Developer\Neo4j_Staging\TBR\header_address_neo4j.psv,C:\Developer\Neo4j_Staging\TBR\nodes_address_neo4j.psv" --nodes "C:\Developer\Neo4j_Staging\TBR\header_telephone_neo4j.psv,C:\Developer\Neo4j_Staging\TBR\nodes_telephone_neo4j.psv" --relationships "C:\Developer\Neo4j_Staging\TBR\header_personAddress_neo4j.psv,C:\Developer\Neo4j_Staging\TBR\rels_personAddress_neo4j.psv" --relationships "C:\Developer\Neo4j_Staging\TBR\header_personTelephone_neo4j.psv,C:\Developer\Neo4j_Staging\TBR\rels_personTelephone_neo4j.psv" --delimiter "|"
gives me:
'")"' is not recognized as an internal or external command,
operable program or batch file.
To get an idea of the structure of the headers I'm using, the header_person_neo4j.psv file contains:
masterIndividualKey:ID(Person)|matchIndividualKey:int|individualKey:int|stdTitle:string[]|stdTitleAlias:string[]|stdForename:string[]|stdForenameAlias:string[]|stdForenameNYSIIS:string[]|stdForenameSoundex:string[]|stdForenameDoubleMetaphone:string[]|stdOthername:string[]|stdOthernameAlias:string[]|stdOthernameNYSIIS:string[]|stdOthernameSoundex:string[]|stdOthernameDoubleMetaphone:string[]|stdSurname:string[]|stdSurnameNYSIIS:string[]|stdSurnameSoundex:string[]|stdSurnameDoubleMetaphone:string[]|stdGender:string[]|stdNameQuality:int[]|stdDOB:string|stdDOBMax:string|stdDOBMin:string|stdHierarchy:int[]|stdRecency:string[]|stdRecencyMax:string|stdHierarchyMin:int|stdPreferredName:int|stdGenderCombined:string|title:string|forename:string|surname:string|gender:string|nameScore:int|dateOfBirth:string|dateOfDeath:string|deathDateActual:string|:LABEL

Here is the import tool documentation which explains with examples. The problem is with your file URL, in Windows you have to use different file URL for example as bellow:
neo4j-import --into C:/neo4j/data/databases/MEDIUM_GRAPH --id-type integer --stacktrace --nodes:STORE "C:/nodes/store_header.csv,C:/nodes/dimstore.csv"
This blog is also useful to understand different methods tricks. All data by default are imported as string in neo4j so you do not need to specify string data type in your csv headers. Refer to this document to get information about csv file header format.

Related

HL7 FHIR IG Publisher returns java NullPointerException

I'm trying to generate documentation of my HL7 FHIR profiles using IG Publisher (publisher.jar). I'm running it on command line on macOS. I've uploaded the IG resource on Simplifier and it validates with no errors.
The problem is that i'm getting java.lang.NullPointerException. Full output below:
java -jar publisher.jar -ig fsh-generated/resources/ImplementationGuide-nfz.pozplus.json -tx n/a
FHIR IG Publisher Version 1.1.120 (Git# 210e48f945ad). Built 2022-05-13T15:20:39.709Z (8 days old)
Detected Java version: 11.0.10 from /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home on Mac OS X/x86_64 (64bit). 2048MB available
dir = /Users/marcingrudzien/Library/CloudStorage/OneDrive-Osobisty/Praca/iEHReu/NFZ/POZ-Plus/FHIR/sushi-test/NfzTest, path = /Users/marcingrudzien/.gem/ruby/3.1.2/bin:/Users/marcingrudzien/.rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/bin:/Users/marcingrudzien/.rubies/ruby-3.1.2/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Postgres.app/Contents/Versions/latest/bin
Parameters: -ig fsh-generated/resources/ImplementationGuide-nfz.pozplus.json -tx n/a
Start Clock # sobota, 21 maja 2022 20:56:04 czas środkowoeuropejski letni (2022-05-21T20:56:04+02:00)
API keys loaded from /Users/marcingrudzien/fhir-api-keys.ini (00:00.0027)
Package Cache: /Users/marcingrudzien/.fhir/packages (00:00.0030)
Load Configuration from /Users/marcingrudzien/Library/CloudStorage/OneDrive-Osobisty/Praca/iEHReu/NFZ/POZ-Plus/FHIR/sushi-test/NfzTest/fsh-generated/resources/ImplementationGuide-nfz.pozplus.json (00:00.0053)
Root directory: /Users/marcingrudzien/Library/CloudStorage/OneDrive-Osobisty/Praca/iEHReu/NFZ/POZ-Plus/FHIR/sushi-test/NfzTest/fsh-generated/resources (00:00.0084)
Publishing Content Failed: null (00:00.0086)
(00:00.0087)
Use -? to get command line help (00:00.0087)
(00:00.0087)
Stack Dump (for debugging): (00:00.0088)
java.lang.NullPointerException
at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:2947)
at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:2168)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:854)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:10144)
I hope someone here could help me. I could provide any additional information, if needed.
From the stack dump, you are missing a "path" property in your json config file, but I highly recommend that you switch to using the new set up, a ini file that points to a template and a IG resource. Use something like the sample-ig as a starter (https://github.com/FHIR/sample-ig) or see the how-to (https://build.fhir.org/ig/FHIR/ig-guidance/index.html)

oracledb_exporter binary files

There is Prometheus Oracle database exporter https://github.com/iamseth/oracledb_exporter
Under Running section, "/path/to/binary -l log.level error -l web.listen-address 9161" is not clear me.
Here I am not getting what is "/path/to/binary" mean, is it oracle client or /usr/bin/ path, or which file I need to replace with? I have RHEL7.3
After setting DATA_SOURCE_NAME is set correctly and running below commman, its throwing error (no such cmd - /path/to/binary)
/path/to/binary -l log.level error -l web.listen-address 9161
Please refer ZIP/clone from location :-https://github.com/iamseth/oracledb_exporter
Oracle database exporter should start and fetch required values/status from oracle database.
In case you're still looking for the answer:
The easiest way is to download the pre-compiled version. Otherwise you will need to compile it yourself: https://github.com/iamseth/oracledb_exporter/releases
Download the version you want e.g. 'oracledb_exporter.0.2.2.linux-amd64.tar.gz' and unzip it.
You will get a folder 'oracledb_exporter.0.2.2.linux-amd64' which conatins two files:
default-metrics.toml
oracledb_exporter
The second one is the one you need to execute:
-> /path_to/oracledb_exporter.0.2.2.linux-amd64/oracledb_exporter log.level error web.listen-address 9161

Verpatch.exe error

I am trying to add new version resource string to .exe file using verpatch.
I need to add new sting to version resource as I am creating test connector to Qlikview. For QlikView and Qlik Sense to be able to recognize an .exe file as a connector, the file version information resource must include the property “QlikView Connector”.
I am developing my connector with Visual Studio and this command is run as a post build command and build ends with error. I also tried to run it from command line with same result:
C:\verpatch>verpatch.exe C:\QV_temp\QVTestConnector.exe /s "QlikView Connector" "Qv Test Connector"
Exception in ParseBinaryVersionResource
Error in ParseBinaryVersionResource
error parsing version info from the file
Some of actions failed, exiting
I have also tried different versions on verpatch.exe. Any ideas?
The example that Qlik gives on their documentation does not seem to work with the version of verpatch.exe that ships with QVX SDK 2.1.
I resolved this error by updating to a newer version from CodePlex.
Edit:
verpatch seems to have moved to https://github.com/pavel-a/ddverpatch/releases
Please see documentation. After /s should go "description".
If it has problem reading existing version resource, try to rewrite it completely with /va. So, do something like:
verpatch your.exe 1.0.0.0 /va /s desc "QlikView Connector" /s product "Qv Test Connector"
If you can share the problematic exe with the author of verpatch (on Codeplex), he may provide a fix.
I couldn't set properties on my executable with any version of verpatch - because I had a different codepage in the resource strings.
I would recommend rather using the Python package pe-tools (PyPI), which has a nicely documented command peresed that does this (docs).
You can also set specific version-info fields or set resource entries to the contents of a file:
peresed filename.exe -V "QlikView Connector=Qv Test Connector"
I have run this command successfully, but not verified whether the properties were set - but other properties like FileDescription are set correctly.

Why does my ATG build fail when using runAssembler?

I recently installed ATG 10.2 on my Mac using the instructions found here.
After successfully installing ATG I then tried to compile my ATG code using the runAssembler script provided, however I encountered the following error:
[ERROR] ./bin/dynamoEnv.sh: line 355: -Djava.security.policy=lib/java.policy: No such file or directory
Why does my ATG build fail?
In the spirit of SO I am answering my own question:
It turns out I encountered a known bug with the ATG installers which fail to update the <DYNAMO_HOME>/home/localconfig/dasEnv.sh with the correct values (dasEnv.bat for Windows). The values which you need to add to this file are:
# Note: I am using WebLogic (change if you are using jBoss or WebSpere)
export ATGJRE=<YOUR_PATH_TO_JAVA>
# e.g. export ATGJRE=/usr/bin/java
export WL_HOME=<WLS_HOME>
# e.g. export WL_HOME=/Users/my_user/Applications/weblogic/wlserver10_3
export WL_VERSION=10.3.6
# self explanatory ...
Please note that this bug affects Windows installs too. More information can be found here.

Trying to connect to sqlite db using schemacrawler using OSX - why is it asking for a user?

See bottom for conclusion:
I'm trying to use schemacrawler to diagram a sqlite database. My setup:
OSX 10.8
SchemaCrawler 10.5 downloaded from Here
Java version 1.7.0_45 downloaded from Oracle
sqlite version: 3.7.12 2012-04-03 19:43:07 86b8481be7e76cccc92d14ce762d21bfb69504af
I'm in the directory where I installed schemacrawler, and using this command line:
stebro$ java -classpath lib/*:. schemacrawler.tools.sqlite.Main /Library/Application\ Support/MyApp/Data/MyApp.db -command="select count(*) from myTable" -infolevel=maximum
SchemaCrawler 10.5
Copyright (c) 2000-2013, Sualeh Fatehi.
SchemaCrawler is a database schema discovery and comprehension tool.
You can search for database schema objects using regular expressions,
and output the schema and data in a readable text format. You can find
potential schema design issues with lint. The output serves for
database documentation is designed to be diff-ed against other database
schemas. SchemaCrawler also generates schema diagrams.
password:
java.sql.SQLException: Could not connect to database, for user null
at schemacrawler.schemacrawler.BaseDatabaseConnectionOptions.getConnection(BaseDatabaseConnectionOptions.java:93)
at schemacrawler.schemacrawler.BaseDatabaseConnectionOptions.getConnection(BaseDatabaseConnectionOptions.java:70)
at schemacrawler.tools.commandline.SchemaCrawlerCommandLine.execute(SchemaCrawlerCommandLine.java:173)
at schemacrawler.tools.commandline.SchemaCrawlerMain.main(SchemaCrawlerMain.java:93)
at schemacrawler.tools.commandline.SchemaCrawlerMain.main(SchemaCrawlerMain.java:52)
at schemacrawler.tools.sqlite.Main.main(Main.java:43)
Caused by: java.lang.IllegalArgumentException: Insufficient parameters for database connection URL: missing [database]
at schemacrawler.schemacrawler.DatabaseConfigConnectionOptions.getConnectionUrl(DatabaseConfigConnectionOptions.java:73)
at schemacrawler.schemacrawler.BaseDatabaseConnectionOptions.getConnection(BaseDatabaseConnectionOptions.java:89)
... 5 more
If I specify -password, I get the same error, and specifying various values for -user does the same. Sqlite requires no user/password - why is the jdbc or schemacrawler asking me for one?
Addendum:
Here is a specific series of commands that creates a simple database then attempts to diagram it with schemacrawler:
bash-3.2$ sqlite3 MyApp.db
sqlite3 MyApp.db
SQLite version 3.7.12 2012-04-03 19:43:07
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table smbtest(col1 integer, col2 integer);
create table smbtest(col1 integer, col2 integer);
sqlite> ^D
bash-3.2$ ~/bin/sunjava -classpath lib/*:. schemacrawler.tools.sqlite.Main -database=MyApp.db -infolevel=maximum -command=graph -outputformat=pdf -outputfile=myapp.pdf
SchemaCrawler 10.5
Copyright (c) 2000-2013, Sualeh Fatehi.
SchemaCrawler is a database schema discovery and comprehension tool.
You can search for database schema objects using regular expressions,
and output the schema and data in a readable text format. You can find
potential schema design issues with lint. The output serves for
database documentation is designed to be diff-ed against other database
schemas. SchemaCrawler also generates schema diagrams.
password:
Graphviz was not available to create the requested graph. Please reinstall
Graphviz, and make it available on the system PATH. Meanwhile, a .dot text file
has been created instead. This .dot file can be opened in any Graphviz file
viewer.
java.io.IOException: Cannot run program "dot": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at schemacrawler.tools.integration.graph.ProcessExecutor.execute(ProcessExecutor.java:124)
at schemacrawler.tools.integration.graph.GraphGenerator.generateDiagram(GraphGenerator.java:87)
at schemacrawler.tools.integration.graph.GraphExecutable.executeOn(GraphExecutable.java:123)
at schemacrawler.tools.executable.SchemaCrawlerExecutable.executeOn(SchemaCrawlerExecutable.java:87)
at schemacrawler.tools.executable.BaseExecutable.execute(BaseExecutable.java:77)
at schemacrawler.tools.commandline.SchemaCrawlerCommandLine.execute(SchemaCrawlerCommandLine.java:176)
at schemacrawler.tools.commandline.SchemaCrawlerMain.main(SchemaCrawlerMain.java:93)
at schemacrawler.tools.commandline.SchemaCrawlerMain.main(SchemaCrawlerMain.java:52)
at schemacrawler.tools.sqlite.Main.main(Main.java:43)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 9 more
Final conclusion:
The problem lay in the fact that the path to my db had a space in it; no combination of backslashing, double or single quotes, or both resolved the issue. Running the command from the same directory as my db file did the trick. The space issue may be due to my not understanding the right escape sequences to use in bash - I may have to double-escape the spaces if schemacrawler is spawning other processes using my name as part of the command line.
However, the app did continue to ask for my password, but just pressing enter allowed it to continue successfully.
Steve,
You need to specify the database like this:
"-database=/Library/Application Support/MyApp/Data/MyApp.db"
Notice the double-quotes to allow for the space in the path to the database file, and the -database command-line switch. I also removed the back-slash, since the whole switch in enclosed in double-quotes.
For help on the command-line, simply run:
java -classpath lib/*:. schemacrawler.tools.sqlite.Main
Sualeh Fatehi, SchemaCrawler
Generating DB Schema ER Diagram using SchemaCrawler We can visualize our DB schema using SchemaCrawler Download the latest package from here:
https://github.com/sualeh/SchemaCrawler/releases/
Copy _schemacrawler folder and rename it to schemacrawler to another location and add the directory path of the same to PATH Use GraphViz to create schema diagram http://sualeh.github.io/SchemaCrawler/diagramming.html
Cd into schemacrawler directory and run ./schemacrawler.sh(on mac and ubuntu env) with option as mentioned below.
You can run sample command to get the schema diagram in the form of png image for postgre db:
./schemacrawler.sh -command graph -outputformat png -outputfile=dh_er.png -loglevel=CONFIG -server=postgresql -host=localhost -port=5432 -database=testdb -user=testuser -password=testpass -infolevel=standard
To include/exclude some tables you need to define configuration
in schemacrawler.config.properties as example:
schemacrawler.table.pattern.include=.*askbot_activityauditstatus |.*askbot_anonymousanswer|.*askbot_anonymousquestion |.*askbot_askwidget|.*askbot_badgedata|.*askbot_bulktagsubscription |.*askbot_bulktagsubscription_groups|.*askbot_bulktagsubscription_tags
schemacrawler.table.pattern.exclude is the key. value of the same is the JAVA regex pattern
Note: If you are facing "SERVICE: Cannot run program "dot": error=2, No such file or directory" issue...
Please install below(for mac only):
Install the app : brew install graphviz
I don't think you are specifying -classpath correctly. I think you need a wrapper shell script around that command to expand each .jar in lib so that it's separated with : characters:
#!/bin/sh
classpath="."
for j in lib/*.jar
do
classpath=$classpath:$j
done
java -classpath $classpath schemacrawler.tools.sqlite.Main /Library/Application\ Support/MyApp/Data/MyApp.db -command="select count(*) from myTable" -infolevel=maximum
Just a stab-in-the-dark but that's the way I've always done it. Obviously this is more complicated if non-jar classpaths have to be included as well...

Resources