Timestamp '(seconds_since_epoch=1646303659642026800)' is not recognized in snowflake - snowflake-cloud-data-platform

I am trying to run a sql query in snowflake to load a csv file. Upon running, it's giving me the following error message:
Timestamp '(seconds_since_epoch=1646303659642026800)' is not recognized

Related

Max tries exceeded error while loading data to snowflake via snowsql

I am trying to load a csv file from my windows system to snowflake internal stage using snowsql.
Command : PUT file://C:\Test_Data\Orders_1.csv #CSVSTAGE1;
Error : -00001 (n/a): GET with url b'<url>' failed for exceeding maximum retries.
What am I doing wrong?

Error 15404 showing when trying to run dtsx file SSIS?

Can anyone help, I have a SQL table built in my database that feeds from an excel file that will be regularly updated. I got it working fine, but I need the data in SSMS to be updated upon refresh (ie: fetch the latest from the excel file).
I have created a dtsx file which I believe is what I need in order to update, but when I go to execute on SSMS I get this error message:
The job failed. Unable to determine if the owner (DESKTOP-DACFOFI\chris) of job UpdateCSKASubs has server access (reason: Could not obtain information about Windows NT group/user 'DESKTOP-DACFOFI\chris', error code 0x534. [SQLSTATE 42000] (Error 15404)).
I saw on other forums that the solution was to change Owner to "sa", but that gave me this error message:
Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility Version 15.0.2000.5 for 64-bit Copyright (C) 2019 Microsoft. All rights reserved. Started: 16:03:36 Error: 2021-04-03 16:03:36.61 Code: 0xC0011007 Source: {122CA6EC-6AEA-452B-95FC-516979E12E61} Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted. End Error Error: 2021-04-03 16:03:36.62 Code: 0xC0011002 Source: {122CA6EC-6AEA-452B-95FC-516979E12E61}
Description: Failed to open package file "C:\Users\chris\Google Drive\CSKA\ImportFromExcel.dtsx" due to error 0x80070005 "Access is denied.". This occurs when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of specifying an incorrect file name when calling LoadPackage or the specified XML file has an incorrect format. End Error Could not load package "C:\Users\chris\Google Drive\CSKA\ImportFromExcel.dtsx" because of error 0xC0011002. Description: Failed to open package file "C:\Users\chris\Google Drive\CSKA\ImportFromExcel.dtsx" due to error 0x80070005 "Access is denied.". This occurs when loading a package and the file cannot be opened or loaded correctly into the XML document.
This can be the result of specifying an incorrect file name when
calling LoadPackage or the specified XML file has an incorrect format.
Source: {122CA6EC-6AEA-452B-95FC-516979E12E61} Started: 16:03:36
Finished: 16:03:36 Elapsed: 0.016 seconds. The package could not be
found. The step failed.
When you run it as sa, the error message indicates that the SQL Agent process cannot access a package in your user space.
To resolve that, deploy the package to somewhere the sql agent can access. The DTS Package Store is likely as good as any. Your error message indicates "SQL Server Execute Package Utility Version 15" so v15 is also SQL Server 2019 so copy the file to
C:\Program Files\Microsoft SQL Server\150\DTS\Packages
Unless you need to run it in 32 bit mode, then copy to (I think - it's been a long while since I've dealt with file system deploys)
C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Packages
Depending on whether the Excel file is a local or network resource, you might then run into an issue with connecting to the UNC/mount path but that'll be an artifact of how you have SQL Server/Agent and the job (credentialed user?) set up.

Transfer SQL Server Objects Task Error: Execution failed with the following error: "Invalid column name"

I am using Transfer SQL Server Objects Task in SSIS to create a package for copying procedures from prod to dev.
[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Invalid column name XYZ"
Any help on the above error will be appreciated.
Raghu
SQL Server Objects Task properties Screenshots
The error is thrown because you are trying to copy a stored procedure that is using the column XYZ from a Table, and this table is not copied or not found in the destination database.
Also From the screenshots, you are not copying Tables from the Source Database. ('CopyAllTables` property is False) , So make sure you choose all related tables to the stored procedure to be copied to the destination database

SQL Server SSIS : ADO.net date issue

I have created an SSIS package that pulls the data from Oracle 10g server and pushes them in SQL Server 2008. I have date datatype field in Oracle named admission_date.
Below is my query in Oracle.
select pt_id,admission_date
from stays
It works fine.
When I tried to pull the data in SQL Server through ADO.net via an SSIS package. I get the below error messages.
Error: 0xC02090F5 at STAYS, ADO NET Source [1050]: The component "ADO
NET Source" (1050) was unable to process the data. ORA-01843: not a
valid month
Error: 0xC0047038 at STAYS, SSIS.Pipeline: SSIS Error Code
DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "ADO NET
Source" (1050) returned error code 0xC02090F5. The component returned
a failure code when the pipeline engine called PrimeOutput(). The
meaning of the failure code is defined by the component, but the error
is fatal and the pipeline stopped executing. There may be error
messages posted before this with more information about the failure.
Any input on this would helpful.
Use something like this TO_CHAR(addmission_date,'yyyy-mm-dd HH24:MI:SS') to format your oracle date into a format that SQL likes.
Also be aware that Oracle has a much larger valid date range than SQL so depending upon your Oracle data you may have valid oracle dates that don't come across as valid SQL dates.
See Dealing With Timestamp/Datetime when copying from Oracle to Sql Server using SSIS
And Oracle to SQL2005 DATETIME field overflows in SSIS
Well, the issue was the Oracle table was a view and not a table , the admission_date was extracted from the decode command for SQL. I pulled as it is and it is resolved my issue.

Oracle SQL Developer Mac OS cannot bulk insert into SQL server database

I'm trying to import a set of flat files into an SQL server database. I downloaded and installed Oracle SQL Developer for Mac OS. I installed the proper plugin and can connect to the database fine, create tables and perform queries. The problem is I'm trying to use bulk insert to import some tab delimited files into the database. Thing is though, the bulk insert doesn't seem to work. The bulk insert code is as follows
BULK INSERT sessions
FROM '/.../sessions.txt'
WITH (FIELDTERMINATOR='\t',ROWTERMINATOR='\n')
That's the error log I get
Error starting at line 1 in command:
BULK INSERT sessions
Error at Command Line:1 Column:0
Error report:
SQL Error: Incorrect syntax near 'sessions'.
Error starting at line 2 in command:
FROM '/..../sessions.txt'
Error at Command Line:2 Column:0
Error report:
SQL Error: Incorrect syntax near the keyword 'FROM'.
Error starting at line 3 in command:
WITH (FIELDTERMINATOR='\t',ROWTERMINATOR='\n')
Error at Command Line:3 Column:0
Error report:
SQL Error: Incorrect syntax near '('.
BULK INSERT is a statement executed on the SQL Server. The file names involved are interperted in the context of the NT deployed SQL Server instance. '/.../sessions.txt' is not a valid NT filename, NT uses \ for directories delimiter in full path file names.
Try 0x0a as row terminator:
BULK INSERT sessions
FROM '/.../sessions.txt'
WITH (FIELDTERMINATOR='\t', ROWTERMINATOR='0x0a')

Resources