Configuration Import error For Training ( Gatehead) - configuration

Error log below
"An element with the name: alert-message already exists with a different ID: 481c75f5-5372-4578-91f8-ba75522f1bb9. All element names must be unique."
Where can I find the existing "alert-message"?
I will like to remove it and re-run Import Configuration
I tried searching for existing object in the table.

Related

ID as int in neo4j bulk import produces error in relationships import

I use the admin-import tool of Neo4j to import bulk data in csv format. I use Integer as ID datatype in the header [journal:ID:int(Journal-ID)] and the part of importing the nodes works fine. When the import-tool comes to the relationships, I get the error that the referring node is missing.
Seems like the relations-import it is searching the ID in String format.
I already tried to change the type of the ID in the relations File as well, but get an other error. I found no way to specify the ID as int in the relations-File.
Here is an minimal example. Lets say we have two node types with the headers:
journal:ID:int(Journal-ID)
and
documentID:ID(Document-ID),title
and the example files journal.csv:
"123"
"987"
and document.csv:
"PMID:1", "Title"
"PMID:2", "Other Title"
We also have a relation "hasDocument" with the header:
:START_ID(Journal-ID),:END_ID(Document-ID)
and the example file relation.csv:
"123", "PMID:1"
When running the import I get the the error:
Error in input data
Caused by:123 (Journal-ID)-[hasDocument]->PMID:1 (Document-ID) referring to missing node 123
I tried to specify the relation header as
:START_ID:int(Journal-ID),:END_ID(Document-ID)
but this also produces an error.
The command to start the import is:
neo4j-admin import --nodes:Document="document-header.csv,documentNodes.csv" --nodes:Journal="journal-header.csv,journalNodes.csv" --relationships:hasDocument="hasDocument-header.csv,relationsHasDocument.csv"
Is there a way to specify the ID in the relation file as Integer or is there an other solution to that problem?
It doesn't seem to be supported. The documentation doesn't mention it and the code doesn't have such test case.
You could import the data with String ids and cast it after you start the database.
MATCH (j:Journal)
SET j.id = toInteger(j.id)
If your dataset is large you can use apoc with iterate:
call apoc.periodic.iterate("
MATCH (j:Journal) RETURN j
","
SET j.id = toInteger(j.id)
",{batchSize:10000})

Getting schema with key or id already exists error while using Angular6-json-schema-form library

I am using Angular6-json-schema-form library and included
import { Bootstrap4FrameworkModule } from 'angular6-json-schema-form'
in the app.module.ts file. Also i created a JSON schema object in the component file and used the below in the app.component.html file
<json-schema-form loadExternalAssets="true" [schema]="yourschema" framework="bootstrap-4"></json-schema-form>
But when i do npm start and do a localhost i am getting an error in the console
ERROR Error: schema with key or id "http://json-schema.org/draft-06/schema" already exists
Can anyone please help me in resolving the issue.
It seems like there are two JSON schemas within your project both having the id of "http://json-schema.org/draft-06/schema". There could be two reasons for this:
There is actually another JSON schema file you are using with the same exact id.
There is only one schema with this id but the framework is having a hard time reading your $id off the schema. We also had some difficulties reading $id with this framework back in our team. try removing the $id and its value and re-run your app.

'Relation does not exist' error after transferring to PostgreSQL

I have transfered my project from MySQL to PostgreSQL and tried to drop the column as result of previous issue, because after I removed the problematic column from models.py and saved. error didn't even disappear. Integer error transferring from MySQL to PostgreSQL
Tried both with and without quotes.
ALTER TABLE "UserProfile" DROP COLUMN how_many_new_notifications;
Or:
ALTER TABLE UserProfile DROP COLUMN how_many_new_notifications;
Getting the following:
ERROR: relation "UserProfile" does not exist
Here's a model, if helps:
class UserProfile(models.Model):
user = models.OneToOneField(User)
how_many_new_notifications = models.IntegerField(null=True,default=0)
User.profile = property(lambda u: UserProfile.objects.get_or_create(user=u)[0])
I supposed it might have something to do with mixed-case but I have found no solution through all similar questions.
Yes, Postgresql is a case aware database but django is smart enough to know that. It converts all field and it generally converts the model name to a lower case table name. However the real problem here is that your model name will be prefixed by the app name. generally django table names are like:
<appname>_<modelname>
You can find out what exactly it is by:
from myapp.models import UserProfile
print (UserProfile._meta.db_table)
Obviously this needs to be typed into the django shell, which is invoked by ./manage.py shell the result of this print statement is what you should use in your query.
Client: DataGrip
Database engine: PostgreSQL
For me this worked opening a new console, because apparently from the IDE cache it was not recognizing the table I had created.
Steps to operate with the tables of a database:
Database (Left side panel of the IDE) >
Double Click on PostgreSQL - #localhost >
Double Click on the name of the database >
Right click on public schema >
New > Console
GL

Variable scope in SSIS config table

I'm trying to change the scope of some of my variables in my SSIS package. They rely on a config table in a database, and previously they got their values set with the following values in the database:
\Package.Variables[User::EmailAddress].Properties[Value]
And the value for that would be set in the ConfigurationValue column.
This worked like a charm, except once I changed the scope of the variable from package to a specific foreach loop container, I've gotten the following error:
Warning: The package path referenced an object that cannot be found: "\Package.Variables[User::EmailAddress].Properties[Value]". This occurs when an attempt is made to resolve a package path to an object that cannot be found.
The other, globally-scoped variables don't have this problem. Is there some value in this string that's telling SSIS to look at the package level, instead of in the entire package?
You can go one of two ways - either rebuild the DTSConfig using the wizard, or alter the path in file to include the ForEach Loop
\Package\ForEachLoopName.Variables[User::EmailAddress].Properties[Value]

Circular Dependency Error with SQLAlchemy using autoload for table creation

I am attempting to use the script found here.
I am connecting to an MS SQL database and attempting to copy it into a MySQL database. When the script gets to this line:
table.metadata.create_all(dengine)
I get the error of:
sqlalchemy.exc.CircularDependencyError
I reasearched this error and found that it occurs when using the autoload=True when creating a table. The solution though doesn't help me. The solution for this is to not use autoload=True and to make use of the use_alter=True flag when defining the foreign key, but I'm not defining the tables manually, so I can't set that flag.
Any help on how to correct this issue, or on a better way to accomplish what I am trying to do would be greatly appreciated. Thank you.
you can iterate through all constraints and set use_alter on them:
from sqlalchemy.schema import ForeignKeyConstraint
for table in metadata.tables.values():
for constraint in table.constraints:
if isinstance(constraint, ForeignKeyConstraint):
constraint.use_alter = True
Or similarly, iterate through them and specify them as AddConstraint operations, bound to after the whole metadata creates:
from sqlalchemy import event
from sqlalchemy.schema import AddConstraint
for table in metadata.tables.values():
for constraint in table.constraints:
event.listen(
metadata,
"after_create",
AddConstraint(constraint)
)
see Controlling DDL Sequences