You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2008-04-14 17:05:52

musellap
Member
6 posts

musellap said:

Shape to PostGIS

Tags: [schema]

If I have a shape file with one or more fields "string" type and I import into PostGIS get all fields string set to varchar (10485760): why? How do I get a value other than 10485760 (for example varchar (30)? Is Possible?

Another question: can I import into PostGIS more shape files in one job?

Thanks
Best regards

I use:
SDI 2.3.2
sShapefileInput
sPostgisOutput

Offline

#2 2008-04-15 08:15:52

Fxp
Member
193 posts

Fxp said:

Re: Shape to PostGIS

Hi, For the time being String fields are mapped to varchar(10485760) as this is the default GeoTools mapping. We are currently working on improving that point and allowing to insert/update/append data to an existing PostGIS table.

> Another question: can I import into PostGIS more shape files in one job?
Yep, just add another ShapefileInput and another sPostgisOutput components.
If you want to merge two Shape into one postgis table use a tMerge Component in between.

Ciao.
Francois

Offline

#3 2008-04-15 08:43:13

musellap
Member
6 posts

musellap said:

Re: Shape to PostGIS

Hi Fxp,
for the second answer: if I have a list of shape file (more then 10-20) and I want to put in PostGis in which mode I can put them in one time?
Thanks
Bye

Offline

#4 2008-04-18 07:16:29

Fxp
Member
193 posts

Fxp said:

Re: Shape to PostGIS

Hi,
For more than 10 shapefiles, you could use a tFileList component, select your directory, search pattern will be *.shp and could be recursive. Then iterate tFileList on tShapefileInput and then use tMerge to append all shape's features.

That way, it will search for all file *.shp, read all shape one after the other and the tMerge will append all geometries. You should have shapefile with the same attributes.

HTH.
Francois

Offline

#5 2008-04-18 09:13:26

musellap
Member
6 posts

musellap said:

Re: Shape to PostGIS

Hi,
if I have, for example, more than 10 different shapefiles and I want to put in more 10 different PostGIS layers how I can to do? How to set different schema in automatic mode?
Thanks
Bye

Offline

#6 2008-04-21 16:28:37

Fxp
Member
193 posts

Fxp said:

Re: Shape to PostGIS

Hi, what is automatic mode ?

If you have 10 inputs and 10 outputs components, just define all transformations on the workspace.
Schema will be defined for each inputs and outputs components. If you always use the same schema, you can save it as a flat XML file (from the schema editor) or use the metadata section in the repository to save it.

HTH.
Francois

Offline

#7 2008-04-23 18:59:05

musellap
Member
6 posts

musellap said:

Re: Shape to PostGIS

Hi,
If I have more than 10 different inputs and many different outputs? Is there an automatic mode for retrieve the schema of all inputs?
Thanks
Bye

Offline

#8 2008-04-30 18:52:09

fsc7
Member
3 posts

fsc7 said:

Re: Shape to PostGIS

I have the same interest.
My question is... How can I retrieve a Shape's Schema?
Thanks,

Bye

Offline

#9 2008-05-14 10:08:13

mcoudert
Member
55 posts

mcoudert said:

Re: Shape to PostGIS

Hi,

There is no "automatic mode" at this time in SDI as Metadata for DB, csv files....
This functionality will be available soon in SDI.

--
Mathieu

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy