Import.io JSON数据导入MySQL DB

时间:2015-05-12 13:11:07

标签: mysql json import.io

我正在尝试连接并从我的import.io提取器获取数据。然后我尝试将数据导入MySQL数据库。我一直在关注这里给出的示例:http://support.import.io/knowledgebase/articles/511605-extractor-to-sql-database但由于某种原因我无法将任何数据存入我的数据库。解决这个问题的任何帮助都会非常有帮助。以下是一些其他信息。

下面是我运行教程中的命令时的输出,这些命令已经过一些修改,供我个人使用。

./importSQL.py 
CONFIG FOUND, YAY! 
{u'username': u'dmhumph_dmhumph', u'database': u'dmhumph_WATERFOWLGEARFINDER', u'inputUrl': u'https://www.rogerssportinggoods.com/decoys/avery-greenhead-gear-decoys/full-body-goose.html', u'mapping': {u'product_name/_text': u'product_name', u'image/_alt': u'product_name2', u'image': u'image', u'availability': u'availability', u'price': u'price', u'product_name/_title': u'product_name3', u'product_name': u'link'}, u'host': u'localhost', u'table': u'FullBodyGeese', u'ioAPIKey': u'<API-Key-Here>', u'password': u'<Password-Here>', u'sourceUUID': u'<Source-UUID-Here>', u'port': 3306, u'ioUserID': u'<IO-User-ID-Here>'} 
Recieved 1 rows of data 
product_name, product_name2, image, availability, price, product_name3, link 
Mappings: {u'product_name/_text': u'product_name', u'image/_alt': u'product_name2', u'image': u'image', u'availability': u'availability', u'price': u'price', u'product_name/_title': u'product_name3', u'product_name': u'link'}

下面是我刚出去从同一个提取器获取数据并将其转储到文件时返回的数据示例:

    stdClass Object
    (
        [offset] => 0
        [results] => Array
            (
                [0] => stdClass Object
                    (
                        [product_name/_text] => Avery GHG Tim Newbold Lesser Canadas Sleeper 4 Pack
                        [image] => https://www.rogerssportinggoods.com/media/catalog/product/cache/1/small_image/210x/9df78eab33525d08d6e5fb8d27136e95/A/V/AV-72322-550.png
                        [price] => Regular Price: $99.99 Special Price $44.99
                        [availability] => Out of stock
                        [image/_alt] => Avery GHG Tim Newbold Lesser Canadas Sleeper 4 Pack
                        [product_name] => https://www.rogerssportinggoods.com/decoys/avery-greenhead-gear-decoys/full-body-goose/avery-ghg-tim-newbold-lesser-canadas-sleeper-4-pack.html
                        [product_name/_title] => Avery GHG Tim Newbold Lesser Canadas Sleeper 4 Pack
                    )

                [1] => stdClass Object
                    (
                        [product_name/_text] => Avery GHG 72302 Tim Newbold Fully Flocked Lesser Canadas Sleepers
                        [image] => https://www.rogerssportinggoods.com/media/catalog/product/cache/1/small_image/210x/9df78eab33525d08d6e5fb8d27136e95/A/V/AV-72302-550.png
                        [price] => Regular Price: $129.99 Special Price $69.99
                        [availability] => Out of stock
                        [image/_alt] => Avery GHG 72302 Tim Newbold Fully Flocked Lesser Canadas Sleepers
                        [product_name] => https://www.rogerssportinggoods.com/decoys/avery-greenhead-gear-decoys/full-body-goose/avery-ghg-tim-newbold-fully-flocked-lesser-canadas-sleepers.html
                        [product_name/_title] => Avery GHG 72302 Tim Newbold Fully Flocked Lesser Canadas Sleepers
                    )

                [2] => stdClass Object
                    (
                        [product_name/_text] => Greenhead Gear Pro Grade Series Full Body Canada Goose Decoys
                        [image] => https://www.rogerssportinggoods.com/media/catalog/product/cache/1/small_image/210x/9df78eab33525d08d6e5fb8d27136e95/A/V/AV-71446-500.png
                        [price] => Regular Price: $139.99 Special Price $89.99
                        [availability] => Out of stock
                        [image/_alt] => Greenhead Gear Pro Grade Series Full Body Canada Goose Decoys
                        [product_name] => https://www.rogerssportinggoods.com/decoys/avery-greenhead-gear-decoys/full-body-goose/greenhead-gear-pro-grade-series-full-body-canada-goose-decoys.html
                        [product_name/_title] => Greenhead Gear Pro Grade Series Full Body Canada Goose Decoys
                    )
)

    [cookies] => Array
        (
            [0] => frontend="q7jjmij9u3jlnh505vl2d1oa45";Path="/";Domain="www.rogerssportinggoods.com";Port="443"
            [1] => CATEGORY_INFO="%5B%5D";Path="/";Domain="www.rogerssportinggoods.com";Port="443"
            [2] => LAST_CATEGORY="70";Path="/";Domain="www.rogerssportinggoods.com";Port="443"
    )
        [connectorVersionGuid] => 44b6228b-c59c-47a0-8cbf-458fabe5d77d
        [connectorGuid] => 4a60b47a-b973-4e51-8e15-47cf81fb1858
        [pageUrl] => https://www.rogerssportinggoods.com/decoys/avery-greenhead-gear-decoys/full-body-goose.html
        [outputProperties] => Array
            (
                [0] => stdClass Object
                    (
                        [name] => product_name
                        [type] => URL
                    )

                [1] => stdClass Object
                    (
                        [name] => image
                        [type] => IMAGE
                    )

                [2] => stdClass Object
                    (
                        [name] => price
                        [type] => STRING
                    )

                [3] => stdClass Object
                    (
                        [name] => availability
                        [type] => STRING
                    )

            )

    )

0 个答案:

没有答案