I have found the solution for anyone trying to copy in jsonb data that
includes quotes and commas in the text strings. I had to change the
delimiter and the quotes around the entire string as well as removing all
slashes from the text itself.
Martha
On Friday, October 18, 2019 at 11:21:46 AM
Back for what I hope is the final hurdle in updating the tiledata in my
Arches database.
At this point, I have a temp table loaded from a CSV, so it is all text. I
was unable to load the new tiledata in jsonb, so I left it for later to
cast as jsonb. This casting is not working
alter table
Well, this has been an adventure, but I think I'm finally on the road to
success. Loading the corrected data into a temp table, which includes a lot
of accented words, hasn't been easy. UTF8 fails on the first cedilla found,
e.g. façade. Using "set client_encoding to 'LATIN1';" gets the data
This is great, Bryan, thank you.
Once we repair the garbage that resulted during import, this might enable
us to have the preferred spellings in our database without issue.
I shall report back once we've tested. I kept wondering how non-English
installations manage.
Martha
On Tuesday,
Hi Martha -
I'm not sure this will is what you are after, but if you are having
problems importiing/exporting non-ascii characters to/from Arches, this may
help. We uploaded a cyrillic data set by CSV successfully using this.
https://github.com/archesproject/arches/issues/2831
For those who
Sounds like you're on track Martha! I'm glad we could help.
-Alexei
Director of Web Development - Farallon Geographics, Inc. - 971.227.3173
On Fri, Oct 4, 2019 at 9:56 PM Martha S wrote:
> That worked, Adam,
>
> I now have what I need to put together my select statement. I now "get"
> the
That worked, Adam,
I now have what I need to put together my select statement. I now "get" the
database to a much greater extent than before.
Thanks again,
Martha
On Wednesday, October 2, 2019 at 10:21:35 PM UTC-7, Martha S wrote:
>
> Thanks, Adam,
>
> That should get me the last bit of the
Thank you, Alexi,
I did find the broken bar records and then decided to go big and look for
anything non-ASCII. I found a select statement that helped and ran it as
SELECT
a.resourceinstanceid,
b.name as card_name,
regexp_replace(tiledata::text, '([^[:ascii:]])', '[\1]', 'g') AS bad_char
FROM
Thanks, Adam,
That should get me the last bit of the way.
Martha
On Wednesday, October 2, 2019 at 4:49:01 PM UTC-7, Adam Lodge wrote:
>
> Martha,
>
> I wish I could help with understanding why json export is working and csv
> isn’t. Unfortunately, I can’t. That said, toward working with
Alexi,
I'll enter it with ¦ (Alt+0166) just to be sure, but I thought I was on
track. Won't hurt to try again.
Thanks,
Martha
On Wednesday, October 2, 2019 at 5:54:27 PM UTC-7, Alexei Peters wrote:
>
> Hi Martha,
> I think you're looking for the wrong character. In your initial post the
>
Hi Martha,
I think you're looking for the wrong character. In your initial post the
stack trace indicated the "broken bar" character.
see http://www.fileformat.info/info/unicode/char/a6/index.htm
Try searching for that character instead.
Cheers,
Alexei
Director of Web Development - Farallon
Martha,
I wish I could help with understanding why json export is working and csv
isn’t. Unfortunately, I can’t. That said, toward working with your json
output, you can identify the uuid of nodes/fields that store geometry with this
sql:
select
b.name as model_name,
a.name as
One more bit of information: I was able to export the business data to
json. Naturally, I did not find '|' in the resulting file.
If this export includes geographies (or lack thereof, which is what I'm
really after) for this resource model, I might be able to query what I need
based on the
Alas, Gentlemen, neither effort returned anything. In PGADMIN4, I ran both
of the following with no results returned:
SELECT
a.resourceinstanceid,
b.name as card_name
FROM tiles a
JOIN cards b on a.nodegroupid = b.nodegroupid
WHERE 1=1
and tiledata::text like '%|%'
set
Thank you,to both Adams.
I will run both suggestions. Both are helpful to my ongoing database
activities. The more approaches in my toolbox, the better.
It is great to know that the cards can be treated as flat files with
tiledata; I missed that somehow. Iterating through each record with the
Another approach would be to use the django ORM in the python shell.
>From your project run
python manage.py shell
Now you can paste this code in
from arches.app.models.tile import Tile
tiles = Tile.objects.all()
for tile in tiles:
for value in tile.data.values():
if isinstance(value,
I realized that I inadvertently took this discussion offline to just Martha
and I. Here's some missing thread:
Martha,
(I think) you can issue this sql statement against the Postgres database
behind arches to identify the specific resource instance and “card” that
contains a given offending
Do anyone have a recommendation for the best way to go through the database
of >110,000 records to find all instances of the '|' in any field it might
occur? I am told this was the delimiter used in .arches files, so there
could be other instances sprinkled throughout the database.
Needle in a
Thank you, Alexi,
I'll just have to hope that's the only "special" character in the data.
Martha
On Friday, September 27, 2019 at 5:13:59 PM UTC-7, Martha S wrote:
>
> I am trying to export all the data for a particular resource model to CSV
> for review and modification and ran into an error
19 matches
Mail list logo