Running DataHub CLI delete command with nohup for hard deletion

Original Slack Thread

<@U06TM7M40RK> how do I hard delete a platform in datahub?

To hard delete a platform in DataHub, you can use the DataHub CLI with the --hard flag. This will permanently delete all metadata associated with the specified platform. Here is a step-by-step guide:

  1. Use the datahub delete Command: You need to specify the platform you want to delete using the --platform option and include the --hard flag to ensure a hard delete.

  2. Perform the Delete: The command will delete all entities associated with the specified platform.

Here is an example command to hard delete a platform:

datahub delete --platform <platform_name> --hard

Important Considerations:

  • Dry Run: It is recommended to use the --dry-run flag first to see what entities will be deleted before actually performing the delete operation.
  • Force: The --force flag can be used to skip confirmation prompts.

Example with Dry Run and Force:

datahub delete --platform <platform_name> --hard --dry-run --force

This command will show what entities will be deleted without actually performing the deletion and will skip any confirmation prompts.

Would you like more detailed information on how to perform this operation safely, or do you have any specific concerns about the deletion process?

Sources:

<@U06TM7M40RK> can I run it nohup?

Yes, you can run the DataHub CLI delete command using nohup to ensure that the process continues to run even if you disconnect from the terminal session. This is particularly useful for long-running operations like hard deletes. Here’s how you can do it:

  1. Use nohup Command: Prepend nohup to your DataHub CLI command to run it in the background.

  2. Redirect Output: Redirect the output to a file to capture logs and any potential errors.

Here is an example command:

nohup datahub delete --platform <platform_name> --hard --force > delete_output.log 2>&1 &
  • nohup: This command allows the process to continue running in the background even after you log out.
  • > delete_output.log 2>&1: Redirects both standard output and standard error to a file named delete_output.log.
  • &: Runs the command in the background.

Would you like more detailed information on how to perform this operation safely, or do you have any specific concerns about the deletion process?

Sources: