05-27-2024 12:07 AM - edited 05-27-2024 01:28 AM
Hi SMEs,
Good day, hope all is well.
Currently having some issue when running the bcp client in linux snaplex I was wondering on how can I pass the -u argument in the bcp client or any workaround or configuration that needs to be done in the snaplex?
In the account I was able to put this option as
Thanks,
EmEm
05-31-2024 03:39 AM
Please use bcp version 17 or lower for now. We don't yet support version 18 or higher. HTH
06-04-2024 02:40 AM - edited 06-04-2024 02:42 AM
This has been resolve using a shell script. Thanks
1. The SQL Server - Bulk Load documentation has the required instructions on your requirement for Windows environment1. The SQL Server - Bulk Load documentation has the required instructions on your requirement for Windows environment
2. For a Linux node, you can try a similar approach to pass additional options to the BCP utility used by the SQL Server - Bulk Load Snap
3. Create a shell script file (e.g., bcp.sh) that includes the bcp command and the desired options.
For example:
#!/bin/bash
bcp "$@" -u
4. This shell script will execute the bcp command with the provided arguments ("$@") and additionally pass the -u option.
5. Make the shell script executable by running the following command: chmod +x bcp.sh
6. In the Snap Settings, locate the BCP absolute path property and provide the absolute path to the bcp.sh script you created in the previous steps
7. By specifying the absolute path to the shell script, Snap will execute the script instead of directly executing the bcp utility. This allows you to include any additional options or arguments you need in the script
8. It is important to make sure the shell script is accessible from the Snaplex nodes where the Snap will be executed. You may need to copy the script to the appropriate locations or use a shared network path
9. Using this approach, you can effectively pass the -u option or any other desired options to the bcp utility through the shell script specified in the BCP absolute path property on a Linux node