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

At end of job with load_method as REPLACE and target table is non partitioned, the target table schema gets updated as select query #25

Open
BitWielderSumit opened this issue Jan 30, 2024 · 1 comment

Comments

@BitWielderSumit
Copy link

The job instance with load method as REPLACE and the target table is non partitioned, while executing this specific instance of job, we are experiencing that the target table schema is getting updated as schema from the select query.

This behaviour is causing problem with data governance flow, as now the schema in BQ table does not match with schema from the resource.yaml file in ocean (git repository to host the table definations) repo.

@BitWielderSumit
Copy link
Author

The Approach to fix this issue is as below

Only in case of load_method as REPLACE and table is non partitioned

  1. execute the query to truncate this table
  2. execute the job same as previous flow but update the write_disposition property as WRITE_APPEND

At end of this execution we will achive the replace behaviour without re-creating the target table.

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

Successfully merging a pull request may close this issue.

1 participant