Coder Social home page Coder Social logo

tap-shopify's Issues

Many Numeric Fields Processed as Text - Intentional?

I probably misunderstand something about Singer, but many numeric fields are processed as text. For example: order_adjustments.tax_amount, order_adjustments.amount, customers.total_spent. A few of these have been annotated with:

"format": "singer.decimal"

But many have not. Specifically I have noticed that customer.total_spent comes through to my PostgreSQL endpoint as a text column, which is undesirable for attempting to segment customers.

Is there a reason for these fields to be text? If I create a PR that addresses it, is it more correct to update the type to "numeric" or to update the format with "singer.decimal"?

Metafield json_string as string.

I'd like to gauge the interest in accepting a PR for new functionality.

The metafield.value field currently has the following schema:

"value": {
  "type": [
    "null",
    "integer",
    "object",
    "string"
  ],
  "properties": {}
},

The object type occurs when the type field is what's called a json_string in Shopify's API. It doesn't appear the SQL targets (or at least redshift/postgres) support object in this list of possible types, and they silently drop these values. I'd like a way to keep them as strings (what Shopify returns directly) so they'll still make it to my database.

Would you be amenable to a config flag (default off for backwards compatibility) that would disable current json_string parsing logic, leaving those values as strings?

I'm going to add this for myself, and then I plan on adding a generated column to parse these into JSONB manually in the target db. I have to imagine this is a very common use case that others may be interested in. I'd also prefer not maintaining a fork.

Request rate limit (exceeding 2 calls in a second) using Shopify Tap

I am trying to figure out where the configuration is to limit the rate within the tap, however, i couldnt find it. I see a separate python file in Shopify git (requests_rate_limit.py) which seems to throttle API requests, but i do not see that file in the tap configuration within my server when i installed the tap . Below is the error i s
Screen Shot 2021-10-02 at 4 44 18 PM
Screen Shot 2021-10-02 at 4 39 15 PM
Screen Shot 2021-10-02 at 4 39 04 PM
ee

tap-shopify does not support the gift card endpoint

https://help.shopify.com/en/api/reference/plus/giftcard

"A gift card is an alternative payment method. Each gift card has a unique code that is entered during checkout. GET /admin/api/2019-10/gift_cards.json
Retrieves a list of gift cards. "

This endpoint can be used to pull information about gift cards, including balances available and status. This information is not available through other shopify tap endpoints already implemented. Knowing how much value remains on gift cards is vital for calculating total liabilities.

Repetitive error with large shops

Hi, I was using tap-shopify for some months, but I've had problems for some days. I have a large shop (it has more than 1000 orders per day), I saw a lot of times this error:

INFO Filtered paths list: ['admin_graphql_api_id', 'app_id', 'billing_address', 'browser_ip', 'buyer_accepts_marketing', 'cancel_reason', 'cancelled_at', 'cart_token', 'checkout_id', 'checkout_token', 'client_details', 'closed_at', 'confirmed', 'contact_email', 'currency', 'customer_locale', 'device_id', 'discount_applications', 'discount_codes', 'financial_status', 'fulfillment_status', 'fulfillments', 'gateway', 'landing_site', 'landing_site_ref', 'location_id', 'note', 'note_attributes', 'number', 'order_status_url', 'payment_gateway_names', 'phone', 'presentment_currency', 'processed_at', 'processing_method', 'reference', 'referring_site', 'refunds', 'shipping_lines', 'source_identifier', 'source_name', 'source_url', 'subtotal_price', 'subtotal_price_set', 'tags', 'tax_lines', 'taxes_included', 'test', 'token', 'total_discounts_set', 'total_line_items_price', 'total_line_items_price_set', 'total_price', 'total_price_set', 'total_shipping_price_set', 'total_tax', 'total_tax_set', 'total_tip_received', 'total_weight', 'user_id']
WARNING Removed 2 paths during transforms:
	customer.accepts_marketing_updated_at
	customer.marketing_opt_in_level
WARNING Removed paths list: ['customer.accepts_marketing_updated_at', 'customer.marketing_opt_in_level']
CRITICAL IncompleteRead(1896442 bytes read)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/http/client.py", line 546, in _get_chunk_left
    chunk_left = self._read_next_chunk_size()
  File "/usr/local/lib/python3.6/http/client.py", line 513, in _read_next_chunk_size
    return int(line, 16)
ValueError: invalid literal for int() with base 16: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/http/client.py", line 563, in _readall_chunked
    chunk_left = self._get_chunk_left()
  File "/usr/local/lib/python3.6/http/client.py", line 548, in _get_chunk_left
    raise IncompleteRead(b'')
