PHP POSTGRESQL DATA LOAD USING COPY
$95-100 USD
Posted about 15 years ago
$95-100 USD
Paid on delivery
I need a php script that will convert an xml into a file that can be consumed by postgres using the postgres COPY to load 15 million rows.
database table
echelon=# \d products
? ? ? ? ? ? ? ? ? ? ? ? ? Table "[login to view URL]"
? ? ? Column? ? ? |? ? ? ? ? ? ? ? ? Type? ? ? ? ? ? ? ? ? ? | Modifiers
--------------+-------------------------+-----------
? feed_id? ? ? ? ? | integer? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | not null
? product_id? ? | integer? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | not null
? mid? ? ? ? ? ? ? ? ? | integer? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | not null
? product_name | character varying(512)? | not null
? category_id? | integer? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | not null
? img_small? ? ? | character varying(512)? |
? img_med? ? ? ? ? | character varying(512)? |
? img_medlarge | character varying(512)? |
? img_large? ? ? | character varying(512)? |
? shipping? ? ? ? | double precision? ? ? ? ? ? ? |
? weight? ? ? ? ? ? | double precision? ? ? ? ? ? ? |
? price? ? ? ? ? ? ? | double precision? ? ? ? ? ? ? |
? sku? ? ? ? ? ? ? ? ? | character varying(125)? |
? man_name? ? ? ? | character varying(124)? |
? short_desc? ? | character varying(4000) |
? long_desc? ? ? | character varying(4000) |
? url? ? ? ? ? ? ? ? ? | character varying(2000) | not null
? upc? ? ? ? ? ? ? ? ? | character varying(124)? |
## Deliverables
Sample XML
I need a php script that will convert an xml into a file that can be consumed by postgres using the postgres COPY to load 15 million rows.
database table
echelon=# \d products
? ? ? ? ? ? ? ? ? ? ? ? ? Table "[login to view URL]"
? ? ? Column? ? ? |? ? ? ? ? ? ? ? ? Type? ? ? ? ? ? ? ? ? ? | Modifiers
--------------+-------------------------+-----------
? feed_id? ? ? ? ? | integer? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | not null
? product_id? ? | integer? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | not null
? mid? ? ? ? ? ? ? ? ? | integer? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | not null
? product_name | character varying(512)? | not null
? category_id? | integer? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | not null
? img_small? ? ? | character varying(512)? |
? img_med? ? ? ? ? | character varying(512)? |
? img_medlarge | character varying(512)? |
? img_large? ? ? | character varying(512)? |
? shipping? ? ? ? | double precision? ? ? ? ? ? ? |
? weight? ? ? ? ? ? | double precision? ? ? ? ? ? ? |
? price? ? ? ? ? ? ? | double precision? ? ? ? ? ? ? |
? sku? ? ? ? ? ? ? ? ? | character varying(125)? |
? man_name? ? ? ? | character varying(124)? |
? short_desc? ? | character varying(4000) |
? long_desc? ? ? | character varying(4000) |
? url? ? ? ? ? ? ? ? ? | character varying(2000) | not null
? upc? ? ? ? ? ? ? ? ? | character varying(124)? |
sample xml
? ? <product category_id="150" id="438256236" row="1">
? ? ? ? ? ? ? ? ? ? ? <name># 14 lb - cln (h) 100 tabs</name>
? ? ? ? ? ? ? ? ? ? ? <imageURL_small>[login to view URL]</imageURL_small>
? ? ? ? ? ? ? ? ? ? ? <imageURL_med>[login to view URL]</imageURL_med>
? ? ? ? ? ? ? ? ? ? ? <imageURL_medlarge>[login to view URL]</imageURL_medlarge>
? ? ? ? ? ? ? ? ? ? ? <imageURL_large>[login to view URL]</imageURL_large>
? ? ? ? ? ? ? ? ? ? ? <shippingAmount>0.00</shippingAmount>
? ? ? ? ? ? ? ? ? ? ? <shippingWeight>0.0000</shippingWeight>
? ? ? ? ? ? ? ? ? ? ? <sku>w1714</sku>
? ? ? ? ? ? ? ? ? ? ? <manufacturerPartNumber>w1714</manufacturerPartNumber>
? ? ? <desc_short>Sony CD Architect - Produce professional audio CDs to Red Book specification with Sonic Foundry's new CD Architect 5.0.</desc_short>
? ? ? ? ? ? ? ? ? ? ? <desc_long>Sony CD Architect - Produce professional audio CDs to Red Book specification with Sonic Foundry's new CD Architect 5.0.</desc_long>
? ? ? ? ? ? ? ? ? ? ? <URL>[login to view URL]</URL>
? ? ? ? ? ? ? ? ? ? ? <has_image>false</has_image>
? ? ? ? ? ? ? ? ? ? ? <merchantListing included="1">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <merchantProduct id="438256236" mid="99056">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <in_stock type="stock-0" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <condition type="cond-0" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <price>13.00</price>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <URL>[login to view URL]</URL>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </merchantProduct>
? ? ? ? ? ? ? ? ? ? ? </merchantListing>
? ? ? ? ? ? ? </product>
? ? ? ? ? ? ? <product category_id="150" id="438256230" row="2">
? ? ? ? ? ? ? ? ? ? ? <name># 3 gb - liv's (h) 100 tabs</name>
? ? ? ? ? ? ? ? ? ? ? <imageURL_small>[login to view URL]</imageURL_small>
? ? ? ? ? ? ? ? ? ? ? <imageURL_med>[login to view URL]</imageURL_med>
? ? ? ? ? ? ? ? ? ? ? <imageURL_medlarge>[login to view URL]</imageURL_medlarge>
? ? ? ? ? ? ? ? ? ? ? <imageURL_large>[login to view URL]</imageURL_large>
? ? ? ? ? ? ? ? ? ? ? <shippingAmount>0.00</shippingAmount>
? ? ? ? ? ? ? ? ? ? ? <shippingWeight>0.0000</shippingWeight>
? ? ? ? ? ? ? ? ? ? ? <sku>w1703</sku>
? ? ? ? ? ? ? ? ? ? ? <manufacturerPartNumber>w1703</manufacturerPartNumber>
? ? ? <desc_short>Sony CD Architect - Produce professional audio CDs to Red Book specification with Sonic Foundry's new CD Architect 5.0.</desc_short>
? ? ? ? ? ? ? ? ? ? ? <desc_long>Sony CD Architect - Produce professional audio CDs to Red Book specification with "Sonic" Foundry's new CD Architect 5.0.</desc_long>
? ? ? ? ? ? ? ? ? ? ? <URL>[login to view URL]</URL>
? ? ? ? ? ? ? ? ? ? ? <has_image>false</has_image>
? ? ? ? ? ? ? ? ? ? ? <merchantListing included="1">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <merchantProduct id="438256230" mid="99056">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <in_stock type="stock-0" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <condition type="cond-0" />
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <price>12.50</price>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <URL>[login to view URL]</URL>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </merchantProduct>
? ? ? ? ? ? ? ? ? ? ? </merchantListing>
? ? ? ? ? ? ? </product>
Project ID: 3740429
About the project
13 proposals
Remote project
Active 15 yrs ago
Looking to make some money?
Benefits of bidding on Freelancer
Set your budget and timeframe
It's free to sign up and bid on jobs
13 freelancers are bidding on average $85 USD for this job
$85 USD in 3 days
4.9 (102 reviews) $85 USD in 3 days
4.9 (44 reviews) $85 USD in 3 days
4.9 (28 reviews) $85 USD in 3 days
5.0 (51 reviews) $85 USD in 3 days
4.9 (67 reviews) $85 USD in 3 days
4.6 (71 reviews) $85 USD in 3 days
4.9 (13 reviews) $85 USD in 3 days
5.0 (18 reviews) $85 USD in 3 days
4.8 (9 reviews) $85 USD in 3 days
3.7 (13 reviews) $85 USD in 3 days
0.0 (0 reviews) $85 USD in 3 days
0.0 (0 reviews) $85 USD in 3 days
0.0 (0 reviews)