neo4j-contrib / neo4j-etl

Data import from relational databases to Neo4j.
https://neo4j.com/developer/neo4j-etl/
Other
214 stars 46 forks source link

Special characters in password fields are not escaped by mapping tool #71

Closed RichardMacaskill closed 4 years ago

RichardMacaskill commented 4 years ago

Using the ETL mapping tool, under Neo4j Desktop v4.0.4, when I click Start Mapping I get a 'Mapping Error' warning. Looking in the logs, I see the following has been invoked: java -cp "/Users/cas/Library/Application Support/Neo4j Desktop/Application/graphApps/_global/neo4j-etl-ui/dist/neo4j-etl.jar:/Users/cas/Library/Application Support/JetBrains/IntelliJIdea2020.1/jdbc-drivers/SQL Server/7.4.1/mssql-jdbc-7.4.1.jre8.jar" org.neo4j.etl.NeoIntegrationCli generate-metadata-mapping --rdbms:url "jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks" --rdbms:password "NOTMYREALPASSWORD!" --rdbms:user "sa" --schema "SalesLT" --output-mapping-file "/var/folders/pd/1by7j2s53x5cmk0_f4lbphk80000gn/T/mssql_AdventureWorks_SalesLT_mapping.json” If I try to execute this in the command line, the command is not terminated due to the ! in the --rdbms:password parameter.

Escaping the character allows execution to continue, as per java -cp "/Users/cas/Library/Application Support/Neo4j Desktop/Application/graphApps/_global/neo4j-etl-ui/dist/neo4j-etl.jar:/Users/cas/Library/Application Support/JetBrains/IntelliJIdea2020.1/jdbc-drivers/SQL Server/7.4.1/mssql-jdbc-7.4.1.jre8.jar" org.neo4j.etl.NeoIntegrationCli generate-metadata-mapping --rdbms:url "jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks" --rdbms:password "NOTMYREALPASSWORD\!" --rdbms:user "sa" --schema "SalesLT" --output-mapping-file "/var/folders/pd/1by7j2s53x5cmk0_f4lbphk80000gn/T/mssql_AdventureWorks_SalesLT_mapping.json”

conker84 commented 4 years ago

Hi @RichardMacaskill I was able to complete the flow following the image of my env:

Schermata 2020-07-02 alle 14 56 13

As you can see the password was a little bit complex.

conker84 commented 4 years ago

I'm closing this as it seems not a real bug. Feel free to reopen in case the problem will come back again