{ "info": { "author": "Vijay Balasubramaniam", "author_email": "vbalasu@gmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "\n# trifacta\n\nTrifacta client that makes it easy to integrate Trifacta into your production and data science workflows\n\n### Usage Scenarios\n- **Jupyter**: Invoke Trifacta jobs from a Jupyter notebook and pass data back and forth between Jupyter and Trifacta\n- **Other Notebooks**: Integrate Trifacta with Azure Databricks, Zepellin or any other notebook-style interface that supports Python\n- **Scripts**: Automate Trifacta jobs and input/output using python scripts that can be easily executed from the command line or called from an external scheduler\n\n### Functionality\nThis library makes it simple to do the following:\n1. Connect to a Trifacta instance\n2. Run a job\n3. Download results to a pandas dataframe OR Download results as text/csv\n4. Upload files to Trifacta\n\nNote that file uploads and downloads are performed using httpfs, and require that port 14000 be opened on the Trifacta server\n\n\n```python\n#!pip install trifacta\nimport trifacta\n```\n\n\n```python\n#Step 1: Connect to Trifacta by providing the URL, username and password\nt = trifacta.Client('https://partnerdemo.trifacta.net', 'userid@mydomain.com', 'mypassword')\n```\n\n#### Get the wrangled dataset id from the URL in the Trifacta UI\nMake sure that you have run the job manually at least once\n\n\n#### Note the output path (be sure to set it to \"replace\")\n\n\n\n```python\n#Step 2: Run the job\nt.run_job(14478)\n```\n\n About to run job\n {'jobgroupId': 3926, 'jobIds': [7513, 7514], 'reason': 'JobStarted', 'sessionId': 'b9d327f0-8e19-11e8-8feb-9fabf204e996'}\n 2018-07-22 18:43:01.427594 InProgress\n 2018-07-22 18:43:06.791576 Complete\n\n\n\n\n\n True\n\n\n\n\n```python\n#Step 3a: Get a pandas dataframe with the results\ndf = t.get_dataframe('/trifacta/queryResults/demo@trifacta.com/demo_output.csv')\n```\n\n\n```python\ndf\n```\n\n\n\n\n
| \n | Neighborhood | \nHouseStyle | \nrow_count | \nsum_LotArea | \n
|---|---|---|---|---|
| 0 | \nNAmes | \n1Story | \n159 | \n1589811 | \n
| 1 | \nCollgCr | \n1Story | \n91 | \n841644 | \n
| 2 | \nGilbert | \n2Story | \n60 | \n668112 | \n
| 3 | \nTimber | \n1Story | \n23 | \n554694 | \n
| 4 | \nCollgCr | \n2Story | \n53 | \n546602 | \n
| 5 | \nNridgHt | \n1Story | \n51 | \n537687 | \n
| 6 | \nSawyer | \n1Story | \n53 | \n528438 | \n
| 7 | \nEdwards | \n1Story | \n53 | \n511296 | \n
| 8 | \nNoRidge | \n2Story | \n33 | \n485691 | \n
| 9 | \nNWAmes | \n1Story | \n35 | \n403813 | \n
| 10 | \nClearCr | \n1Story | \n11 | \n395797 | \n
| 11 | \nMitchel | \n1Story | \n32 | \n394436 | \n
| 12 | \nSomerst | \n1Story | \n37 | \n350820 | \n
| 13 | \nNWAmes | \n2Story | \n29 | \n348885 | \n
| 14 | \nSomerst | \n2Story | \n49 | \n323495 | \n
| 15 | \nNridgHt | \n2Story | \n26 | \n300685 | \n
| 16 | \nOldTown | \n2Story | \n32 | \n274465 | \n
| 17 | \nSawyerW | \n1Story | \n28 | \n271008 | \n
| 18 | \nOldTown | \n1.5Fin | \n33 | \n267283 | \n
| 19 | \nClearCr | \n1.5Fin | \n6 | \n266593 | \n
| 20 | \nCrawfor | \n1Story | \n19 | \n260639 | \n
| 21 | \nSawyerW | \n2Story | \n25 | \n255102 | \n
| 22 | \nNAmes | \n2Story | \n22 | \n249793 | \n
| 23 | \nOldTown | \n1Story | \n33 | \n240257 | \n
| 24 | \nEdwards | \n1.5Fin | \n22 | \n228970 | \n
| 25 | \nCrawfor | \n2Story | \n20 | \n222029 | \n
| 26 | \nNAmes | \nSLvl | \n21 | \n221177 | \n
| 27 | \nEdwards | \n2Story | \n14 | \n185799 | \n
| 28 | \nTimber | \n1.5Fin | \n2 | \n178418 | \n
| 29 | \nBrkSide | \n1.5Fin | \n25 | \n172233 | \n
| ... | \n... | \n... | \n... | \n... | \n
| 66 | \nCollgCr | \nSLvl | \n3 | \n30135 | \n
| 67 | \nBrDale | \n2Story | \n16 | \n28816 | \n
| 68 | \nVeenker | \nSLvl | \n2 | \n25757 | \n
| 69 | \nNoRidge | \n1.5Fin | \n2 | \n25398 | \n
| 70 | \nSawyerW | \nSFoyer | \n3 | \n25267 | \n
| 71 | \nCollgCr | \nSFoyer | \n3 | \n24491 | \n
| 72 | \nMeadowV | \n2Story | \n8 | \n19611 | \n
| 73 | \nNPkVill | \n1Story | \n4 | \n17942 | \n
| 74 | \nVeenker | \n2Story | \n1 | \n17542 | \n
| 75 | \nNAmes | \n1.5Unf | \n2 | \n16827 | \n
| 76 | \nSWISU | \n1Story | \n2 | \n14692 | \n
| 77 | \nOldTown | \nSFoyer | \n2 | \n14179 | \n
| 78 | \nNWAmes | \n1.5Fin | \n1 | \n13837 | \n
| 79 | \nSawyerW | \nSLvl | \n1 | \n12800 | \n
| 80 | \nIDOTRR | \n1.5Unf | \n2 | \n12449 | \n
| 81 | \nSawyerW | \n1.5Fin | \n1 | \n12327 | \n
| 82 | \nGilbert | \n1.5Fin | \n1 | \n12134 | \n
| 83 | \nBrkSide | \n2.5Unf | \n1 | \n11888 | \n
| 84 | \nCrawfor | \n2.5Fin | \n1 | \n11526 | \n
| 85 | \nNPkVill | \n2Story | \n5 | \n11465 | \n
| 86 | \nNWAmes | \nSFoyer | \n1 | \n10625 | \n
| 87 | \nCrawfor | \n1.5Unf | \n1 | \n10594 | \n
| 88 | \nOldTown | \n1.5Unf | \n2 | \n9888 | \n
| 89 | \nMeadowV | \nSFoyer | \n6 | \n9853 | \n
| 90 | \nSawyerW | \n1.5Unf | \n1 | \n9000 | \n
| 91 | \nMeadowV | \n1Story | \n2 | \n8448 | \n
| 92 | \nIDOTRR | \n2.5Unf | \n1 | \n7200 | \n
| 93 | \nCrawfor | \n2.5Unf | \n1 | \n7128 | \n
| 94 | \nBlueste | \n2Story | \n2 | \n3250 | \n
| 95 | \nMeadowV | \nSLvl | \n1 | \n1596 | \n
96 rows \u00d7 4 columns
\n