There are two ways you can import data into Brick River.
The importer API takes a .csv file POST or PUT to a particular URL.
To post the file there are two ways to do this.
Create a new import
In Brick River, go to ADMIN > Imports and press "Add a new"
Prepare your .csv file
You will need to have a .csv file and you will need to know what fields you want to import. This is a little tricky to do. But the best way, at this point, to know the field Ids is to go to the particular view and then pick the fields that you want and the download a .csv. This will show you the exact field names in the first row.
If you are using an Id for the matching mode (more on that below) you will need to have a field called Id. It's case sensitive. :-)
The importer will only add/update the fields that you specify in your .csv file. So, if you have a people record that has lots of fields but in your .csv file you only have fields: FirstName and LastName, then those are the only fields that will be touched.
Give it a name
Give the importer a name. This is only for you to identify it.
Set the Table and View
The table is either "Content" or "Contacts" since that's what all our tables are.
The view is the ID of the view. If the view is named "People" it's ID is also "People" but maybe if the name of the view is "Blog Posts" then the Id is probably the non-space version of "BlogPosts." Case matters.
Set it to Run as an administrator in your system
Matching mode is how we check to see if one of your records already exists so we don't create duplicates. Keep in mind, however, that there is a nifty duplicate checker/fixer that you can always run.
There are three matching modes.
Understand the Options
Here's is what they mean. Pay attention here this is important! :-)
Enter a "source." The Source sets the unique place where the data is coming from.
It comes into play if you need to connect data together or do updates.
Let's say, for example, that you are importing data from "DataSystemA" and you have a couple of views that you want to tie together. Maybe you have two tables of data. One for "Home Bases" and another of "People" and every person has a field called "Home Base" that is a related table.
You would have to do two import and both imports would have to have the same source name in order to be connected. And they would be connected on the second import.
So, you'd give them both a source name of something like "DataSystemA."
First, you would import the "Home Bases" and you would also provide a Source Id for each and that field would be named Id. It's case sensitive.
The Source Id is YOUR Id from your database and it's the connector of the two tables.
After you'd run the import for "Home Bases" you would import the "People."
The People import would also have a source of "DataSystemA" and it would have a field called "HomeBases" and, in this example, this field has an articulated relationship to HomeBases within Brick River's view XML.
When you run the "People" import it will look for any other records that have the source name of "DataSystemA" as it's importing and if so and if the IDs match, it will connect them together.
Source ALSO is used for follow on imports or data syncs.
Let's say that every week you are going to update your "People" view from an external data system. Then you would give it a name like "MyOutsideDB" and then every time it runs it will use either the Source Id, Brick River Id or the de-dupe fields as the unique identifier to perform adds, updates or deletes.
More on the options
The importer lets you either add, update or delete.
If you are running the importer a second time then it will look at the SourceName and Id to see if they exist. If they don't, then it will import them. Here's an example.
Let's say that you have the import set to both "add" and "update" here's how it will be the first time running an import to People on the source of "MyExternalDB"
Upon running this, since it is the first time, it will add all the records.
Running it a second time here's how it would be
|1||J. Mesquite||Banderlapaunch||Titoemail@example.com||no change|
|2||Pikpo||Chaucheegee||Clarencefirstname.lastname@example.org||PreferredName is updated|
|4||Craggletoes||Crump||Wolfemail@example.com||this record would be added|
Call 800-924-5220 or