Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APIC-313] retain specific sql types in civis_file_to_table #402

Merged

Conversation

mheilman
Copy link
Contributor

In the civis.io.civis_file_to_table function, the Python API client appears to tell platform to change SQL types like VARCHAR(1) in the table_columns argument to more generic values like VARCHAR(1024) when there are multiple files. The behavior seems reasonable when data types are automatically inferred (i.e., when need_table_columns is true), as noted in the code comment, but if the user has specified a dtype with specific length like VARCHAR(1), the import should just use that.

Copy link
Contributor

@jkulzick jkulzick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mheilman looks like the build errored

civis/tests/test_io.py Show resolved Hide resolved
@mheilman
Copy link
Contributor Author

@mheilman looks like the build errored

🤦 sorry about that. Fixed now

@mheilman mheilman requested a review from jkulzick August 28, 2020 15:24
@mheilman mheilman assigned jkulzick and unassigned mheilman Aug 28, 2020
Copy link
Contributor

@jkulzick jkulzick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mheilman mheilman merged commit cb4825d into civisanalytics:master Aug 28, 2020
@mheilman mheilman deleted the specific_dtype_in_civis_file_to_table branch August 28, 2020 16:08
byndcivilization added a commit that referenced this pull request Sep 10, 2020
…city

* master:
  [APIC-314] Refactored File Cleaning Logic (#405)
  [APIC-307] fix a workflows usage example in docs/source/client.rst (#409)
  add some missing PR numbers to the changelog (#408)
  Update the API spec at `civis/tests/civis_api_spec.json` so that new endpoints are included (e.g., `/exports/files/csv`) (#407)
  Updated list of base API resources to include `aliases`, `git_repos`, `json_values`, `services`, and `storage_hosts` so that they show up in the sphinx docs (#406)
  [APIC-284] remove python 3.5 support since it is reaching EOL (#404)
  [APIC-305] Require sql_type for every column when table_columns is provided (CHANGELOG) (#403)
  [APIC-313] retain specific sql types in civis_file_to_table (#402)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants