Hi Burim, I'm working on adding some documentation that will be relevant to 
your question, but here's an answer in the meantime:

First, the best and most robust way to add data to Arches is by converting 
your data to a .arches file, on which there is extensive documentation here 
<https://arches-hip.readthedocs.org/en/latest/loading-data/#importing-cultural-heritage-data-into-arches-hip>
 and 
here <http://arches3.readthedocs.org/en/latest/arches-data/#from-arches>.

I was working on trying to find the easiest way to convert an Excel file to 
a .arches file, and along the way have written this SQL query which, with 
some adjustment and an addition SELECT statement to deal with your parcel 
information, should more or less work out for you.  At the very least, it 
should give you an idea of how to go from your existing tables to a .arches 
format.

SELECT
  ID AS RESOURCEID,
  'HERITAGE_RESOURCE.E18' AS RESOURCETYPE,
  'NAME.E41' AS ATTRIBUTENAME,
  name AS ATTRIBUTEVALUE,
  'group1' AS GROUPID
FROM #yourTable
UNION ALL
SELECT
  ID,
  'HERITAGE_RESOURCE.E18',
  'NAME_TYPE.E55',
  nametype,
  'group1'
FROM #yourTable
UNION ALL
SELECT
  ID,
  'HERITAGE_RESOURCE.E18',
  'SPATIAL_GEOMETRY_COORDINATES.E47',
  'POINT (' & long & ' ' & lat &')',
  'group2'
FROM #yourTable
ORDER BY RESOURCEID, GROUPID

The query is run on this existing table:

    ======  ===========  ============  ========  =========
    ID           name                nametype            lat               
long 
    ======  ===========  ============  ========  =========
    1            119 Sidney        NAME_TYPE:1   31.75357     -93.08813
    2            135 Sidney        NAME_TYPE:1   31.75359     -93.08825
    ======  ===========  ============  ========  =========

and results in this:

    ==========    =====================    ================================ 
    ==========================   =======
    RESOURCEID  RESOURCETYPE                   ATTRIBUTENAME               
                           ATTRIBUTEVALUE                          GROUPID
    ==========    =====================    ================================ 
    ==========================   =======
    1                      HERITAGE_RESOURCE.E18   NAME.E41                 
                                    119 Sidney                             
         group1
    1                      HERITAGE_RESOURCE.E18   NAME_TYPE.E55           
                                NAME_TYPE:1                               
group1
    1                      HERITAGE_RESOURCE.E18   
SPATIAL_COORDINATES_GEOMETRY.E47   POINT (-93.08813 31.75357)             
group2
    2                      HERITAGE_RESOURCE.E18   NAME.E41                 
                                    135 Sidney                             
         group1
    2                      HERITAGE_RESOURCE.E18   NAME_TYPE.E55           
                                NAME_TYPE:1                               
group1
    2                      HERITAGE_RESOURCE.E18   
SPATIAL_COORDINATES_GEOMETRY.E47   POINT (-93.08825 31.75359)             
group2
    ===========  ======================  ================================== 
 ==========================  ========

Hope that helps, and I'll be sure to let you know when I'm able to get the 
documentation added.

Adam

On Monday, October 5, 2015 at 3:18:05 PM UTC-5, Burim Ameti wrote:
>
> Dear all, 
>
> I want to harvest data from oracle table or sqlserver table 
> is there any option how to insert data in arches database by sql query
>
> if someone has done this let me know 
>
> object table 
> id , object name, lat, long , parcel
>
> With respect
>
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to