SSIS TO Merge Join two ADO.NET Source - ssis-2012

I am try to join two ADO.Net source file its cases error.Is there is any possible to merge two ADO.Net source file..While merge two OLDBE source is working file

Related

Neo4j APOC export/import with primary keys instead of internal ids

I am trying to import multiple CSVs, exported from multiple different Neo4j databases with APOC's export, into one big database. Some of the nodes are shared.
There is a problem that relationships in the CSV use the Neo4j's internal IDs for the _start and _end, instead of the nodes' "primary key" -- is the #Index with primary = true (same as #Id) a thing of the Neo4j or the Neo4j's Java OGM?. This is bad because these multiple exports could (and will) have same internal IDs for different nodes and the merged graph will be a mess. The same applies for nodes, I want to merge them based on the primary key during the import instead of creating duplicates.
Is there a way to export a Neo4j database with APOC in a way that it relies on primary keys instead of internal IDs? I need a CSV or JSON file, no CQL. Or is there another way of exporting a Neo4j database in a way that I can import multiple exports and they will merge seamlessly? ...something different than writing my CSV exporter and imported, this will be the very last option.

How to create relationships with load CSV from a batch-import file relationships

I have already created the nodes before and I would like to use the relationships file used some time ago during a batch- import, to create relationships using the load CSV method.
This is my relationships CSV file:
You'll need to use LOAD CSV for this (USING PERIODIC COMMIT), although you'll need to watch out for spaces in both the headers (if you use them) and your fields. trim() may help in your fields.
The headers shouldn't have : in them if at all possible.
The biggest obstacle will be dynamically using the type of the relationship from the csv. Currently Cypher does not deal with relationship types dynamically, you'll need an alternate approach. Install APOC Procedures and use apoc.create.relationship() to handle that.

create nodes / relationship pointing to the same city

I have an empty neo4j database. I want the city{val:"new york"} node to only have one instance, not two. What is the correct way to CREATE these nodes and relationships so that john and sam are pointing to the same city{val:"new york"} node?
CREATE
(p:person{name:"john"}),
(c:city{val:"new york"}),
(p)-[:LIVES_IN]->(c)
CREATE
(p:person{name:"sam"}),
(c:city{val:"new york"}),
(p)-[:LIVES_IN]->(c)
The data I am importing is in a csv file. I need some way to only create the city if it does not already exist. I tried to replace CREATE with MERGE, but the syntax is unclear.
It is simpler (and safer, since you don't always know if the data already exists) to just always use MERGE in cases where there can be duplicate attempts to create data that you want to be unique.
These 2 blocks of Cypher statements will not create duplicate nodes/relationships, even if you reverse the order (or if the DB already has some of the same data).
MERGE (p:person{name:"john"})
MERGE (c:city{val:"new york"})
MERGE (p)-[:LIVES_IN]->(c);
MERGE (p:person{name:"sam"})
MERGE (c:city{val:"new york"})
MERGE (p)-[:LIVES_IN]->(c);
Answering my own question. Each line needs its own MERGE clause.
CREATE
(p:person{name:"john"}),
(c:city{val:"new york"}),
(p)-[:LIVES_IN]->(c)
MERGE (p:person{name:"sam"})
MERGE (c:city{val:"new york"})
MERGE (p)-[:LIVES_IN]->(c)
Good related resource...https://neo4j.com/blog/common-confusions-cypher/

how to export neo4j data of database A to database B?

I have two cases:
case 1:export a part of data in neo4j database A to database B,like data of Label "Person" in database A ,I wanna export "Person" data from A to B
case 2: export whole data from A to B
so how to deal with these two cases? thanks
APOC allows to export the full graph or subgraphs into a cypher file consisting of create statements, see https://neo4j-contrib.github.io/neo4j-apoc-procedures/#_export_to_cypher_script for details.
The other option would be access the other database via the neo4j jdbc driver and use apoc.load.jdbc to retrieve data from there.

Input from variable and excel to oledb destination in ssis 2012

I have a situation where I need to get data from excel sheet and sql table then store it into a single sql server table.
Below steps I have completed already,
1.In control flow, by using execute sql task, fetched data from sql and assigned it to variable.
2.Then added Data flow task in control flow.
3.In data flow added Excel source and oledb destination.
When I trying to edit oledb destination I can only able to see excel sheet columns,
How to I do get variables also in Oledb destination? or is there any other best approach ?
You will need to add a merge join control inside of a data flow task.
Probably easier to change your execute sql task to be a second data source within your data flow task and then join on the key within a merge join control.
Be warned the merge join requires the data to be sorted. If the data is sorted on input, you can tell SSIS that by setting the input / output properties of the advanced editor. Otherwise, you can add a sort task after each data source.

Resources