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

WrongType & KeyNotFound Errors #4

Open
ZonerDan opened this issue Feb 20, 2018 · 9 comments
Open

WrongType & KeyNotFound Errors #4

ZonerDan opened this issue Feb 20, 2018 · 9 comments

Comments

@ZonerDan
Copy link

I have modified my configuration file in multiple ways and I continue to get one of the following errors regardless of the changes I make:

When using JSON format:

[main] ERROR com.powerspace.pg2bq.Main$ - Incorrect configuration: KeyNotFound(jdbc,None,Set("jdbc")), KeyNotFound(gcloud,None,Set("gcloud"))

When using HOCON format that matches the example on your README:

[main] ERROR com.powerspace.pg2bq.Main$ - Incorrect configuration: WrongType(STRING,Set(OBJECT),None,jdbc), WrongType(STRING,Set(OBJECT),None,gcloud)

@sderosiaux
Copy link
Contributor

Hi @ZonerDan,

Can you paste the content of your configuration file?
It seems you're passing a string to jdbc instead of an object jdbc { ... }, same for gcloud. Or some odd character is present?

@ZonerDan
Copy link
Author

JSON Version:

{
"jdbc": {
"url": "<my_jdbc_connection_string>",
"user": "<my_user>",
"password": "",
"tables": ["people"]
},
"gcloud": {
"project": "<my_project_id>",
"service-account-key-path": "<path_to_my_json_file>",
"bq.dataset": "<my_dataset>",
"gcs.tmp-bucket": "pg-export"
}
}

HOCON Version:

jdbc {
url = "<my_jdbc_connection_string>"
user = "<my_user>"
password = ""
tables = ["people"]
}

gcloud {
project = "<my_project_id>"
service-account-key-path = "<path_to_my_json_file>"
bq.dataset = "<my_dataset>"
gcs.tmp-bucket = "pg-export"
}

@ZonerDan
Copy link
Author

Other things I have tried:

  • changing gcs.tmp-bucket to gcs.tmpBucket
  • changing value of password from """" to nothing
  • changing value of password from """" to null

@ZonerDan
Copy link
Author

ZonerDan commented Feb 20, 2018 via email

@sderosiaux
Copy link
Contributor

I just copy/pasted your HOCON (with all the placeholders ), the program starts:

/bin/pg2bq -Dconfig.file=/Users/sderosiaux/pg2bq.conf
2018-02-20 16:34:04,336  [main] ...

@ZonerDan
Copy link
Author

:( I'm at a loss. I just tried with all the placeholders as well and still receive the WrongType error.

@ZonerDan
Copy link
Author

ZonerDan commented Feb 20, 2018

Ok. I think its because in my original testing I received an error stating that I should change the file extension to .properties instead of .conf. Now I've changed it back and the program is starting.

@sderosiaux
Copy link
Contributor

Yeah, I think when the file ends by .properties, the config expects to find the Java properties format.
Happy you got it fixed!

@ZonerDan
Copy link
Author

ZonerDan commented Feb 20, 2018 via email

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