-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Foreign keys on plan files are not working #1
Comments
Hi @pabloromanelli! Thanks for raising the issue. I appreciate the logs and explanation. |
Found what the issue was. It failed to parse due to handling scenarios where there are Should be fixed now as part of release Let me know if this fix works for you then can close off the issue. |
Hi Peter! It is still failing with the latest version of https://github.com/data-catering/data-caterer-example (https://github.com/data-catering/data-caterer-example/tree/fe014bd1999e9e77233765c5903ba75de5c79b27) I updated the Dockefile to use 0.6.1 (https://github.com/data-catering/data-caterer-example/blob/main/Dockerfile):
And changed the env variable on
After starting docker compose it fails with the same error
Thanks! |
Thanks again @pabloromanelli for the details. I see. So you are using the following postgres-multiple-tables.yaml plan to run.
I had to add some missing fields from the
On another note, you can run a separate plan without altering the
I have made a note of this in the README to make it clearer. Please let me know if it is still a problem for you. Thanks for your patience 👍 |
Now I can get it to start but it fails with foreign key constraints on the database: I removed old docker images
and added to
Started docker compose using
Logs:
(I'm still using the parent image |
Ah great! So the error you are getting now relates to the generated data not being unique (in this case This can be resolved via enabling the uniqueness flag in
I will update the examples I have thought about having the flag enabled by default but there is a performance penalty when it is enabled. I will introduce some logic to check if any fields have been set to |
I have released version |
Thank you for taking the time Peter! but I'm sorry to say that it is still failing with the latest changes. Clean up:
Build jar
Docker Compose up
Logs
|
That's okay, thanks for sharing 👍. I believe this has to do with existing data within your Postgres Maybe in later versions, I will include this feature but it can be difficult to achieve (i.e. expensive operation to read all data from the data source and then to generate unique values). I have this working for autoincrement fields given you can increment from the current maximum value, but have not found an easy way to generalise for all types of data. |
For reference, I have created the following issue to ensure that by default, globally unique values are generated. This will help resolve the problem you ran into since you would expect it to work without any further intervention. |
Hi, I love the project!
I'm trying to use it mainly with plan and tasks files, but when I configure
sinkOptions.foreignKeys
on the plan yaml file it fails withArrayIndexOutOfBoundsException
.To replicate the issue I'm using https://github.com/data-catering/data-caterer-example
Logs:
Setting the foreign keys on a plan class is not failing (
.addForeignKeyRelationship()
)Thank you
The text was updated successfully, but these errors were encountered: