Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different behavior than described #36

Closed
annajode opened this issue Jul 11, 2018 · 2 comments
Closed

Different behavior than described #36

annajode opened this issue Jul 11, 2018 · 2 comments

Comments

@annajode
Copy link

Anonimatron version: 1.10.0
Operating system and version: Windows 7
Java runtime (java -version): 1.8.0_05-b13
I try to replicate the behavior as described in the blog: https://github.com/realrolfje/anonimatron

Executed commands or actions:

D:\anonimatron-1.10.0>anonimatron.bat -config config.xml -synonyms synonyms.xml
Reading Synonyms from D:\anonimatron-1.10.0\synonyms.xml ...[done].
Configuration does not contain or elements. Nothing done.
Writing Synonyms to D:\anonimatron-1.10.0\synonyms.xml ...[done].

Using the example from the blog with the following config.xml since I use the schema 'mydb' in a PostgreSQL

<?xml version="1.0" encoding="UTF-8"?>
<configuration jdbcurl="jdbc:postgresql://localhost:5432/postgres"
        userid="postgres" password="">
<schema name="mydb">
  <table name="userdata">
    <column name="id" type="PRIMARY_KEY" />
    <column name="firstname" type="ROMAN_NAME" />
    <column name="lastname" type="ELVEN_NAME" />
    <column name="creditcardnr" type="RANDOMDIGITS"/>
  </table>
 
  <table name="lastnames">
    <column name="id" type="PRIMARY_KEY" />
    <column name="lastname" type="ELVEN_NAME" />
  </table>
</schema>
</configurationan>

Expected outcome or behavior:
A synonyms.xml file with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<synonyms>
  <string type="ELVEN_NAME" from="QnVybnM=" to="RGhvZWxsaWFu"/>
  <string type="ELVEN_NAME" from="RmxhbmRlcnM=" to="QWhlbGhhbGRldGhlc3M="/>
  <string type="ELVEN_NAME" from="U2ltcHNvbg==" to="QWhkdWxlbGhhbGVs"/>
  <string type="ROMAN_NAME" from="SG9tZXI=" to="QmVudWxhdWJlbGl1cw=="/>
  <string type="ROMAN_NAME" from="TmVk" to="RWN1cw=="/>
  <string type="ROMAN_NAME" from="TWFyZ2U=" to="QWxudWxhdWN1cw=="/>
  <string type="ROMAN_NAME" from="Q2hhcmxlcw==" to="QWxudXM="/>
  <string type="RANDOMDIGITS" from="NTY3OA==" to="ODY5OA=="/>
  <string type="RANDOMDIGITS" from="MTIzNA==" to="NDM0Mw=="/>
  <string type="RANDOMDIGITS" from="MzQ1Ng==" to="NjEyNQ=="/>
</synonyms>

Actual outcome or behavior:
The synonyms file is empty.

<?xml version="1.0" encoding="UTF-8"?>
<synonyms/

This is a different behavior than described in the blog.
Where is my error?

@annajode
Copy link
Author

Solved!
I have found the error by myself.
I have to use a db user that has access to the schema only, so 'anonimatron' find the tables and replace the attributes.

@realrolfje
Copy link
Owner

Glad to see you fixed it, thanks for sharing this, it might help others. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants