Is there a way to find out details of data type erorr in Snowflake? - snowflake-cloud-data-platform

I am pretty new to Snowflake Cloud offering and was just trying to load a simple .csv file from AWS s3 staging are to a table in Snowflake using copy command.
Here is what I used as the command:
copy into "database name"."schema"."table name"
from #S3_ACCESS
file_format = (format_name = format name);
When run the above code, I get the following error: Numeric value '63' is not recognized
Please see the attached image. Not sure what this error is and i'm not able to find any lead in Snowflake UI itself to find out what could be wrong with the value.
Thanks in Advance!

The error says, it was waiting a numberic value, but it got "63", and this value can not be converted to numeric value.
From the image you share, I can see that there are some weird characters around 6 and 3. There could be an issue with file encoding or data is corrupted.
Please check encoding option for file format:
https://docs.snowflake.com/en/sql-reference/sql/create-file-format.html#format-type-options-formattypeoptions
By the way, I recommend you always use utf-8.

Related

Trying to save timeStamp recorded in jmeter results from csv to MSSQL server

I am not able to save proper timeStamp from JMeter to CSV and same CSV to MSSQL server.
I am saving results right now but they appear in a wierd manner like 1559087654 etc
I want proper format of the timeStamp at what time and date exact results were recorded.
You have to update jmeter.properties file which is present in /bin folder of jmeter location.
Please go through the below screenshot and uncomment the line selected in the screenshot. (Its uncommented in the screenshot)
You can import the CSV file to the MSSQL (as a table), then you can covert (cast) the timestamp column to datetime.
Please check this answer, it may help you
The default items to be saved can be defined in the jmeter.properties (or user.properties) file located under bin folder. Give preference to user.properties. Find the below line in jmeter properties and copy paste it in user.properties in the end of the file. Remove the hash in front. Restart jmeter.
jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS
Check default configuration for more info.
Hope this helps.

Value Being Loaded As NULL to SQL Server When It Is A Zero And Other Than Zero It Is Working Fine via Informatica PowerCenter 10.1

I have come through a scenario where the value for a field is loading 'NULL' when actual value in the file is '0' but loading the correct value if the file has a non-zero value. I have used the debugger and read the session log. Everywhere the value is showing '0', but in the table it is loading as 'NULL'. Is this a known issue? Can anyone please help me overcoming this discrepancy.
Did you try writing the output to a file and see the output ? Please give details of the transformation.
In addition, Informatica has a special property which you can set when value is 0 or when value is null.
Check that session property too.
Check if there is anything present when value is 0.
Also, what is the column datatype which you are trying to populate too? Does that column have any constraint to not to accept "0"? check that too.
I agree (as #buzyjess says), writing the output to a text file will make it easy for debugging. So, please let us know how it looks like when you output to a file.

pgadmin4 - Download Query result as CSV

I wrote a query using the query tool in pgadmin 4. Now I want to download the results as a csv. I´ve got two problems with that.
The 'Download as CSV'-button does not work sometimes. Especially when the result contains 1000+ rows.
When I finally have a csv and I want to open it, this message is all I see:
"'ascii' codec can't encode character u'\xbb' in position 26: ordinal not in range(128)"
Since I´m fairly new to all of this, could someone enlighten me to what is wrong?
On your questions:
The broken CSV download was a known bug that was fixed in pgAdmin v1.5 (Bug summary at the login-required https://redmine.postgresql.org/issues/2253; the gist is that there were multiple issues with exporting JSON data and Unicode). If you're not on that version, try updating and see whether you continue to have the issue.
You didn't specify where you're seeing that message regarding encoding, but the character referenced in the error is a "Right-Pointing Double Angle Quotation Mark" (») (http://www.codetable.net/hex/bb).

Piwik database - piwik_archive_blob value column

I am using Piwik and after inspecting the database i see a table: piwik_archive_blob__
This table has a column called value with type: mediumblob
The values appear to be jumbled characters. I assume that there is an encode/decode process.
Can anyone help me decode this column. I think there is good data here, but i need to be able to read it
Thanks
The value column stores serialized and gzcompressed DataTable objects, so there is no easy way to read it.
Just a quick example how you could uncompress and deserialize it using PHP:
Download the blob as a .bin using something a tool like phpmyadmin
Load the file into PHP, uncompress and unserialze it using the following:
<?php
$sBlobFile = file_get_contents( 'piwik_archive_blob_2017_03-value.bin' );
$sBlobFile = unserialize( gzuncompress ( $sBlobFile ) );
var_dump( $sBlobFile );
Of course you can also just retrieve the blob using MySQL and access it directly in PHP opposed to downloading it as a file first.

How do I get more info for 'invalid format' error with onpladm on Windows?

This is my first time trying to use Informix. I have around 160 tables to load, using pipe-delimited text files. We have an older series of batch files that a previous developer wrote to load Informix data, but they're not working with the new version of Informix (11.5) that I installed. I'm running it on a Windows 2003 server.
I've modified the batch file to execute the onpladm commands for one file, so this batch file looks like this:
onpladm create project dif31US-1-table-Load
onpladm create object -F diffdbagidaxsid.dev
onpladm create object -F diffdbagidaxsid.fmt
onpladm create object -F diffdbagidaxsid.map
onpladm create object -F diffdbagidaxsid.job
When I run this, it successfully creates the project and device array,
but I get an error creating the format. The only error I get is:
Create object DELIMITEDFORMAT diffile1fmt failed!
Invalid format!
The diffdbagidaxsid.fmt file is as follows:
BEGIN OBJECT DELIMITEDFORMAT diffile1fmt
PROJECT dif31US-1-table-Load
CHARACTERSET ASCII
RECORDSTART
RECORDEND
FIELDSTART
FIELDEND
FIELDSEPARATOR |
BEGIN SEQUENCE
FIELDNAME agid
FIELDTYPE Chars
END SEQUENCE
BEGIN SEQUENCE
FIELDNAME axsid
FIELDTYPE Chars
END SEQUENCE
END OBJECT
As you can see, it is only 2 columns. It originally had nothing following the CHARACTERSET. I've tried it with ASCII, and with the numeric code for ASCII, and still get the same error.
Is there any way to get a more verbose error message?
Also, can anyone recommend a decent (meaning active community) forum for Informix? I've tried the old comp.databases.informix forum, http://www.dbforums.com, the 'official' forum on IBM DeveloperWorks, and here of course. None have very much activity. We have to do this testing because we have customers (or maybe just 1 big one) who uses it, so we have to test our data and API against it.
Succinctly, I don't think there is a way to get much more information out of onpladm.

Resources