Snowflake put command throws HTTPError('400 Client Error: Bad Request for url - ) - amazon-s3

I am receiving below error while using put command and uploading file on snowflake.
It is Error 400
It works for other files but fails for only one file with below error.
Error link - https://sfc-uk-ds1-customer-stage.s3.amazonaws.com/drko-s-ukss0127/tables/2323577421858/FACT_RFM_SEGMENTATION.csv?partNumber=83&uploadId=PosKnuUecwKdJdFOQopotAdcwdk2IJ2wtgwsrvbDD_mSas7L.vD.7Bz8bXX1M_QAZKyVWiaxdf5I6ime9FWSwQHI0BpV17WGVRgfpMSd5_hhm92jNGI3a2JrRiTvsblz
Snowflake Put command -
user_details#XSMALL_WHSE#DEV_DB.FACT>put file://D:\snowflake\lab_db_csv_files\file_name.csv #"FACT".%"table_name" auto_compress=False;
I tried with both Auto_compress False and True. but it is not working in any case.

I remember one of the versions had an issue with the PUT command.
Check your current version by running:
snowsql --version
Then try to use different versions:
snowsql --version 1.2.18
Above command will launch SnowSQL using version 1.2.18, then test again.

Related

problem trying to initiate a console with WSL 2 in CMDER

I have this error just trying to use WSL from cmder
wslbridge error: failed to start backend process
note: backend error output: -v: -c: line 0: unexpected EOF while looking for matchi ng `''
-v: -c: line 1: syntax error: unexpected end of file
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...
does anyone how to solve it?
Create a new profile with the command wsl.exe.
Taken from https://github.com/Maximus5/ConEmu/issues/1930#issuecomment-512882561; it works for me.
For anybody having problems with this, I finally figured it out by setting a new task command of:
wsl.exe ~ -d Ubuntu-20.04
In my case, I had two versions of WSL installed and it wouldn't take the newer in Cmder for anything—it always loaded the ~ directory of my older install. You can use the file browser and go to directory \\wsl$ to see which version of WSL you are using.
I found this solution:
It is a ConEmu thing. The whole WSL part is for WSL version 1, I guess you are running WSL version 2?
You need a new version of cygwin1.dll
Grab one here: https://cygwin.com/snapshots/
Go to vendor\conemu-maximus5\ConEmu\wsl and replace the dll.
You need wslbridge 2:
Grab it here: https://github.com/Biswa96/wslbridge2/releases (the cygwin version)
Copy the content to the same directory: vendor\conemu-maximus5\ConEmu\wsl
Now edit your WSL bash task:
Replace the part "conemu-cyg-64.exe --wsl" with "conemu-cyg-64.exe %ConEmuBaseDirShort%\wsl\wslbridge2.exe"
It works now.

Laravel 6: Cannot run any artisan command on the server

[UPDATE]
edited artisan file like this
ini_set('display_errors',1);
error_reporting(-1);
and I got this error
Parse error: syntax error, unexpected '?' in /home/u635130117/domains/example.com/public_html/laravel/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 500
Here's the code
if (isset($arguments[1]) && is_string($arguments[1])) {
return $factory->of($arguments[0], $arguments[1])->times($arguments[2] ?? null); //line 500
} elseif (isset($arguments[1])) {
return $factory->of($arguments[0])->times($arguments[1]);
}
I have connected to the shared hosting using SSH but can't run any artisan command like clearing cache or listing artisan commands I get nothing at all no output. I tested creating a new command and it's not created too.
The parse error occurs if the php version is to low. So we discovered there are more than one versions of php installed on the server after the execution of php -v returned php version 5.6.40.
Finally in the phpinfo were the path of the php 7 version which is also being used by the webserver. This was /opt/alt/php72/usr/bin/php.
Commands can now executed by using /opt/alt/php72/usr/bin/php like /opt/alt/php72/usr/bin/php artisan key:generate.
You can also create an alias like php7 or just php for this. It's described here.

Hive script not running in crontab with hadoop must be in the path error

After setting Hadoop Home path and Prefix path in .bashrc and /etc/profile also im getting the same error - Cannot find hadoop installation: $HADOOP_HOME or $HADOOP_PREFIX must be set or hadoop must be in the path
If i run the script from crontab im facing this error from hive> prompt its working fine
plz help with the regarding how to solve this
Set $HADOOP_HOME in $HIVE_HOME/conf/hive-env.sh
try loading user bash profile in the script, as below,
. ~/.bash_profile
bash is included in user bash_profile and it will have user specific configurations as well.
see the similar question Hbase commands not working in script executed via crontab

ORA-12545: Connect failed because target host or object does not exist while connecting through the shell

I am trying to run the sql scripts from shell. My scripts are working fine. It is getting connected to database and applying the sql files. Only thing I am not able to understand is why the below error message is getting logged every time.
Error Message :
ERROR:
ORA-12545: Connect failed because target host or object does not exist
Shell Script:
/opt/ORACLE/app/oracle/product/11.2.0/client_1/bin/sqlplus -s <<eoj >>$LOG_FIL 2>&1
${DBUSER1}/${DBPASS}#${hostBillingDBSID}
#${SQLParm} $RPT_FIL
eoj
try the below.
Shell Script:
#let's include oracle installation in the PATH variable
export PATH=$PATH:/opt/ORACLE/app/oracle/product/11.2.0/client_1/bin
#now just use sqlplus, instead of full path reference.
sqlplus -s ${DBUSER1}/${DBPASS}#${hostBillingDBSID} <<eoj >>$LOG_FIL 2>&1
#${SQLParm} $RPT_FIL
eoj
The user/password(connection string) has to be passed as command line arguments to sqlplus.

I am getting error ssh exit staus 1

In jenkins post build action I configured Execute shell script on remote host using ssh
ssh site 10.32.25.66, command:
cd $HOME/appsadm/bin; ./ims-carte-stop
and i again modified
cd /HOME/appsadm/bin; ./ims-carte-stop.*
I tried both these commands and Build is successful, but I see in console output in Jenkins after, that it is not executing my script. I am getting ssh exit status 1 error.
In my winscp my script (ims-carte-stop) in this location home/appsadm/bin.
Please tell me if I am doing aything wrong.
My intention is to stop my server from jenkins automatically whenever the build success.
This may be a typo in your question, but:
You said your ims-carte-stop script is in:
/home/appsadm/bin
whereas your script is doing:
cd $HOME/appsadm/bin
or
cd /HOME/appsadm/bin
Looking at the paths, I am going to assume you are using a UNIX-flavoured OS (Linux, BSD, OSX).
UNIX paths are case sensitive. Your script should be calling:
cd /home/appsadm/bin
Note that the word "home" is all small letter not capitals. Also, using $ makes it a variable, which I don't think you want.