I have a python script, using the pyorient library, to feed a database.
However, I'm getting a weird error:
Cannot index record Session{begin:Thu Jun 18 10:00:00 CEST 2015,end:Thu Jun
18 18:00:00 CEST 2015,activity:#-1:-1}: found duplicated key
'OCompositeKey{keys=[#-1:-1, Thu Jun 18 10:00:00 CEST 2015]}' in index
'Session.activity_begin' previously assigned to the record #22:169 -
com.orientechnologies.orient.core.storage.ORecordDuplicatedException
The #-1:-1 seems weird to me. What I actually tried to do:
{'#Session': {'begin': '2015-06-18 10:00:00', 'end': '2015-06-18 18:00:00', 'activity': '#12:49'}} with a composite key of activity and begin. Note: #12:49 does exist. However, #22:169 does not exist (maybe this is due to the fact that I can't query the Session class properly)!
This code works fine for 100s of records, and then suddenly creates this error. I also can't query all sessions anymore. When I do SELECT FROM Session in the studio, it says: The command has not been executed. Querying other classes works fine.
Where does the #-1:-1 come from, when I supplied #12:49 (and this exists)? What does it mean?
I'm using OrientDB 2.0.
I found out. The rid was posted as a string, which caused it to not be registered by OrientDB. The activity id was always #-1:-1, until there was a duplicate (which shouldn't have happened if the activity rid was passed in correctly).
Related
I have a package that need to use for each loop.
I have a staging table that has all the months, I want to loop through every month (Jan, Feb, Mar, ..., Dec) and load the data into the real table.
So I have use execute SQL task to query all the column names of the staging table, and save it to "ListMonth" (type:Object).
Then I loop through each column name by ADO Enumerator - and here the problem appear: I can loop through column name in "SSIS", but when I deploy it to Integration service, it keeps raising the errors: "Variable User::ListMonth" does not contain a valid data object.
Does anyone know the solution to the problem?
The "ListMonth" variable already has type Object, I do not know why the problem still occurs.
I have already tried to make a script task to initialize an array of Month and loop through that by setting For each loop variable enumerator, but it raise the error that the "ListMonth" is null and it does not contain enumerator object
Please note that when running them in VS 2019 I do not have problem. The problem only occurs when I deploy the package to the SSMS Integration Service.
I am having an issue with a date literal not returning any results when I run an SOQL query. The query is as follows:
Select * From dbo.Case WHERE CreatedDate = YESTERDAY
With the query, I would like to obtain case data from the previous day. I know there is data available that was created the previous day. The results of the query when I preview it, though, are an empty set with no error message.
A different wrinkle that makes this not quite a strict SOQL issue is that I am trying to use this query as an SQL command on an ADO.NET connection using the CData ADO.NET driver to connect to a SalesForce.com instance. My goal is to be able to build SSDT packages that will allow me to stage the data from SalesForce into our SQL Server for processing there.
I have similar issues using the LAST_N_DAYS date literal as well.
I believe I should be using SOQL to query in the SQL command text field for the ADO.NET source connection but I am not 100% sure about that. I know for certain that I cannot use T-SQL because it does not recognize the GETDATE().
Any guidance on how to pull the records from Case for the previous day or where the query I am using might be wrong would be greatly appreciated.
Found an answer. The following SQL command will pull the data from the previous day:
Select * From dbo.Case Where CreatedDate = 'YESTERDAY'
The single quotes evaluate the yesterday date literal as expected.
Likewise, the following SQL statement will get the last 30 days of data.
Select * From dbo.Case Where CreatedDate = 'LAST_N_DAYS:30'
Thanks to anyone who researched and attempted the question! :)
After over one day of finding & trying to solve issue its time to ask here.
We use Firebird over years (around 6) and with current version 2.5.2 updated long time ago we met the problem with unable to UPDATE statement.
SQL statement is OK, even "where" condition is used with primary key.
Problem: update is going to stuck after click on: execute
a) from php script it return Internal server error 500
b) directly from Flamerobin or IBQ its freezes and not responding at all
hint: SQL which wasnt working is working right after clean firebird (stop & start) but after a while its going to stuck again
hint: selects are or, problem is only with UPDATE
hint: I did all described here https://www.ibphoenix.com/resources/documents/how_to/doc_5
(redump of database file which was giving me errors on gfix -v -full)
after redump there was no error but problem occurs
hint: We have more servers running the same configuration with more database files but this happen only for one table in one DB file on one server.
After some investigation I finally got this from fbtrace:
2016-11-28T14:25:28.4410 (9473:0x7f1489cb1f08) PREPARE_STATEMENT
phones.fdb (ATT_273856, VILAS:NONE, UTF8, TCPv4:10.1.1.195)
/usr/bin/flamerobin:10868
(TRA_78838, CONCURRENCY | WAIT | READ_WRITE)
Statement 422749:
-------------------------------------------------------------------------------
UPDATE TELEFONI_CISLA SET DATUM_PRIDANI = '2011-7-3' WHERE ID = '17274'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (TELEFONI_CISLA INDEX (RDB$PRIMARY4))
0 ms
2016-11-28T14:25:28.4780 (9473:0x7f1489cb1f08) EXECUTE_STATEMENT_START
phones.fdb (ATT_273856, VILAS:NONE, UTF8, TCPv4:10.1.1.195)
/usr/bin/flamerobin:10868
(TRA_78838, CONCURRENCY | WAIT | READ_WRITE)
Statement 422749:
-------------------------------------------------------------------------------
UPDATE TELEFONI_CISLA SET DATUM_PRIDANI = '2011-7-3' WHERE ID = '17274'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (TELEFONI_CISLA INDEX (RDB$PRIMARY4))
Im out of ideas what to check, almost lost. Just want let you know that we didnt change anything in FB or server configuration.
Thanks for any usefull help.
Everything was caused by one of many script running in background (from cron) taking open transaction without committing for few hours.
Its OK back again.
I am trying to test out BigQuery but am getting stuck on creating a table from data stored in google cloud storage. I am able to reduce the data down to just one value, but it is not making sense.
I have a text file I uploaded to google cloud storage with just one integer value in it, 177790884
I am trying to create a table via the BigQuery web UI, and go through the wizard. When I get to the schema definition section, I enter...
ID:INTEGER
The load always fails with...
Errors:
File: 0 / Line:1 / Field:1: Invalid argument: 177790884 (error code: invalid)
Too many errors encountered. Limit is: 0. (error code: invalid)
Job ID trusty-hangar-120519:job_LREZ5lA8QNdGoG2usU4Q1jeMvvU
Start Time Jan 30, 2016, 12:43:31 AM
End Time Jan 30, 2016, 12:43:34 AM
Destination Table trusty-hangar-120519:.onevalue
Source Format CSV
Allow Jagged Rows true
Ignore Unknown Values true
Source URI gs:///onevalue.txt
Schema
ID: INTEGER
If I load with a schema of ID:STRING it works fine. The number 177790884 is not larger than a 64 bit signed int, I am really unsure what is going on.
Thanks,
Craig
Your input file likely contains a UTF-8 byte order mark (3 "invisible" bytes at the beginning of the file that indicate the encoding) that can cause BigQuery's CSV parser to fail.
https://en.wikipedia.org/wiki/Byte_order_mark
I'd suggest Googling for a platform-specific method for view and remove the byte order mark. (A hex editor would do.)
The issue is definitely with file's encoding. I was able to reproduce error.
And then "fixed" it by saving "problematic" file as ANSI (just for test) and now it was loaded successfully.
I'm getting the following error in my PostgresSQL logs whenever my context is initialized:
2014-06-03 09:51:25 PDT ERROR: column c.CreatedOn does not exist at character 10
2014-06-03 09:51:25 PDT STATEMENT: SELECT
c."CreatedOn"
FROM "__MigrationHistory" AS c
LIMIT 1
Everything seems to work okay for the most part, but I'd like to better understand the error and make it go away if possible.
Is this an error with the dotConnect provider or am I expected to add this custom column to my __MigrationHistory table?
The "column c.CreatedOn does not exist" exception is expected for this scenario. This is the internal logic of Entity Framework.
The CreatedOn column is used only in EF 4.3 and below. However, the internal check for the table "__MigrationHistory" and, accordingly, for the "CreatedOn" column still exists and, consequently, in the later EF versions this gives an error. However, the implementation of this request does not stop the application and does not affect the result.