http.client.IncompleteRead: IncompleteRead(0 bytes read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/venv_etl/vtap_shopify/bin/tap-shopify", line 11, in <module>
    load_entry_point('tap-shopify', 'console_scripts', 'tap-shopify')()
  File "/usr/src/app/venv_etl/vtap_shopify/lib/python3.6/site-packages/singer/utils.py", line 192, in wrapped
    return fnc(*args, **kwargs)
  File "/usr/src/app/etl/tools/tap-shopify/tap_shopify/__init__.py", line 191, in main
    sync()
  File "/usr/src/app/etl/tools/tap-shopify/tap_shopify/__init__.py", line 153, in sync
    for rec in stream.sync():
  File "/usr/src/app/etl/tools/tap-shopify/tap_shopify/streams/base.py", line 191, in sync
    for obj in self.get_objects():
  File "/usr/src/app/etl/tools/tap-shopify/tap_shopify/streams/base.py", line 152, in get_objects
    objects = self.call_api(query_params)
  File "/usr/src/app/venv_etl/vtap_shopify/lib/python3.6/site-packages/backoff.py", line 286, in retry
    ret = target(*args, **kwargs)
  File "/usr/src/app/venv_etl/vtap_shopify/lib/python3.6/site-packages/backoff.py", line 286, in retry
    ret = target(*args, **kwargs)
  File "/usr/src/app/etl/tools/tap-shopify/tap_shopify/streams/base.py", line 67, in wrapper
    return fnc(*args, **kwargs)
  File "/usr/src/app/etl/tools/tap-shopify/tap_shopify/streams/base.py", line 119, in call_api
    return self.replication_object.find(**query_params)
  File "/usr/src/app/venv_etl/vtap_shopify/lib/python3.6/site-packages/pyactiveresource/activeresource.py", line 385, in find
    return cls._find_every(from_=from_, **kwargs)
  File "/usr/src/app/venv_etl/vtap_shopify/lib/python3.6/site-packages/pyactiveresource/activeresource.py", line 523, in _find_every
    return cls._build_list(cls.connection.get(path, cls.headers),
  File "/usr/src/app/venv_etl/vtap_shopify/lib/python3.6/site-packages/pyactiveresource/connection.py", line 329, in get
    return self.format.decode(self._open('GET', path, headers=headers).body)
  File "/usr/src/app/venv_etl/vtap_shopify/lib/python3.6/site-packages/shopify/base.py", line 23, in _open
    self.response = super(ShopifyConnection, self)._open(*args, **kwargs)
  File "/usr/src/app/venv_etl/vtap_shopify/lib/python3.6/site-packages/pyactiveresource/connection.py", line 291, in _open
    response = Response.from_httpresponse(http_response)
  File "/usr/src/app/venv_etl/vtap_shopify/lib/python3.6/site-packages/pyactiveresource/connection.py", line 184, in from_httpresponse
    return cls(response.code, response.read(),
  File "/usr/local/lib/python3.6/http/client.py", line 456, in read
    return self._readall_chunked()
  File "/usr/local/lib/python3.6/http/client.py", line 570, in _readall_chunked
    raise IncompleteRead(b''.join(value))
http.client.IncompleteRead: IncompleteRead(1896442 bytes read)

Do you have any idea?. Thank you so much for reading me.

JsonDecodeError

I got JsonDecodeError while trying the command "tap-shopify -c config.json --catalog catalog-file.json". THe catalog-flle.json was not populated automatically.

ModuleNotFoundError (No module named 'tap_tester')

Tried to run the tests

nosetests

got

ERROR: Failure: ModuleNotFoundError (No module named 'tap_tester')

e.g. at tests/test_automatic_fields.py:5

I can't find tap_tester on GitHub, PyPi or anything else.

device_type not being extracted

The device_type field is tracked within the analytics section of the shopify website, however this field does not appear to be being extracted via stitch to my data warehouse. Is there any plan to add this field to the stitch extract?

Support events endpoint

Context

The current version (1.4.0) doesn't support the events endpoint.

Therefore, it is not possible to retrieve a list of events

Requirements

  • Retrieve a list of events
  • Filter events based on timestamp

Syncing always "Skipping stream"

I'm unable to get tap-shopify to run a sync - it just outputs "Skipping stream" for everything.

tap-shopify -c config.json -d > catalog.json
tap-shopify -c config.json --catalog catalog.json

INFO Skipping stream: orders
INFO Skipping stream: customers
INFO Skipping stream: custom_collections
INFO Skipping stream: abandoned_checkouts
INFO Skipping stream: products
INFO Skipping stream: transactions
INFO Skipping stream: metafields
INFO Skipping stream: order_refunds
INFO Skipping stream: collects

There's no explanation in either tap-shopify or singer what this means or why it's happening. Followed the instructions in the README but it looks like something important is missing.

(1) Incremental issue (2) start_date and end data can be added ?

  1. Even though in the configuration json its mentioned as incremental , every time it runs, it is taking from the config.json start-date and fetch data till date.
    "replication_key": "updated_at",
    "replication-method": "INCREMENTAL"

  2. Do we have any option to mention both start date and end date. I can see only start date option as bellow.
    If I want to run only for a particular date what should I do ?
    {
    "start_date": "2020-01-01T00:00:00Z",
    "api_key": "shppa_92834792349834293786639234",
    "shop": "https://mytestshop.myshopify.com/"
    }
    Some thing like this we can get directly data between two dates
    myshopify.com/admin/api/2019-07/orders.json?created_at_min=2020-10-01&created_at_max=2020-11-01&limit=175

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.