8000 Jac/geocoding by jacalata · Pull Request #229 · tableau/document-api-python · GitHub
[go: up one dir, main page]

Skip to content

Jac/geocoding #229

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

Merged
merged 11 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension 8000


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 73 additions & 1 deletion docs/docs/api-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,39 @@ Saves any changes to the workbook to a new file specified by the `new_file` para

`self.filename:` Returns the filename of the workbook.

`self.shapes` Returns a list of strings with the names of shapes found in the workbook.

## Datasources
```python
class Datasource(dsxml, filename=None)
```
A class representing Tableau Data Sources, embedded in workbook files or in TDS files.

**Params:**

**Raises:**

**Methods:**

save

save_as

add_calculation

**Properities:**

`self.name` Returns string with the name of datasource.

`self.version` Returns string of daatasource's version.

`self.caption` Returns string of user defined name of datasource if exists.

`self.connections` Returns list of connections are used in workbook.

`self.fileds` Returns key-value result of field name and their attributes.

`self.calculations` Returns calculated field of the workbook.

## Connections
```python
Expand Down Expand Up @@ -74,5 +103,48 @@ The Connection class represents a tableau data connection. It can be from any ty

## Fields
```python
class Workbook(column_xml=None, metadata_xml=None)
class Field(column_xml=None, metadata_xml=None)
```

Represents a field in a datasource

**Raises:**

**Methods:**
`Field.create_field_xml()` Create field from scratch.

`Field.add_alias(self, key, value)` Add an alias for a given display value.

**Properities:**

`self.name` Returns a string providing a nice name for the field which is derived from the alias, caption, or the id.

`self.id` Returns a string with name of the field as specified in the file, usually surrounded by [ ].

`self.xml` Returns a ElementTree object which represents an XML of the field.

`self.caption` Returns a string with the name of the field as displayed in Tableau unless an aliases is defined.

`self.alias` Returns a string with the name of the field as displayed in Tableau if the default name isn't wanted.

`self.datatype` Returns a string with the type of the field within Tableau (string, integer, etc).

`self.role` Returns a string which identify field as a Dimension or Measure.

`self.type` Returns a string with type of field (quantitative, ordinal, nominal).

`self.aliases` Returns Key-value mappings of all aliases that are registered under this field.

`self.is_quantitative` Returns a boolean if field is quantitative.

`self.is_ordinal` Returns a boolean if field is categorical that has a specific order.

`self.is_nominal` Returns a boolean if field is categorical that does not have a specific order.

`self.calculation` Returns a string with the formula if this field is a calculated field.

`self.default_aggregation` Returns a string with he default type of aggregation on the field (e.g Sum, Avg).

`self.description` Returns a string with contents of the <desc> tag on a field.

`self.worksheets` Returns a list of strings with the worksheet's names uses this field.
9 changes: 9 additions & 0 deletions docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,12 @@ For all other things, please submit a PR that includes the fix, documentation, o
If the feature is complex or has multiple solutions that could be equally appropriate approaches, it would be helpful to file an issue to discuss the
design trade-offs of each solution before implementing, to allow us to collectively arrive at the best solution, which most likely exists in the middle
somewhere.


## Release process

We expect that everything merged into the development branch is ready to release on master. Releases can be made at any time - ideally it would be on a regular cadence but currently it is basically on request.
- bump the version in setup.py
- update the changelog: all commits to development should contain a meaningful message, the changelog can be built from these
- merge to master.
This kicks off an automated release in github and then publish to pypi.
18 changes: 0 additions & 18 deletions samples/list-tds-info/list_tds_info.py

This file was deleted.

12 changes: 12 additions & 0 deletions samples/preserve-namespaces/filtering.twb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@
</attributes>
<_.fcp.ObjectModelEncapsulateLegacy.true...object-id>[TestData_44D2C885FAEF453C846AC2CCD3577055]</_.fcp.ObjectModelEncapsulateLegacy.true...object-id>
</metadata-record>
<metadata-record class='column'>
<remote-name>SPAM</remote-name>
<remote-type>1</remote-type>
<remote-alias>SPAM</remote-alias>
<ordinal>19</ordinal>
<aggregation>Count</aggregation>
<contains-null>true</contains-null>
<attributes>
<attribute datatype='string' name='DebugRemoteType'>&quot;xml&quot;</attribute>
<attribute datatype='string' name='DebugWireType'>&quot;SQL_C_DEFAULT&quot;</attribute>
</attributes>
</metadata-record>
<metadata-record class='column'>
<remote-name>Account Number</remote-name>
<remote-type>5</remote-type>
Expand Down
Loading
0