Azure - Data not showing on Easy Tables

爷,独闯天下 提交于 2019-12-08 04:46:18

问题


I am using an Azure SQL back-end for my Xamarin mobile application. I am using Easy tables with Node.JS to handle my back-end. I have created a few tables using the easy tables creation wizard, but now I wish to manually migrate some of my old MySQL tables, such as my table named users from another database into my new Azure SQL database.

1) I have used the SqlMigration3 tool to convert the MySQL tables into Azure SQL, changed the schema to be the same as the Easy Table's schema, and they are now in my Azure SQL Database

2) I have created the Node.JS files users.js and users.json in my App Service Editor and now my table is showing in easy tables

users.js

var table = module.exports = require('azure-mobile-apps').table();

// table.read(function (context) {
//     return context.execute();
// });

// table.read.use(customMiddleware, table.operation);   

users.json

  {
  "softDelete" : true,
  "autoIncrement": false,
  "insert": {
    "access": "anonymous"
  },
  "update": {
    "access": "anonymous"
  },
  "delete": {
    "access": "anonymous"
  },
  "read": {
    "access": "anonymous"
  },
  "undelete": {
    "access": "anonymous"
  }}

The users table is showing up in Easy Tables but there is no data showing, despite the data displaying in SQL Server Management Studio 2017. Have I missed a step? What am I doing wrong?


回答1:


In my test, I am also unable to see the data from Azure portal when I do the same steps as yours. I think the portal needs time to load the data since it might have many records.

Since you set Read permission to Allow anonymous access, I would recommend accessing the table via REST API:

https://[YourAppName].azurewebsites.net/tables/users?ZUMO-API-VERSION=2.0.0



来源:https://stackoverflow.com/questions/44711067/azure-data-not-showing-on-easy-tables

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!